ros-planning / navigation_experimental

Experimental navigation techniques for ROS robots.
306 stars 140 forks source link

pose_follower package in ROS navigation stack #10

Closed PooyanF closed 9 years ago

PooyanF commented 9 years ago

Hello,

I am trying to add the pose_follower package as a plugin to the navigation stack (ROS Hydro, Ubuntu 12.04). I followed the guide here (http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS) to do this and everything compiles fine, and the new plugin is available by nav_core (rospack plugins --attrib=plugin nav_core), but when I am running the navigation, I get the error below:

[ INFO] [1417068766.032804515]: Using plugin "static_layer" [ INFO] [1417068766.131730337]: Requesting the map... [ INFO] [1417068766.473023497]: Resizing costmap to 4000 X 4000 at 0.050000 m/pix [ INFO] [1417068766.593126231]: Received a 4000 X 4000 map at 0.050000 m/pix [ INFO] [1417068766.609460784]: Using plugin "obstacle_layer" [ INFO] [1417068766.636893038]: Subscribed to Topics: [ INFO] [1417068766.786537389]: Using plugin "inflation_layer" [ INFO] [1417068767.228129165]: Using plugin "obstacle_layer" [ INFO] [1417068767.351801435]: Subscribed to Topics: [ INFO] [1417068767.416552886]: Using plugin "inflation_layer" /opt/ros/hydro/lib/move_base/move_base: symbol lookup error: /home/yan/myrobot/shark/devel/lib//libpose_follower_lib.so: undefined symbol: _ZN18base_local_planner20TrajectoryPlannerROSC1Ev [move_base-6] process has died [pid 2430, exit code 127, cmd /opt/ros/hydro/lib/move_base/move_base odom:=shark/odom __name:=move_base __log:=/home/yan/.ros/log/f8e767fa-6909-11e4-9bd3-0024e832832e/move_base-6.log]. log file: /home/yan/.ros/log/f8e767fa-6909-11e4-9bd3-0024e832832e/move_base-6*.log

Running

c++filt _ZN18base_local_planner20TrajectoryPlannerROSC1Ev

outputs

base_local_planner::TrajectoryPlannerROS::TrajectoryPlannerROS()

but the issue is base_local_planner exists in my CMakeLists.txt File

cmake_minimum_required(VERSION 2.8.3) project(pose_follower)

find_package(catkin REQUIRED COMPONENTS base_local_planner cmake_modules costmap_2d dynamic_reconfigure move_base move_base_msgs actionlib roscpp nav_core tf nav_msgs pluginlib )

catkin_package( INCLUDE_DIRS include LIBRARIES pose_follower CATKIN_DEPENDS base_local_planner cmake_modules costmap_2d dynamic_reconfigure move_base move_base_msgs actionlib roscpp nav_core tf nav_msgs pluginlib )

include_directories( include ${catkin_INCLUDE_DIRS} )

link_directories(${catkin_LIBRARY_DIRS})

add_executable(pose_follower src/pose_follower.cpp) target_link_libraries(pose_follower ${catkin_LIBRARIES} base_local_planner)

add_library(pose_follower_lib src/pose_follower.cpp)

add_dependencies(pose_follower nav_msgs_gencpp)

install(FILES blp_plugin.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} )

install(DIRECTORY include/pose_follower DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} PATTERN "*~" EXCLUDE )

install(TARGETS pose_follower ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )

I also explicitly added trajectory_planner_ros library to the target_link_libraries() (target_link_libraries(pose_follower ${catkin_LIBRARIES} trajectory_planner_ros base_local_planner)), but still getting the same error

Any thoughts?

mikeferguson commented 9 years ago

so, the error message is talking about pose_follower_lib, not pose_follower -- pose_follower_lib has no target_link_libraries -- I'm guessing that is the problem.

PooyanF commented 9 years ago

Thanks a lot Mike. I added another target_link_libraries after add_library in my CMakeLists.txt, and it fixed the error:

add_library(pose_follower_lib src/pose_follower.cpp) target_link_libraries(pose_follower_lib ${catkin_LIBRARIES} trajectory_planner_ros)

Although it seems pose_follower is not compatible with navfn global planner, and the robot is not moving

mikeferguson commented 9 years ago

well, the pose follower is a local planner -- it just follows the original plan generated by the global plan.

PooyanF commented 9 years ago

This is what I found in an old post: http://permalink.gmane.org/gmane.science.robotics.ros.user/8238

mikeferguson commented 9 years ago

Yeah, so that post tells you it is a local planner -- it just follows the waypoints either generated by a global planner or by hand. Because of this the waypoints need to have orientation too, which I don't think navfn does.

PooyanF commented 9 years ago

global_planner (http://wiki.ros.org/global_planner) might be different than navfn?

DLu commented 9 years ago

It's not different yet. Was thinking of implementing it soon though.

PooyanF commented 9 years ago

Thanks David. So it seems currently the only option to get this pose_follower to work is to use sbpl_lattice_planner as global planner, if I'm not wrong. I'm trying to get these two to work on Hydro now.

mikeferguson commented 9 years ago

@ROSCMBOT is there a specific reason you are trying to use the pose_follower? My understanding is that pose_follower was originally created to play back simple trajectories that were created for the PR2 beta workshop parade. I think Eitan recommended against using the pose_follower in production use.

PooyanF commented 9 years ago

@mikeferguson I'm trying to implement this behaviour: http://answers.ros.org/question/196854/waypoint-navigation-simplified-local-planner/

and as I understand pose_follower is doing this

DLu commented 9 years ago

https://github.com/DLu/navigation/tree/global_planner_orientation/global_planner Global Planner with different orientation_modes (dynamic parameter) adds orientation to the global planner.

l0g1x commented 9 years ago

Would any of you happen to know of another local planner besides pose follower that allows for backward motions?

DLu commented 9 years ago

@l0g1x DWA planner can do backward motions.

@ROSCMBOT Can we close this ticket, or at least change it to a more specific problem?