Ask Your Question
0

range_sensor_layer::RangeSensorLayer does not exit

asked 2018-04-09 10:47:33 -0500

MarcoStb gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-04-09 13:18:10 -0500

David Lu gravatar image

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

edit flag offensive delete link more

Comments

Thank you very much, David. Stupid me thought it was included in the navigation package and forgot to install it.

MarcoStb gravatar image MarcoStb  ( 2018-04-10 02:07:30 -0500 )edit

No worries. Everyone makes those mistakes.

David Lu gravatar image David Lu  ( 2018-04-10 08:31:06 -0500 )edit

hello, David Lu. When I use range_sensor_layer, should I set the obstacle_layer's type to be "VoxelLayer" or "ObstacleLayer"?

lybhit gravatar image lybhit  ( 2018-05-29 02:50:18 -0500 )edit

Please open your own question rather than ask an unrelated question as a comment on someone else's question.

David Lu gravatar image David Lu  ( 2018-05-29 12:31:56 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2018-04-09 10:47:33 -0500

Seen: 845 times

Last updated: Apr 09 '18