Ask Your Question
0

Adding a new layer to costmap for avoiding downward stairs for Operator node

asked 2018-05-15 21:30:37 -0500

gerson_n gravatar image

updated 2018-05-22 00:23:05 -0500

Hi everyone!

I'm using ubuntu 16.04 | kinetic version | a real robot and a xbox 360 kinect v1

I'm currently struggling with adding a new layer for costmap2d that consist in detecting downward stairs. This is the package I'm using http://wiki.ros.org/depth_nav_tools . The thing is, I followed the tutorials for creating costmap_2d layers and keep getting errors like this on terminal:

load_parameters: unable to set parameters (last param was [/Mapper/LoopSearchMaximumDistance=4.0]): cannot marshal None unless allow_none is enabled.

Which means, there is one or more parameters set wrongly in one of the yaml files it uses (costmap.yaml from nav2d in my case). But it doesn't happen when I set simple_layer: scan in the declared plugin below, which shouldn't be that way, because "simple_layer:" should be empty.

I installed depth_nav_tools package correctly via catkin_make without any error by the way.

I'm using nav2d package for creating maps with my real robot and at the moment it works fine for me, but in order to recognize and avoid stairs I'm trying to use depth_nav_tools. I know nav2d uses the Operator node for obstacle avoidance using costmap and Karto for generating maps, so when I can add that layer correctly, I'll be able to only store downward stairs as obstacles (an array of points), but not registering them as part of the map, which is what I'm looking for.

With depth_nav_tools package I'm able to use three nodes and there is no problem for that, but for nav_layer_from_points. If you take a quick look at the nav_layer_from_points documentation, the configuration is fine and obey the requirements for creating costmap layers tutorials. So, when I add that layer for costmap.yaml file within opt/ros/kinetic/share/nav2d_tutorials/params/ as a plugin as the following:

plugins:
  - {name: simple_layer, type: "nav_layer_from_points::NavLayerPoints"}

simple_layer: {enabled: true, keep_time: 0.75, point_radius: 0.2, robot_radius: 0.4}

It executes the nodes without any error, but in the mapping mode it doesn't recognizes that layer and delivers this message after killing the set of nav2d nodes:

terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
  what():  Could not find library corresponding to plugin nav_layer_from_points::NavLayerPoints. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
[Operator-1] process has died [pid 31516, exit code -6, cmd /opt/ros/kinetic/lib/nav2d_operator/operator __name:=Operator __log:=/home/neilson/.ros/log/4a1ff076-58dd-11e8-878b-3ca0672cc307/Operator-1.log].
log file: /home/neilson/.ros/log/4a1ff076-58dd-11e8-878b-3ca0672cc307/Operator-1*.log

By that reason I know it doesn't used that layer. Please, can you take a look at the operator documentation ( https://github.com/skasperski/navigat... ) and enlighten me what could be missing.

I added the following for nav2d_operator package.xml file

  <depend>depth_nav_msgs</depend>
  <depend>dynamic_reconfigure</depend>
  <build_depend>pluginlib</build_depend>

<run_depend>pluginlib</run_depend>
<export>
   <costmap_2d plugin="${prefix}/costmap_plugins.xml" />
</export>

And costmap_plugins.xml file (same as costmap_2d costmap_plugins.xml) for nav2d_operator ... (more)

edit retag flag offensive close merge delete

Comments

What does the add_library line of you CMakeLists look like?

David Lu gravatar imageDavid Lu ( 2018-05-16 09:35:56 -0500 )edit

nav_layer_from_points:

add_library(costmap_layers src/costmap_layer.cpp )
add_dependencies(costmap_layers depth_nav_msgs_gencpp ${${PROJECT_NAME}_EXPORTED_TARGETS})

Operator:

add_library(RobotOperator src/RobotOperator.cpp)
target_link_libraries(RobotOperator ${catkin_LIBRARIES
gerson_n gravatar imagegerson_n ( 2018-05-16 13:17:41 -0500 )edit

Those are the unique add_library lines I found. Thanks for your answer @David Lu

gerson_n gravatar imagegerson_n ( 2018-05-16 13:18:56 -0500 )edit

There's no reason to have the libraries from costmap_2d in your costmap_plugins.xml. Does it help to remove them?

David Lu gravatar imageDavid Lu ( 2018-05-16 13:32:42 -0500 )edit

Not really, after removing them it shows the same message. Maybe there is some add_library missing

gerson_n gravatar imagegerson_n ( 2018-05-16 14:10:25 -0500 )edit

lib/libNAMEOFLIBRARY is usually the correct value for path. Make sure you've compiled the package and then re-sourced the path.

David Lu gravatar imageDavid Lu ( 2018-05-16 16:06:03 -0500 )edit

Ohh I see, I had a mess with the path haha. Since that doesn't make any change I'm gonna reinstall depth_nav_tools package to my catkin_ws again via catkin_make. That package it's supposed to be for kinetic, but doesn't appear for installation, althought it doesn't affect to it's functioning.

gerson_n gravatar imagegerson_n ( 2018-05-16 16:32:32 -0500 )edit

I've had the same error message for navigation with move base

  terminate called after throwing an instance of 'pluginlib::CreateClassException'
  what():  MultiLibraryClassLoader: Could not create obj...

Even after resource from the same path after reinstalling depth_nav_tools without errors :(

gerson_n gravatar imagegerson_n ( 2018-05-18 04:34:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-06-20 03:21:51 -0500

zinan_ren gravatar image

Please note that, from latest code branch, the class name of plugin is nav_layer_from_points::NavLayerFromPoints, costmap_plugins.xml and costmap parameter should be in same name.

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

2 followers

Stats

Asked: 2018-05-15 21:30:37 -0500

Seen: 269 times

Last updated: May 22 '18