Problem with move_base and plugin
Hi,
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.
baselocalplanner_params.yaml
TrajectoryPlannerROS:
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
costmapcommonparams.yaml
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}
globalcostmapparams.yaml
global_costmap:
global_frame: /odom
robot_base_frame: base
update_frequency: 2.0
static_map: true
localcostmapparams.yaml
local_costmap:
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
Asked by nico_b on 2017-04-20 11:11:17 UTC
Answers
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.
plugins:
- {name: static_map, type: "costmap_2d::StaticLayer"}
- {name: obstacles, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
obstacles:
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}
inflation_layer:
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.
Asked by billy on 2017-04-21 13:11:38 UTC
Comments
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."
Asked by billy on 2017-04-20 12:06:10 UTC
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.
Asked by nico_b on 2017-04-20 12:12:18 UTC
Which version of ROS are you using?
Asked by billy on 2017-04-20 14:02:56 UTC
The
obstacle_layer
plugin is compiled into the liblayers.so 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?Asked by Geoff on 2017-04-20 19:55:28 UTC
I'm running on Kinetic as well. You mean
/opt/ros/kinetic/lib/liblayers.so
? 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...Asked by nico_b on 2017-04-21 00:40:04 UTC
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 inLD_LIBRARY_PATH
.Asked by Geoff on 2017-04-21 00:48:34 UTC
I'm running Ubuntu 16.04.2 LTS.
/opt/ros/kinetic/lib
is also included inLD_LIBRARY_PATH
.liblayers.so
is also existing. Any other suggestions?Asked by nico_b on 2017-04-24 07:51:31 UTC