0
$\begingroup$

Rosanswers logo

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


Originally posted by scopus on ROS Answers with karma: 279 on 2014-07-24

Post score: 1


Original comments

Comment by Ken_in_JAPAN on 2014-07-26:
I recommend you to post your problem on another page.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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/174486/about-undefined-symbol-error/?answer=174606#post-id-174606 )


Originally posted by Ken_in_JAPAN with karma: 894 on 2014-07-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by scopus on 2014-07-24:
Thank you very much, It is very helpful.

Comment by Ken_in_JAPAN on 2014-07-25:
@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!

Comment by scopus on 2014-07-25:
Thank you. But it is different situation in my problem . In My CMakelist.txt, target_link_libraries is shown as above.

Comment by Ken_in_JAPAN on 2014-07-25:
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().

$\endgroup$
0
$\begingroup$

Rosanswers logo

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?


Originally posted by David Lu with karma: 10932 on 2014-07-24

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.