具体报错如下:
[rviz2-3] [INFO] [1705847173.040509638] [move_group_interface]: MoveGroup action client/server ready
[move_group-2] [INFO] [1705847173.040743858] [moveit_move_group_default_capabilities.move_action_capability]: Received request
[move_group-2] [INFO] [1705847173.040862796] [moveit_move_group_default_capabilities.move_action_capability]: executing..
[rviz2-3] [INFO] [1705847173.040986760] [move_group_interface]: Planning request accepted
[move_group-2] [INFO] [1705847174.040995682] [moveit_ros.current_state_monitor]: Didn't receive robot state (joint angles) with recent timestamp within 1.000000 seconds. Requested time 1705847173.040878, but latest received state has time 0.000000.
[move_group-2] Check clock synchronization if your are running ROS across multiple machines!
[move_group-2] [WARN] [1705847174.041056221] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Failed to fetch current robot state.
[move_group-2] [INFO] [1705847174.041081014] [moveit_move_group_default_capabilities.move_action_capability]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[move_group-2] [INFO] [1705847174.041087106] [moveit_move_group_capabilities_base.move_group_capability]: Using planning pipeline 'ompl'
[move_group-2] [INFO] [1705847174.041344894] [moveit.ompl_planning.model_based_planning_context]: Planner configuration 'arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[move_group-2] [INFO] [1705847174.089126082] [moveit_move_group_default_capabilities.move_action_capability]: Motion plan was computed successfully.
[rviz2-3] [INFO] [1705847174.089442749] [move_group_interface]: Planning request complete!
[rviz2-3] [INFO] [1705847174.090255513] [move_group_interface]: time taken to generate plan: 0.0152066 seconds
[move_group-2] [INFO] [1705847178.672625403] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Received goal request
[move_group-2] [INFO] [1705847178.672706190] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution request received
[move_group-2] [INFO] [1705847178.672742735] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-2] [INFO] [1705847178.672758080] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-2] [INFO] [1705847178.672801176] [moveit_ros.trajectory_execution_manager]: Validating trajectory with allowed_start_tolerance 0.01
[rviz2-3] [INFO] [1705847178.672787009] [move_group_interface]: Execute request accepted
[move_group-2] [INFO] [1705847179.672904169] [moveit_ros.current_state_monitor]: Didn't receive robot state (joint angles) with recent timestamp within 1.000000 seconds. Requested time 1705847178.672809, but latest received state has time 0.000000.
[move_group-2] Check clock synchronization if your are running ROS across multiple machines!
[move_group-2] [WARN] [1705847179.672932666] [moveit_ros.trajectory_execution_manager]: Failed to validate trajectory: couldn't receive full current joint state within 1s
[move_group-2] [INFO] [1705847179.672968400] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution completed: ABORTED
[rviz2-3] [INFO] [1705847179.673383362] [move_group_interface]: Execute request aborted
[rviz2-3] [ERROR] [1705847179.674026888] [move_group_interface]: MoveGroupInterface::execute() failed or timeout reached
并伴随有ros2 control node 意外停止的报错,对比了官方给的案例的ros2 controllers.yaml文件 ,链接如下,发现我的夹爪控制器type和官方给的不一样,我用moveit_Setup_assistant生成的夹爪控制器类型 gripper_controller:
type: joint_trajectory_controller/JointTrajectoryController,将其修改成
gripper_controller:
type: position_controllers/GripperActionController即可解决问题。
官方文档链接
https://github.com/ros-planning/moveit_resources/blob/2c9c6a8f22c45398f55d74b1a3954db1d408cb33/panda_moveit_config/config/ros2_controllers.yaml#L12