This package is a bridge from PX4 to the Realsense T265 camera, which provides odometry data.
- ROS Noetic (Ubuntu 20.04) or ROS Melodic (Ubuntu 18.04): http://wiki.ros.org/ROS/Installation
- librealsense: https://github.com/IntelRealSense/librealsense
- MAVROS: https://dev.px4.io/en/ros/mavros_installation.html.
These steps contain the installation process, software dependencies and building instructions.
-
This is a ROS package, it assumes you have either ROS Noetic (Ubuntu 20.04) or ROS Melodic (Ubuntu 18.04) installed, instructions can be found here. This is an example of installing ROS Noetic:
gpg --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 gpg --export C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | sudo tee /usr/share/keyrings/ros.gpg > /dev/null sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/ros.gpg] https://mirrors.ustc.edu.cn/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt update sudo apt install ros-noetic-desktop-full echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc
-
Install librealsense (version 2.50.0) from here. It is the last version that supports ROS1. You can building librealsense SDK like this:
sudo apt-get install git libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev build-essential git clone -b v2.50.0 https://github.com/IntelRealSense/librealsense.git cd librealsense ./scripts/setup_udev_rules.sh mkdir build && cd build cmake .. make -j4 sudo make install
-
Install all realsense ROS packages from here.
sudo apt install ros-noetic-realsense2-*
-
Install MAVROS (version 0.29.0 or above) from here.
sudo apt-get install ros-${ROS_DISTRO}-mavros ros-${ROS_DISTRO}-mavros-extras ros-${ROS_DISTRO}-mavros-msgs wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh sudo bash ./install_geographiclib_datasets.sh
-
Install catkin and create your catkin workspace directory.
sudo apt install python3-catkin-tools mkdir -p ~/vio_ws/src
-
Clone this repository in your catkin workspace.
cd ~/vio_ws/src git clone https://github.com/waterqun/VIO.git
-
Build the package:
cd ~/vio_ws catkin build px4_realsense_bridge
-
Run the ROS node:
source ~/vio_ws/devel/setup.bash roslaunch px4_realsense_bridge bridge_mavros.launch
Note This launch file starts the mavros node as well. Mavros needs to be running but if it is started elsewhere the basic launch file bridge.launch can be used. The file bridge_mavros_sitl.launch is only for using this node in combination with the PX4 SITL toolchain (Simulation). Instructions on how to setup the PX4 SITL toolchain can be found here.