Skip to content

Instantly share code, notes, and snippets.

@dbaldwin
Last active May 1, 2026 11:37
Show Gist options
  • Select an option

  • Save dbaldwin/041735a774bf46a82ee98bbbe28a7939 to your computer and use it in GitHub Desktop.

Select an option

Save dbaldwin/041735a774bf46a82ee98bbbe28a7939 to your computer and use it in GitHub Desktop.
PX4 VIO w/ Jetson Nano, Intel T2654, and Pixhawk (NXP Version)

Overview

I've put this documentation to supplement the awesome VIO repo from Auterion. While the VIO code performs very well it does take quite a bit of work to get up and running. So I'm covering this in my YouTube video and this gist.

Install ROS on Jetson Nano (YouTube Link)

Automatic Addison has great tutorials on ROS. His installation guide is the most concise out there. This section contains the commands from Addison's ROS installation guide.

  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  • sudo apt update
  • sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  • sudo apt-get update
  • sudo apt install ros-melodic-desktop
    • Note: it's not necessary to do the full desktop install. I installed the base desktop package for the purposes of this tutorial.
  • echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
  • source ~/.bashrc
  • export | grep ROS

ROS installation is complete. Let's install some Python dependencies that will help us when we build the VIO code shortly.

  • sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
  • sudo apt install python-rosdep
  • sudo rosdep init
  • rosdep update
  • rosversion -d

Install librealsense for Jetson Nano (YouTube Link)

Instructions can be found here. These are the steps for this section:

  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
  • sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
  • sudo apt-get install librealsense2-utils
  • sudo apt-get install librealsense2-dev

Install ROS Python Catkin Tools (YouTube Link)

The Python catkin package helps with managing and building workspaces. Here are the steps to install the tools:

  • sudo apt install python-catkin-tools
  • mkdir -p ~/catkin_ws/src
  • cd ~/catkin_ws/src
  • git clone https://github.com/dbaldwin/VIO.git

Install MAVROS Dependencies

  • sudo apt install ros-melodic-mavros ros-melodic-mavros-extras
    • Note: change the command above to match your ROS version
  • wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
  • sudo bash ./install_geographiclib_datasets.sh

Additional ROS Dependencies

  • sudo apt install ros-melodic-realsense2-camera
  • sudo apt install ros-melodic-pcl-ros

Build the VIO code

  • cd ~/catkin_ws
  • catkin build px4_realsense_bridge

Configure your VIO Launch Files

Launch VIO!

  • source ~/catkin_ws/devel/setup.bash
  • roslaunch px4_realsense_bridge bridge_mavros.launch

WAIT!

Now that your software is up and running you need to make sure you've configured your PX4 parameters properly. Be sure to watch the video covering this part.

@btak9527

Copy link
Copy Markdown

Hello, librealsense v2.54.1 no longer supports t265. I wonder if you can solve this problem in the article

@ta-jetson

Copy link
Copy Markdown

@btak9527 , you can use previous versions of librealsense and the rest will work seamlessly as mentioned above

@dbaldwin

Copy link
Copy Markdown
Author

@ta-jetson thanks for confirming

@ta-jetson

Copy link
Copy Markdown

@dbaldwin , I just have a query, can we send the data to PX4 at 50 hz instead of 30?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment