Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
FastRTPS and the microRTPS agent are needed on NavQ in order to bridge uORB topics from PX4 to ROS2 on NavQ over a UART or UDP connection. Follow the guide below to build and install these packages.
NOTE: FastRTPS and PX4 ROS Com work differently from MAVROS (ROS1). PX4 ROS Com subscribes to uORB topics rather than MAVLINK messages. See below for a diagram of how microRTPS and PX4 ROS Com works.
Follow the link below for more details on microRTPS and PX4 ROS Com:
First, we will install the FastRTPS project from eProsima. Use the following commands below to do so:
Next, we will build and install the necessary software that will allow us to use ROS2 to communicate with the microRTPS bridge. First, run the following commands:
URGENT: Building px4_ros_com requires a lot of ram. Enabling a swap disk is highly recommended. This will take up 1GB of space on your storage medium.
Run the following commands to enable a 1GB swapfile:
Now, build the workspace:
This will take a long time to build on NavQ. In our experience, it takes anywhere from 45 minutes to an hour. Make sure you have a stable connection to NavQ over UART or SSH, and do not let the NavQ lose power!
In order to run all of your specific ROS2 software successfully, you must source the install/setup.bash files in each of your ROS2 workspace folders. Add the following lines to your .bashrc to do so:
Continue to the next page to set up a systemd
service that will automatically start the micrortps agent on your NavQ. The guide will also cover how to automatically start the client on the FMU.
NOTE: ROS2 is new, but we suggest you use it over ROS1, as ROS1 will be deprecated in the near future. You may run into issues with the ROS2 section of this Gitbook. If you have any issues with the guide, please email landon.haugh@nxp.com if external, or use Teams/Email if internal. MAVROS is not compatible with ROS2. MicroRTPS and PX4 ROS Com replace MAVROS.
Follow the guide at the link below to install ROS2 Foxy Fitzroy on your NavQ running the Demo image.
Note 1: at Setup Sources step you might get an error message by curl. To avoid this, run the following commands:
Note 2: at Install ROS2 package step, run the ros-foxy-ros-base
installer, as the Desktop tools are not needed on NavQ:
To use the package manager (apt
) on the Demo image, you'll need to change your timezone.
First, you'll need to locate the correct timezone file at /usr/share/zoneinfo
. There should be a folder for your country and a file in that folder for the closest city to you.
For example, if you're in Central Time USA, you'd use the following commands:
Now, you can run sudo apt update
and sudo apt upgrade
to get your system up to date.
Generate a start up script for the micrortps client under /usr/local/bin
with content
Save the file and exit nano. Make the file executable
Generate a systemd service file to start the startup script at boot
with content
Save the file and exit nano. Check if the process starts
You should see an state active (running), quit with <q> Enable the systemd service file finally to be active at boot