AinsteinAI / ainstein_radar

ROS support for Ainstein radar sensors.
BSD 3-Clause "New" or "Revised" License
45 stars 20 forks source link

Add Support for Multiple Radars #34

Open ColtenBecker opened 1 year ago

ColtenBecker commented 1 year ago

Summary

This PR adds support for visualizing and recording data with multiple radar nodes. The following files have been added to support this (no previous ainstein_radar code has been modified):

multi_radar_model.launch

The launch file handles passing in the necessary arguments to the multiple_radars.urdf file, launching the robot_state_publisher and publishing the static base_link transform.

Argument descriptions:

multiple_radars.urdf

This file is used to setup the position and orientation of each radar in the ROS environment. A parameters file must be passed in to specify the quantity and position/orientation of each radar.

multiple_radars.yaml

This file provides input to the multiple_radars.urdf file. By default it is configured for two O-79 radars. The amount of radars can be increased by adjusting the radar_qty value and adding additional radar configs of the same structure as radar1 and radar2. Take a look at the file for more information and examples of how to setup this file.

o79_multiple_radars.launch

Launch file for running multiple O-79 radars and a camera.

By default this launch file sets up the CAN and UDP nodes for two O-79 radars and a camera. The camera, CAN or UDP nodes can be disabled with the arguments at the top of the launch file (see image below).

image

Additional radars can be added to the launch file by simply copying the format used for radar1 and radar2 in the file. Radar names must start at 1 and increment by 1 (radar1, radar2, radar3, etc...). The multiple_radars.yaml must also be updated to support any additional radars added.

This same launch file format can be used to display radar nodes other than O-79 as long as the frame_id is set appropriately for the node. The format must be "radar{#}_link" depending on the radar number (i.e. "radar1_link", "radar2_link", etc..).

After running the launch file, the data can be visualized in RViz by running the following command in a separate terminal window:

rosrun rviz rviz -d `rospack find ainstein_radar_drivers`/rviz/o79_2_radars.rviz

The user can update or change this rviz configuration as needed. By default it is configured to show two radars and a camera.

multi_radar_offline.launch

This launch file is for playing back data recorded using the multi_radar_model using the rqt_bag GUI.

The configuration file used for RViz is passed in as an argument, the default value uses the o79_2_radars.rviz configuration file.

o79_2_radars.rviz

RViz configuration file for running o79_multiple_radars.launch.

To easily add additional O-79 radars to the configuration you can duplicate folders as desired and rename and change topics accordingly.