0

Rosanswers logo

Hi

I have a robot with an RPLidar sensor on top and would like to add an ultrasonic sensor to identify and avoid obstacles that are below the LIDAR line. It is possible?

My robot:

image description

Let's say the ultrasonic sensor publishes distance values less than one meter in the topic /ultrasonic_readings and the ultrasonic sensor link is called ultrasonic_link . I believe the ultrasonic sensor readings should be put into the cost maps (global and local), but I'm not sure how to do this. Has anyone done something like that?

costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.045,-0.10],[-0.045,0.10],[0.17,0.10],[0.17,-0.10]]

observation_sources: scan scan: {sensor_frame: rplidar_link, observation_persistence: 0.0, max_obstacle_height: 0.4, min_obstacle_height: 0.0, data_type: LaserScan, topic: /scan, marking: true, clearing: true}

inflation_layer:
inflation_radius: 0.3 cost_scaling_factor: 3.0

local_costmap_params.yaml:

local_costmap:
  global_frame: /odom 
  robot_base_frame: /base_footprint
  update_frequency: 7.0
  publish_frequency: 7.0
  static_map: false
  rolling_window: true
  width: 2.0 
  height: 2.0 
  resolution: 0.02 
  transform_tolerance: 0.5 

global_costmap_params.yaml:

global_costmap:
  global_frame: /map
  robot_base_frame: /base_footprint
  transform_tolerance: 0.5 
  update_frequency: 7.0
  publish_frequency: 7.0 
  static_map: true
  rolling_window: false

thanks


Originally posted by mateusguilherme on ROS Answers with karma: 125 on 2021-08-05

Post score: 1

1 Answers1

0

Rosanswers logo

It is possible. By setting the plugins parameter, you can stack multiple cost maps. I found a QA that is working on something similar, please refer to it.

https://answers.ros.org/question/206805/adding-range_sensor_layer-to-layered-costmap-for-global-planning/


Originally posted by miura with karma: 1908 on 2021-08-05

This answer was ACCEPTED on the original site

Post score: 0