How to solve this problem from running a new BaseGlobalPlanner in move_base
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
I recommend you to post your problem on another page.