Ultrasonic sensor with range_sensor_layer forming obstacle behind sensor line in RVIZ
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):
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.