moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.03k stars 508 forks source link

Program stuck in moveit::planning_interface::MoveGroupInterface move_group #432

Closed vtr101 closed 3 years ago

vtr101 commented 3 years ago

Hello,

I've converted the launch and config files from the setup assistant to a ROS2 format using the move group demo as an example and I used that package as a base to using my manipulator with moveit. However, the program hangs on moveit::planning_interface::MoveGroupInterface move_group(move_group_node, PLANNING_GROUP). The package is almost identical to the one used in the demo and my robot model loads in rviz; however, due to the program being stuck, as mentioned, I get errors such as: '[moveit_ros.planning_scene_monitor.planning_scene_monitor]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()?' and can't plan a trajectory.

Does anyone also have this issue and/or can help me with it?

Thank you.

swilcock0 commented 3 years ago

Hey @vtr101 , is it possible to share a link to your launch file and c++? Is get_planning_scene listed if you run ros2 service list or is it possibly given a namespace prefix?

vtr101 commented 3 years ago

Hi, thanks for the response!

Here are my launch and c++ files: https://github.com/vtr101/blank

The get_planning_scene service is not listed at all.

Also, here's the output of ros2 service list:

/clear_octomap /compute_cartesian_path /controller_manager/configure_and_start_controller /controller_manager/configure_controller /controller_manager/describe_parameters /controller_manager/get_parameter_types /controller_manager/get_parameters /controller_manager/list_controller_types /controller_manager/list_controllers /controller_manager/list_hardware_interfaces /controller_manager/list_parameters /controller_manager/load_and_configure_controller /controller_manager/load_and_start_controller /controller_manager/load_controller /controller_manager/reload_controller_libraries /controller_manager/set_parameters /controller_manager/set_parameters_atomically /controller_manager/switch_controller /controller_manager/unload_controller /get_planner_params /interactive_marker_display_93988757501216/describe_parameters /interactive_marker_display_93988757501216/get_parameter_types /interactive_marker_display_93988757501216/get_parameters /interactive_marker_display_93988757501216/list_parameters /interactive_marker_display_93988757501216/set_parameters /interactive_marker_display_93988757501216/set_parameters_atomically /mongodb/describe_parameters /mongodb/get_parameter_types /mongodb/get_parameters /mongodb/list_parameters /mongodb/set_parameters /mongodb/set_parameters_atomically /move_group_interface_node/describe_parameters /move_group_interface_node/get_parameter_types /move_group_interface_node/get_parameters /move_group_interface_node/list_parameters /move_group_interface_node/set_parameters /move_group_interface_node/set_parameters_atomically /move_group_interface_tutorial/describe_parameters /move_group_interface_tutorial/get_parameter_types /move_group_interface_tutorial/get_parameters /move_group_interface_tutorial/list_parameters /move_group_interface_tutorial/set_parameters /move_group_interface_tutorial/set_parameters_atomically /query_planner_interface /robot_state_publisher/describe_parameters /robot_state_publisher/get_parameter_types /robot_state_publisher/get_parameters /robot_state_publisher/list_parameters /robot_state_publisher/set_parameters /robot_state_publisher/set_parameters_atomically /rviz2/describe_parameters /rviz2/get_parameter_types /rviz2/get_parameters /rviz2/list_parameters /rviz2/set_parameters /rviz2/set_parameters_atomically /rviz2_private/describe_parameters /rviz2_private/get_parameter_types /rviz2_private/get_parameters /rviz2_private/list_parameters /rviz2_private/set_parameters /rviz2_private/set_parameters_atomically /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/get_interactive_markers /set_planner_params /static_transform_publisher/describe_parameters /static_transform_publisher/get_parameter_types /static_transform_publisher/get_parameters /static_transform_publisher/list_parameters /static_transform_publisher/set_parameters /static_transform_publisher/set_parameters_atomically

swilcock0 commented 3 years ago

@vtr101 Have you got a customised version of the moveit repo? Line 96 of arm4agrob_4Manipulator.launch.py points to the arm4agrob_moveit2 package rather than moveit_ros_move_group. This is likely messing with move group loading its capabilities - Move Group uses the plugin loader with moveit_ros_move_group.

So, try to set the package as moveit_ros_move_group - or if you've renamed the package in the moveit repo, switch it back!

vtr101 commented 3 years ago

I was pointing to the wrong package the whole time. It's solved now! Thank you!