Implementing sonars in the navigation stack (ROSARIA)

asked 2020-03-11 08:12:25 -0500

fendrbud gravatar image

updated 2020-03-11 08:18:46 -0500

I'm currently implementing the ROS navigation stack on my Pioneer LX robot with the ROSARIA package as an interface to the robot's drivers. The robot can now perform basic navigation by the use of the SICK S300 laserscanner, consequently, I now want to make use of the four sonar sensors that the Pioneer LX is equipped with. There are two front sonars (2 emitters + 2 receivers), and four rear sonars (2 emitters + 2 receivers) See image below.

I'm not sure how to tackle this problem. My initial thought is to edit the URDF of my robot to include the transforms to each of the eight sonars and then subscribe to the /RosAria/sonar topic in order to read their values. However, having eight separate readings for each sonar doesn't seem ideal.

Are there any packages that combine data from several sonars? Any general suggestions on how to optimally implement the sonar sensors in the navigation stack?

image 1

edit retag flag offensive close merge delete

Comments

Hi @fendrbud,

You do not need to read from all sonars, this is done by ROSARIA that aggregates the sensor data and publishes as a PointCloud and PointCloud2.

For using the sonar for navigation stack, since ROSARIA is giving you the PointCloud, you only have to set up the costmap config files using the point_cloud_sensor plugin.

Weasfas gravatar image Weasfas  ( 2020-03-11 08:46:00 -0500 )edit

Thanks @Weasfas. I have a costmap_common_params.yaml file the look like this:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.35, 0.15], [-0.25, 0.25], [0.25, 0.25], [0.35, 0.15], [0.35, -0.15], [0.25, -0.25], [-0.25, -0.25], [-0.35, -0.15]]
inflation_radius: 0.5
cost_scaling_factor: 5.0

observation_sources: laser_scan_sensor point_cloud_sensor

laser_scan_sensor: {sensor_frame: laser_frame, data_type: LaserScan, topic: /RosAria/S3Series_1_laserscan, marking: true, clearing: true}
point_cloud_sensor: {sensor_frame: sonar_frame, data_type: PointCloud, topic: /RosAria/S3Series_1_pointcloud, marking: true, clearing: true}

Is it the point_cloud_sensor line you are suggesting? I don't have a defined sonar frame for the sonar sensors.

fendrbud gravatar image fendrbud  ( 2020-03-11 09:04:09 -0500 )edit

Yes, I was refering to that plugin. With respect the frame, you can use the one provided in the rosaria topic for the PointCloud, since it is a stamped msgs with header.

Weasfas gravatar image Weasfas  ( 2020-03-11 10:05:16 -0500 )edit

Do you want the range_sensor_layer?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-03-12 01:28:33 -0500 )edit