Ask Your Question
0

Turtlebot3 with range_sensor_layer problem

asked 2019-11-04 04:39:29 -0600

reno gravatar image

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 range_sensor_layer I loose inflation_layer and "obstacle_layer

As you can see there are no any inflations and obstacles: image description

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 :

image description

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?

edit retag flag offensive close merge delete

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

BrunoCoto gravatar image BrunoCoto  ( 2020-02-19 06:00:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-27 02:02:21 -0600

Krenshow gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-11-04 04:39:29 -0600

Seen: 140 times

Last updated: Feb 19 '20