[ERROR] : Action client not connected: /follow_joint_trajectory

ur5真机连接报错

ur5真机连接报错踩坑

运行roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch

报错
[ WARN] : Waiting for /follow_joint_trajectory to come up
[ WARN] : Waiting for /follow_joint_trajectory to come up
[ERROR] : Action client not connected: /follow_joint_trajectory

使用moveit规划真机成功后,点击执行,终端报错
Unable to identify any set of controllers that can actuate the specified joints:
[ERROR] : Known controllers and their joints:
[ERROR] : Apparently trajectory initialization failed

解决办法:
找到/ur_modern_driver/config/ur5_controllers.yaml
最后加入

controller_list:
 - name: /vel_based_pos_traj_controller #or /pos_based_pos_traj_controller
   action_ns: follow_joint_trajectory
   type: FollowJointTrajectory
   default: true
   joints:
      - shoulder_pan_joint
      - shoulder_lift_joint
      - elbow_joint
      - wrist_1_joint
      - wrist_2_joint
      - wrist_3_joint