0
$\begingroup$

Rosanswers logo

Hi, I'm using ROS Kinetic and I'm currently trying to set up the navigation package. I've got a hexapod with a lidar on top and navigation is working fine for this configuration. But recently I added an ultrasonic sensor to the front to avoid bumping into glas doors and unfortunately I can't get the range_sensor_layer to run.

This is my costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.3, 0.3], [0.3, -0.3], [-0.3, -0.3], [-0.3, 0.3]]
#robot_radius: ir_of_robot
inflation_radius: 0.35


observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true}

plugins:
  - {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"} 

sonar_layer:
  topics: ["/us/range"]

My local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

And my global_costmap_params.yaml:

global_costmap:
  global_frame: /map
  robot_base_frame: base_footprint
  update_frequency: 5.0
  static_map: true

When I try to launch navigation I get this error, which leads to the process move_base dying:

[ INFO] [1455210855.302734798]: Using plugin "sonar_layer" terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
what(): According to the loaded plugin descriptions the class range_sensor_layer::RangeSensorLayer with base class type costmap_2d::Layer does not exist. Declared types are costmap_2d::InflationLayer costmap_2d::ObstacleLayer costmap_2d::StaticLayer costmap_2d::VoxelLayer rtabmap_ros::StaticLayer

I tried to put the plugins-tag into local_costmap_params.yaml already which lets navigation get launched but it will ignore the range-message for obstacle detection. The topic \us\range is not subscribed by any other node in this configuration.

Is there anything I did wrong with including the range_sensor_layer-plugin for navigation?


Originally posted by MarcoStb on ROS Answers with karma: 80 on 2018-04-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Have you installed ros-kinetic-range-sensor-layer?


Originally posted by David Lu with karma: 10932 on 2018-04-09

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by MarcoStb on 2018-04-10:
Thank you very much, David. Stupid me thought it was included in the navigation package and forgot to install it.

Comment by David Lu on 2018-04-10:
No worries. Everyone makes those mistakes.

Comment by lybhit on 2018-05-29:
hello, David Lu. When I use range_sensor_layer, should I set the obstacle_layer's type to be "VoxelLayer" or "ObstacleLayer"?

Comment by David Lu on 2018-05-29:
Please open your own question rather than ask an unrelated question as a comment on someone else's question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.