ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
or you could just use a range sensor layer: http://wiki.ros.org/range_sensor_layer
2 | No.2 Revision |
or you You could just use a range sensor layer: http://wiki.ros.org/range_sensor_layer
The idea is that the laser adds to the obstacle layer as usual and the sonar add to a separate range sensor layer, then both are combined to the costmap.
Of yourse you need to switch your configuration to layered costmaps first.
My global_costmap_params.yaml (partial):
plugins:
- {name: static_layer, type: 'costmap_2d::StaticLayer'}
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
My local_costmap_params.yaml (partial):
plugins:
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
sonar_layer:
topics: ["/sonar_forward_lower"]
no_readings_timeout: 1.0