Ask Your Question

Problem with move_base and plugin

asked 2017-04-20 11:11:17 -0500

nico_b gravatar image

I'm trying to set up my navigation stack as described in the navigation tutorial (3). I'm just using laserscanning data (topic: /scan) as input data. When launching move_base.launch I get the following error message:

[ INFO] [1492703004.522593034]: Using plugin "static_layer"
[ INFO] [1492703004.934024440]: Requesting the map...
[ INFO] [1492703008.961617911]: Resizing costmap to 4000 X 4000 at 0.050000 m/pix
[ INFO] [1492703009.729487121]: Received a 4000 X 4000 map at 0.050000 m/pix
[ INFO] [1492703009.773186553]: Using plugin "obstacle_layer"
[ INFO] [1492703009.846848125]:     Subscribed to Topics: laser_scan_sensor
[ INFO] [1492703010.106286438]: Using plugin "inflation_layer"
[ INFO] [1492703011.212133919]: Using plugin "obstacle_layer"
terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
  what():  Could not find library corresponding to plugin costmap_2d::ObstacleLayer. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
[move_base-3] process has died [pid 21563, exit code -6, cmd /opt/ros/kinetic/share/move_base/move_base __name:=move_base __log:=/home/ubuntu/.ros/log/5d670626-25d8-11e7-9af6-b827ebab1210/move_base-3.log].
log file: /home/ubuntu/.ros/log/5d670626-25d8-11e7-9af6-b827ebab1210/move_base-3*.log

What am I doing wrong? Where is my mistake... I searched the forum for quiet a long time now, but still havn't found a working answer.
Thanks in advance.


  max_vel_x: 0.19
  min_vel_x: 0.095
  max_vel_theta: 0.256
  min_in_place_vel_theta: 0.192

  acc_lim_theta: 3.2
  acc_lim_x: 2.5
  acc_lim_y: 2.5

  holonomic_robot: true


obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[5, 5], [5, 15],[0, 10]]
inflation_radius: 0.55

observation_sources: laser_scan_sensor

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


  global_frame: /odom
  robot_base_frame: base
  update_frequency: 2.0
  static_map: true


  global_frame: odom
  robot_base_frame: base
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05
edit retag flag offensive close merge delete


I'm not trying to be a smart @ss, but did you follow the instructions in the error? "Could not find library corresponding to plugin costmap_2d::ObstacleLayer. Make sure the plugin description XML file has the correct name of the library and that the library actually exists."

billy gravatar image billy  ( 2017-04-20 12:06:10 -0500 )edit

Thanks for the answer and suggestion. I've seen the instruction as well, but I didn't know what that is telling me at all... Does the error message mean the costmap_plugins.xml file in my costmap_2d folder? Or do I have to mess around with the pluginlib.

nico_b gravatar image nico_b  ( 2017-04-20 12:12:18 -0500 )edit

Which version of ROS are you using?

billy gravatar image billy  ( 2017-04-20 14:02:56 -0500 )edit

The obstacle_layer plugin is compiled into the library. Check that this file is present. I just ran it on Kinetic with no problems, so it is possible that something has gone wrong in the environment settings on your computer. Are you running the nav stack from binaries or source?

Geoff gravatar image Geoff  ( 2017-04-20 19:55:28 -0500 )edit

I'm running on Kinetic as well. You mean /opt/ros/kinetic/lib/ I need to have a look at it. Currently I'm running from binaries, since installing from source was not possible on a Rasperry Pi, due to lack of RAM space...

nico_b gravatar image nico_b  ( 2017-04-21 00:40:04 -0500 )edit

What OS are you using on the Pi? Check if the file is at that path. If it is, check that, after setting up your shell for ROS, /opt/ros/kinetic/lib is included in LD_LIBRARY_PATH.

Geoff gravatar image Geoff  ( 2017-04-21 00:48:34 -0500 )edit

I'm running Ubuntu 16.04.2 LTS. /opt/ros/kinetic/lib is also included in LD_LIBRARY_PATH. is also existing. Any other suggestions?

nico_b gravatar image nico_b  ( 2017-04-24 07:51:31 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-04-21 13:11:38 -0500

billy gravatar image

I think that if you're using Kinetic, you need to be explicit with the setup pf the plugins and I don't see that in the code you posted.

  - {name: static_map, type: "costmap_2d::StaticLayer"}
  - {name: obstacles, type: "costmap_2d::VoxelLayer"}
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

  observation_sources: laser_scan_sensor bumper_sensor

  laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true}
  bumper_sensor: {sensor_frame: base_link, data_type: PointCloud2, topic: /pointcloud, marking: true, clearing: false}

  enabled:              true
  cost_scaling_factor:  10.0  # exponential rate at which the obstacle cost drops off (default: 10)
  inflation_radius:     0.3  # max. distance from an obstacle at which costs are incurred for planning paths.

Try setting up like this and see if it corrects.

edit flag offensive delete link more

answered 2017-04-26 10:35:14 -0500

nico_b gravatar image

I managed to compile the navigation package from source. By doing that, I solved that problem.
Thanks a lot for all your support.

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

1 follower


Asked: 2017-04-20 11:11:17 -0500

Seen: 1,283 times

Last updated: Apr 26 '17