Installing Prerequisites - Mokaz/SPARK-martin-project GitHub Wiki
Install ROS2 Iron
Follow the official guide to install ROS2 Iron.
Install additional ROS2 packages
sudo apt-get install ros-iron-tf2 ros-iron-tf2-geometry-msgs
sudo apt install ros-iron-xacro
Install MAVROS
# Install MAVROS packages
sudo apt-get install ros-iron-mavros ros-iron-mavros-extras
# Install GeographicLib datasets
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh
Install librealsense 2.53.1 (from source)
1. Download the SDK
https://github.com/IntelRealSense/librealsense/releases/tag/v2.53.1
2. Create build folder
mkdir build && cd build
3. Configure for RSUSB
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DFORCE_RSUSB_BACKEND=ON \
-DBUILD_GRAPHICAL_EXAMPLES=ON \
-DBUILD_EXAMPLES=ON
4. Compile and install
make -j$(nproc)
sudo make install
5. Add the udev rule that lets non-root apps access the camera
sudo cp ../config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
Configure realsense-ros 4.54.1 for ROS2 Iron
The realsense-ros package will need changes for it to work with ROS2 Iron. Assuming that you have initialized the package as a github submodule as mentioned in the quickstart guide proceed by doing the following:
1. Swap out the required version with 2.53.1
cd realsense_ros
cd realsense2_camera
sed -i 's/find_package(realsense2 .*)/find_package(realsense2 2.53.1 REQUIRED)/' CMakeLists.txt
2. In realsense2_camera/launch/rs_launch.py add the missing launch parameter
{'name': 'base_frame_id, 'default': 'link', 'description': 'Defines the frame_id all static transformations refers to.'},