NXP CUP
Search…
Setting up NavQ for use on the NXP Cup Car
This section is not meant for NXP Cup contestants as of now. This is for future developments with NXP Cup.

Setting up the FMU

Run this on an Ubuntu 20.04 machine.

Install Fast-DDS

1
$ cd ~
2
$ mkdir src && cd src
3
$ git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.0.0 FastRTPS-2.0.0
4
$ cd FastRTPS-2.0.0
5
$ mkdir build && cd build
6
$ cmake -DTHIRDPARTY=ON -DSECURITY=ON ..
7
$ make
8
$ sudo make install
Copied!

Install Fast-DDS-Gen

1
$ cd ~/src
2
$ git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git -b v1.0.4 Fast-RTPS-Gen
3
$ cd Fast-RTPS-Gen
4
$ ./gradlew assemble
5
$ sudo ./gradlew install
Copied!

Clone & build PX4-Autopilot from rudislabs repo

1
$ cd ~/src
2
$ git clone --recursive https://github.com/rudislabs/PX4-Autopilot.git -b pr-cupcar
3
$ cd PX4-Autopilot
4
# Add nxpcup to PX4-Autopilot/boards/nxp/fmuk66-v3/rtps.cmake under EXAMPLES #
5
$ make nxp_fmuk66-v3_rtps
6
# Flash your FMU using rtps binary #
Copied!

Setting up NavQ

Flash NavQ with fresh image

To flash NavQ with a fresh image, follow the instructions on the page linked below:
Downloading & Flashing the HoverGames-Demo Linux Image
8MMNavQ

Run setup script to install ROS2 Foxy and microRTPS

FTP the zip file linked below to NavQ, then unzip using
navq-install.zip
10KB
Binary
navq-install
1
$ unzip navq-install.zip
Copied!
and then run the script inside using
1
$ ./navq-install/navq-install.sh
Copied!

Install ROS2 camera tools

Install ROS2 camera tools so we can publish camera data to the /image topic. Use
1
$ sudo apt install ros-foxy-cv-bridge \
2
ros-foxy-image-tools \
3
ros-foxy-image-transport \
4
ros-foxy-image-transport-plugins \
5
ros-foxy-image-pipeline \
6
ros-foxy-camera-calibration-parsers \
7
ros-foxy-camera-info-manager \
8
ros-foxy-launch-testing-ament-cmake
Copied!

Clone and build `nxp_cup_vision`

Clone nxp_cup_vision and then build it using the commands below
1
$ cd
2
$ mkdir ros2src
3
$ cd ros2src
4
$ git clone https://github.com/rudislabs/nxp_cup_vision.git
5
$ colcon build --symlink-install
Copied!
Once that is done, source the setup.bash file
1
$ echo "~/ros2src/install/setup.bash" >> .bashrc
Copied!
You should have everything installed now.

Running simulated PixyCamera

Running cam2image

Spin up the camera publisher by running the command below
1
$ ros2 run image_tools cam2image --ros-args -p device_id:=0 -p width:=640 -p height:=480
Copied!

Running nxp_tack_vision

Spin up the vision code by running
1
$ ros2 run nxp_cup_vision nxp_track_vision
Copied!