ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Ultrasonic sensor with range_sensor_layer forming obstacle behind sensor line in RVIZ

asked 2021-05-04 01:51:37 -0500

updated 2022-04-30 13:27:19 -0500

lucasw gravatar image

Hi,

I'm trying to integrate an ultrasonic sensor to the costmap using range_sensor_layer, I am able to form and marking the obstacle in the costmap. I have enabled clear_on_max_reading to TRUE, thus any obstacle will be cleared on max reading without any issue.

Ultrasonic model : Grove- Ultrasonic Ranger

Now, there is one problem with my setup: 1. If the obstacle become too close to the sensor, the marking (orb/arc) formed right in front of sensor (goes behind it too) and within robot footprint's body, and removing the obstacle does not clear the marking. this cause the robot wont move due to unclear path.

Below: Costmap with range_sensor_layer plugin active, I move the object until it become too close to the sensor and remove the object, the obstacle marking still there (the rest of the obstacle marking successfully removed):

image description

That abnormal orb does not cause any issue to mark new obstacles, and this new obstacles can be remove without problem.

Below is portion of parameter for ultrasonic sensor. costmap_common_params.yaml:

robot_radius: 0.2
map_type: voxel
obstacle_layer:
  enabled:              true
  max_obstacle_height:  0.6
  origin_z:             0.0
  z_resolution:         0.2
  z_voxels:             2
  unknown_threshold:    15
  mark_threshold:       0
  combination_method:   1
  track_unknown_space:  true
  obstacle_range: 2.5
  raytrace_range: 3.0
  origin_z: 0.0
  z_resolution: 0.2
  z_voxels: 2
  publish_voxel_map: false
  observation_sources:  scan bump

  range_sensor_layer:
     clear_threshold:    0.46
     mark_threshold:     0.98
     clear_on_max_reading: true
     clearing: true
     topics: ['/sonic']

Is there some important parameter that I overlook or miss?

I have tried to increase the min_range in my ultrasonic.py to 0.1, this will clip any value in between 0 to 0.1 hence solve the problem, but this will add '0.1' blind spot in front of robot (ultrasonic attached infront) itself. Which I would like to explore the possibilities to use min_range = 0.0 without causing any leftover marking when cleared.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-04 07:01:32 -0500

miura gravatar image

It is possible that the sensed result is being ignored because it overlaps with the robot in the configuration.

Make robot_radius smaller. Or, changing the position of the sensor frame may improve the situation.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2021-05-04 01:51:37 -0500

Seen: 197 times

Last updated: May 04 '21