Robotics StackExchange | Archived questions

How to use and combine ultrasonic sensors in ROS navigation stack with RPLiDAR sensor?

We are using Ubuntu 20.04, ROS 1, and Noetic as the distro. Our program is about making a wheelchair autonomous by having auto-navigation and obstacle avoidance features. ROS Navigation Stack is used for the auto-navigation of our wheelchair and RPLiDAR sensor is integrated as the main sensor but we are also planning on adding two ultrasonic sensors (one in front and one at the back) for more accurate obstacle detection. The program for the ultrasonic sensors is in Arduino. How can we combine the RPLiDAR and ultrasonic sensors in ROS to serve as obstacle detection sensors for obstacle avoidance feature?

Asked by kwis on 2023-03-22 02:28:21 UTC

Comments

Answers

In your costmap configuration, include the obstacle marking from both sensors using:

observation_sources: laser_scan_sensor us_sensor_data

laser_scan_sensor: {sensor_frame: link, data_type: LaserScan, topic: /scan, marking: true, clearing: true}

us_sensor_data: {sensor_frame: link, data_type: Range, topic: /us_data_topic, marking: true, clearing: true}

This will result in data from both sensors to mark obstacles in your costmaps.

Asked by chased11 on 2023-03-22 23:37:44 UTC

Comments