High-resolution raw Radar data, along with it’s nanosecond timing detail, is now published as a dedicated ROS node, along with a configurable laser scan topic, two variants of pointcloud topics, and a 2D image representation of the raw radar data. Below these illustrations presenting radar data through the ROS visualisation tool RVIZ, there is a detailed summary of the ROS2 implementation provided by Navtech Radar, which is available for download at https://bitbucket.org/navtechradar/iasdk-public/src/master/ros/ros2/.
Info |
---|
Quick link to install instructions for ROS2 drivers in Ubuntu 2022: Link |
...
Navtech ROS2 Examples
The Navtech ROS2 Driver repository contains examples of ROS2 publishers and subscribers, which interface with RTSP cameras and Navtech Radar. Both basic and complete examples are provided which allow simple publishing of data, simple subscribing to data, and also immediate viewing of radar/camera data, using the ROS2 visulaisation visualisation tool, RVIZ. The Navtech ROS2 driver is dependent on the Navtech SDK.
...
ROS2 Requirements
As above and:
ROS2 Galactic Humble Hawksbill Geoclone - CPP and Python bindings
Installation instructions can be found ROS2 Humble installations are accessible here: https://docs.ros.org/en/galactichumble/Installation/Ubuntu-Install-Binary.html
Python Requirements
Python3.0+
...
Code Block |
---|
source /opt/ros/galactichumble/setup.bash |
Note - this must be done in every new terminal
Alternatively, make this permanent by adding to your bash file:
Code Block |
---|
echo "source /opt/ros/galactichumble/setup.bash" >> ~/.bashrc |
...
Code Block | ||
---|---|---|
| ||
ros2 run nav_rosradar colossus_publisher |
Packages can be run with their corresponding parameter files like so:
...
Code Block | ||
---|---|---|
| ||
ros2 run nav_rosradar colossus_publisher --ros-args --params-file ./src/nav_rosradar/config/colossus_publisher.yaml |
camera_ros
Contains examples of publishers and subscribers to handle the connection to, and delivery of data from, an RTSP video streamThis folder contains examples based on a connection to an RTSP camera stream. Examples include conencting to and reading camera images, publishing camera images, subscribing to camera images, and saving camera iamges to a video file. Sample config file(s) are also included in the 'config' directory.
See the README.md under 'camera_ros', for more detailed instructions
launch_ros
Contains examples of This folder contains launch files which can be used with the ROS2 Navtech driverare intended to receive and display data with ease. The launch files will launch the required ros nodes, transform(s) and UI (RVIZ) to display data reived from a RTSP camera or Navtech Radar. The Launch files also use configuration files which contain the default settings for the examples.
See the README.md under 'launch_ros', for more detailed instructions
...
Contains the custom message types used within the ROS2 Navtech driver - this includes camera messages and Navtech radar messages.
See the README.md under 'messages', for more detailed instructions
nav_
...
radar
Contains examples of publishers and subscribers to handle the connection to, and delivery of data from, an Navtech radarThis folder contains examples based on a connection to a Navtech radar. Examples include conencting to and reading radar data, publishing radar data and images, subscribing to radar data and images, and saving radar iamges to a video file. Sample config file(s) are also included in the 'config' directory.
See the README.md under 'nav_ros_radar', for more detailed instructions
rviz_views
Contains rviz view configuration files used to quickly visualise data output from the above packages. These view configuration files are used by the launch files.
See the README.md under 'rviz_views', for more detailed instructions
ROS2 Example install procedure
Update Ubuntu
...
22.04
Code Block | ||
---|---|---|
| ||
sudo apt update sudo apt upgrade |
...
Code Block | ||
---|---|---|
| ||
sudo apt update && sudo apt install curl gnupg lsb-release sudo curl -sSL <httpshttps://raw.githubusercontent.com/ros/rosdistro/master/ros.key>key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] <httphttp://packages.ros.org/ros2/ubuntu>ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null sudo apt update sudo apt upgrade sudo apt install ros-galactichumble-desktop source /opt/ros/galactichumble/setup.bash ros2 run demo_nodes_cpp talker |
...
Code Block | ||
---|---|---|
| ||
source /opt/ros/galactichumble/setup.bash ros2 run demo_nodes_py listener |
check that the talker and listener are connected, and messages are being exchanged
Install OpenCV
Code Block | ||
---|---|---|
| ||
sudo apt install git cd ~ git clone <https --depth 20 https://github.com/opencv/opencv.git>git git clone <https --depth 20 https://github.com/opencv/opencv_contrib.git>git sudo apt install build-essential cmake git pkg-config libpng-dev libtiff-dev gfortran openexr libgtk-3-dev libavcodec-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libjpeg-dev libatlas-base-dev python3-dev python3-numpy libtbb2 libtbb-dev libdc1394-22-dev libopenexr-devlsdev cd opencv mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D OPENCV_ENABLE_NONFREE=ON -D BUILD_EXAMPLES=ON .. make -j8 // (replace the 8 by the number of usable cores on your machine, which is reported by the command nproc) sudo make install sudo apt install python3-opencv libopencv-devldconfig |
Check OpenCV is installed
...
Code Block | ||
---|---|---|
| ||
git clone <httpshttps://bitbucket.org/navtechradar/iasdk-public.git>git |
Install Colcon (the ROS2 build tool)
verify that the file iasdk-public/cpp/cpp_17/src/CMakeLists.txt contains the following section:
Code Block |
---|
# Set the BOTAN path set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SDK_PATH}/cmake/modules/") find_package(Botan2 REQUIRED) include_directories(${BOTAN2_INCLUDE_DIR}) |
and then continue
Code Block | ||
---|---|---|
| ||
sudo apt install libbotan-2-dev sudo apt install python3-colcon-common-extensions cd ~/iasdk-public/cpp/cpp_17 colcon build |
Check the above command does not produce any errors.
Apply some patches:
Copy the contents of the provided patch folder "nav_radar" to replace ~/iasdk-public/ros/ros2/src/nav_radar
Attachments | ||||
---|---|---|---|---|
|
Build the ROS2 IASDK
...
packges
verify that the file iasdk-public/ros/ros2/src/nav_radar/CMakeLists.txt contains the following section:
Code Block |
---|
# Set the BOTAN path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SDK_PATH}/cmake/modules/")
find_package(Botan2 REQUIRED)
include_directories(${BOTAN2_INCLUDE_DIR}) |
and then continue
Code Block | ||
---|---|---|
| ||
cd ~/iasdk-public/ros/ros2/ source /opt/ros/galactichumble/setup.bash colcon build . install/setup.bash |
...
Code Block | ||
---|---|---|
| ||
source /opt/ros/galactichumble/setup.bash . install/setup.bash |
...
In short - the above command removes a piece of code which is looking for something (renameat2 system call) that does not exist in kernels < 3.15
...
# Debian package build instructions for Navtech ROS2 SDK
## Install the protobuf compiler
Code Block |
---|
sudo apt install protobuf-compiler |
## Install the build tools
Code Block |
---|
sudo apt install python3-bloom python3-rosdep fakeroot debhelper dh-python
rosdep init
rosdep update |
## Build and install the ROS packages
Code Block |
---|
cd iasdk/ros/ros2
colcon build
. install/setup.bash |
## Create YAML to point towards custom ROS packages
Create a yaml file (in the workspace containing the packages, for example) specifying the local packages. Example of yaml content:
(Add an entry for all required packages)
nav_messages:
ubuntu: [nav-messages]
## Create a file in the rosdep sources folder
Code Block |
---|
sudo nano /etc/ros/rosdep/sources.list.d/10-local.list |
Add to this file the absolute path of the .yaml file created earlier. Example:
yaml file:///absolute_path_to_local_rosdep_file_list.yaml
## Update the ros dependencies
Code Block |
---|
rosdep update |
## Check if the new rosdep packages lists are being correctly found using:
Code Block |
---|
rosdep resolve package_name |
## Now build the debian packages
Code Block |
---|
cd ~/iasdk-public/ros/ros2/src/nav_messages
bloom-generate rosdebian --os-name ubuntu --ros-distro humble
cd ~/iasdk-public/ros/ros2/src/nav_messages/debian |
Edit the file "control" and change package name from ros-humble-nav-messages to nav-messages
Code Block |
---|
run fakeroot debian/rules binary |
This should build a .deb package called nav_messages, in iasdk-public/ros/ros2/src
cd to the next ros2 package root and repeat the above steps
# Install debian packages and check ROS can find them
Note - nav_messages package must be installed first, and nav_launch package must be installed after nav_camera and nav_radar.
This is due to packages being dependent on other pacakges
Code Block |
---|
sudo dpkg -i nav-messages_1.0.0-0jammy_amd64.deb |
Repeat the above for all Navtech ROS packages that you require
## Check ROS can find an installed package
Code Block |
---|
ros2 pkg prefix nav_messages |
The above should show the location of the installed package. Example: /opt/ros/humble