Turtlebot3 with range_sensor_layer problem
Hi all,
I'm using Turtlebot3 waflle with LIDAR and everything works great. But I also wanted to add few Pololu VL53L0X sensors to detect obstacles that are under LIDAR. Sensors are working but I'm having problem defining range_sensor_layer
in local_costmap_params.yaml
As soon as I include rangesensorlayer I loose inflation_layer
and "obstacle_layer
As you can see there are no any inflations and obstacles:
By calling rosparam get /move_base/local_costmap/plugins
I get following:
- {name: range_layer, type: 'range_sensor_layer::RangeSensorLayer'}
When I remove range_sensor_layer
from local_costmap_params.yaml
everything is working again :
By calling rosparam get /move_base/local_costmap/plugins
I get following:
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
Looks like range_sensor_layer
is making problems for Obstacle and Inflation layers to work.
Full local_costmap_params.yaml
:
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: false
rolling_window: true
width: 3
height: 3
resolution: 0.025
plugins:
- {name: range_layer, type: 'range_sensor_layer::RangeSensorLayer'}
range_layer:
topics: ["/tof1", "/tof2", "/tof3", "/tof4", "/tof5"]
clear_threshold: 1.0
mark_threshold: 8.0
clear_on_max_reading: true
Any idea what is causing this problem and how to fix it?
Asked by reno on 2019-11-04 05:39:29 UTC
Answers
Hello, I have the same problem. It seems, when you use range_sensor_layer, other layers just disconnected for turtlebot3. I am not sure, just guessing. I fix this problem by adding other layers manually:
global_costmap_params.yaml
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: sonar, type: "range_sensor_layer::RangeSensorLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
obstacle_layer:
observation_sources: scan
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}
sonar:
topics: ["/sonar_front"]
clear_on_max_reading: true
local_costmap_params.yaml
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: sonar, type: "range_sensor_layer::RangeSensorLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
sonar:
topics: ["/sonar_front"]
However, then you have to specify parameters for those layers because they have default values. For example, in costmap_common_params.yaml
#Obstacle marking parameters
obstacle_range: 1.8
max_obstacle_height: 2.0
raytrace_range: 2.0
#Cost function parameters
inflation_radius: 3.0
cost_scaling_factor: 10.0
#The cost at which a cell is considered an obstacle when a map is read from the map_server
lethal_cost_threshold: 100
For other parameters search ros wiki.
Asked by Krenshow on 2020-02-27 03:02:21 UTC
Comments
Hello, I am trying to use the lidar of turtlebo3 burger in combination with a IR sensor to avoid obstacles at a certain height but I do not succeed, did you solve your problem? Thank you
Asked by BrunoCoto on 2020-02-19 07:00:20 UTC