This section documents a tradeshow demo from 2022 using both the NavQPlus and The NXP MR-Buggy3 platform. Please note that this demo is subject to ongoing changes and updates and may at some point be "broken". The information here may be useful for similar types of demonstrators.
The NavQPlus_MR-Buggy3 demo is a demonstration of the capabilities of the NavQPlus, the MR-Buggy3 platform, and NXP's CAN Bus hardware and software support for ROS2.
This guide will walk you through setting up the MR-Buggy3 demo on both your laptop and the NavQPlus. This demo consists of:
A Gazebo Ignition simulation environment with the MR-Buggy3 model running
Connection to the actual Buggy3 hardware meaning HITL (hardware in the loop) control of the real life MR-Buggy3
A showcase of the NPU (neural accelerator) on the NavQPlus running inference on the real world camera data as well as a virtual camera from the simulation environment
ROS2 <-> Cyphal* <-> uORB transport (*transport layer only)
CAN communications from NavQ+ to the UCANS32K146 CAN-FD node driving a PWM and LED
PWM control in PX4 using the PCA9685
To run this demo, you must have an Ubuntu 20.04 or 22.04 machine. It is recommended that you use a machine that has a dedicated GPU and that is running Ubuntu natively.
This install script first checks itself against the repo to ensure it is the latest version, then installs the packages needed for a baseline setting for the NXP mobile robotics team development environment on either a laptop, VM, or the NavQPlus targets. Download the nxp_install.sh script using a webbrowser to your local Linux machine.(Currently this) is located at
Run
chmod a+x install.sh
on this script and run it on your machine.
This will install ROS2 and all required dependencies.
On systems where you have upgraded from Ubuntu 20.04 to 22.04 errors may be encountered. This can become somewhat complex to resolve. A clean install is always best. Alternatively, try completely removing the old ROS directories (save any personal work) and any repository references to ROS Foxy vs Humble. The base thing to try first: If there is an error with the install.sh script, the first remedy to try is repeating the ROS2 sources install steps as outlined here: https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html#setup-sources\
It is recommended that you create a ROS2 workspace at ~/git/ros2/, but you are free to create it wherever you want. In this guide, we will use that location. Follow the steps below.
If you get "CMake Error at CMakeLists.txt:14 (find_package):" then run "source /opt/ros/<distro>/setup.bash"
Follow the steps used above for your laptop to set up ROS2 on your NavQ+.
You'll want to also create a ROS2 workspace on your NavQPlus. This step is similar to the step for setting up the laptop, but instead of cloning sim_ignition_bringup, you'll want to clone ros2_orchestrator. Follow the steps below.
If you get "CMake Error at CMakeLists.txt:14 (find_package):" then run "source /opt/ros/<distro>/setup.bash"
Once you have connected everything according to the block diagram shown below, you will be ready to run the demo.
To run the demo, open 4 terminal windows. Start with the battery plugged in and powering everything over the PDB, and make sure that the ESC is turned OFF.
SSH into the NavQ+, then navigate to ~/git/ros2/src/canfd_msgs/scripts/. Inside this folder, run ./launch_example.sh
. You should see the UCAN board turn on, start sending heartbeat messages, and then stop. NOTE: You should also see a 64 byte CAN frame get sent. This is the initialization for the PCA9685 PWM Driver. Once this message is sent, you are free to turn on your ESC.
Run ros2 launch sim_ignition_bringup sim_ignition_bringup.launch.py
and wait for the simulation to fully start.
SSH into the NavQ+, then run ros2 launch ros2_orchestrator orchestrate.launch.py
This terminal is for checking ros2 topics, launching additional rqt_image_views, and other commands as needed.
You should now have a working demo! The simulated car should be driving around the track. In each of the rqt_image_view windows that open, you can view the various camera streams that are running. Camera streams that are labeled "Debug" show the NPU inference running.