ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to solve this problem from running a new BaseGlobalPlanner in move_base

asked 2014-07-24 10:28:57 -0500

scopus gravatar image

updated 2014-07-24 23:08:05 -0500

Hi, all, I wrote a global planner by modifying this ompl_planner_base code which is based on OMPL . The original code is an old style, so I modified it to run it in Hydro successfully. I also built it into move_base by following this instruction on ROS wiki. Everything worked fine. But when launch the move_base node, some errors came out:

  [FATAL] [1406215304.849099962]: Failed to create the planner_rrtstar/turtlebot_rrtstar planner, are you sure it is properly registered and that the containing library is built? Exception: Failed to load library /home/turtlebot/moveit/devel/lib//libplanner_rrtstar.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/turtlebot/moveit/devel/lib//libplanner_rrtstar.so: undefined symbol: _ZTVN4ompl4base13SO2StateSpaceE)
[move_base-7] process has died [pid 9966, exit code 1, cmd /opt/ros/hydro/lib/move_base/move_base cmd_vel:=mobile_base/commands/velocity __name:=move_base __log:=/home/turtlebot/.ros/log/369f7f02-1346-11e4-9fc2-40f02f3a602b/move_base-7.log].
log file: /home/turtlebot/.ros/log/369f7f02-1346-11e4-9fc2-40f02f3a602b/move_base-7*.log

The libplanner_rrtstar.so has been generated in /moveit/devel/lib/libplanner_rrtstar.so, so what is the problem? Has anyone encountered same problem before? Any advices are appreciated. Thank you!

Thank @David Lu and @Ken_in_JAPAN! By adding "

 target_link_libraries(
     planner_rrtstar
     ${catkin_LIBRARIES} 
     ${OMPL_LIBRARIES} 
     base_local_planner
)

" in CMAKElist.txt The above errors disappear. But after modifying CMAKElist.txt, other errors came out by running catkin_make:

/usr/bin/ld: cannot find -lbase_local_planner
collect2: ld returned 1 exit status
make[2]: *** [/home/turtlebot/moveit/devel/lib/libplanner_rrtstar.so] Error 1
make[1]: *** [planner_rrtstar/CMakeFiles/planner_rrtstar.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I don't know what "cannot find -lbase_local_planner" means. The libbase_local_planner.so is already underneath /opt/ros/hydro/lib Please give me advice again. Thanks

edit retag flag offensive close merge delete

Comments

I recommend you to post your problem on another page.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-07-26 14:06:36 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-24 14:43:43 -0500

Ken_in_JAPAN gravatar image

I think what @David Lu says is correct. I recommend you check what the error of undefined symbol is. I encountered such an error. This page might be useful for you. ( http://answers.ros.org/question/17448... )

edit flag offensive delete link more

Comments

Thank you very much, It is very helpful.

scopus gravatar image scopus  ( 2014-07-24 22:19:06 -0500 )edit

@scopus, Error /usr/bin/ld: can't find - is written on this page. (http://answers.ros.org/question/50120/catkin-conversion-usrbinld-cannot-find-lpackage_name/). Please check it out!

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-07-25 02:44:24 -0500 )edit

Thank you. But it is different situation in my problem . In My CMakelist.txt, target_link_libraries is shown as above.

scopus gravatar image scopus  ( 2014-07-25 03:36:01 -0500 )edit

I'm sorry, I have never looked at the error. I use one c++ file and one include file only. I mean that I refer the sample of ompl, but I don't use it. I don't use SO2StateSpace().

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-07-25 12:52:01 -0500 )edit
1

answered 2014-07-24 11:39:54 -0500

David Lu gravatar image

The problem is not with your configuration, but with how you are building the planner. The key bit is undefined symbol: _ZTVN4ompl4base13SO2StateSpaceE. Are you linking ompl correctly?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-07-24 10:28:57 -0500

Seen: 1,367 times

Last updated: Jul 24 '14