Unable to identify any set of controllers that can actuate the specified joints:

本文档详细介绍了如何修复ROS UR5机器人在使用MoveIt!时遇到的控制器识别错误。错误表现为无法识别指定关节的控制器。解决方法包括修改`ur5_moveit_controller_manager.launch.xml`文件,将引用`ros_controllers.yaml`替换为`controllers.yaml`。然而,发现`controllers.yaml`文件缺失,从正常运行的配置包中复制`controllers.yaml`并替换。修复后,机械臂能够正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


背景

具体的报错如下:
[ERROR] [1649324583.023988413]: Unable to identify any set of controllers that can actuate the specified joints: [ elbow_joint shoulder_lift_joint shoulder_pan_joint wrist_1_joint wrist_2_joint wrist_3_joint ]
[ERROR] [1649324583.024022449]: Known controllers and their joints:

[ERROR] [1649324583.024088233]: Apparently trajectory initialization failed

[ERROR] [1649324583.023988413]: Unable to identify any set of controllers that can actuate the specified joints: [ elbow_joint shoulder_lift_joint shoulder_pan_joint wrist_1_joint wrist_2_joint wrist_3_joint ]
[ERROR] [1649324583.024022449]: Known controllers and their joints:

[ERROR] [1649324583.024088233]: Apparently trajectory initialization failed


``

一、解决办法

这个链接的方法是修改marm_moveit_config/launch/arm_moveit_controller_manager.launch文件.对照我自己的,就是修改ur5_moveit_controller_manager.launch.xml文件,将原来的<rosparam file="$(find ur5_moveit_config_)/config/ros_controllers.yaml"/>注释掉,替换成<rosparam file="$(find ur5_moveit_config_)/config/controllers.yaml"/>
在这里插入图片描述
修改以后的结果为:

<launch>

  <!-- loads moveit_controller_manager on the parameter server which is taken as argument 
    if no argument is passed, moveit_simple_controller_manager will be set -->
  <arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
  <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

  <!-- loads ros_controllers to the param server -->
  <!--rosparam file="$(find ur5_moveit_config_)/config/ros_controllers.yaml"/-->
  <rosparam file="$(find ur5_moveit_config_)/config/controllers.yaml"/>
  
</launch>

但打开ur5_moveit_config_/config/这个路径,并没有controllers.yaml这个文件,有的是ros_controllers.yaml这个文件,ros_controllers.yaml是通过ur5_moveit_setupassistant生成的.里面的文件内容如下:

ros_controllers.yaml

# Simulation settings for using moveit_sim_controllers
moveit_sim_hw_interface:
  joint_model_group: manipulator
  joint_model_group_pose: home
# Settings for ros_control_boilerplate control loop
generic_hw_control_loop:
  loop_hz: 300
  cycle_time_error_threshold: 0.01
# Settings for ros_control hardware interface
hardware_interface:
  joints:
    - shoulder_pan_joint
    - shoulder_lift_joint
    - elbow_joint
    - wrist_1_joint
    - wrist_2_joint
    - wrist_3_joint
  sim_control_mode: 1  # 0: position, 1: velocity
# Publish all joint states
# Creates the /joint_states topic necessary in ROS
joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50
controller_list:
  []

注意到这里的controller_list:是空的,而我电脑上之前另一个正常运行的ur5_moveit_config包,内容如下:
controllers.yaml:

controller_list:
  - name: ""
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    joints:
      - shoulder_pan_joint
      - shoulder_lift_joint
      - elbow_joint
      - wrist_1_joint
      - wrist_2_joint
      - wrist_3_joint

注意到这里面的controller_list是有内容的,因此把这个controllers.yaml复制粘贴在/home/neousys/wqw/pick_place/src/universal_robot/ur5_moveit_config_/config这个路径下即可,不再发生这个报错,机械臂正常运行

二、总结

总共两步,第一步修改ur5_moveit_controller_manager.launch.xml,将将原来的<rosparam file="$(find ur5_moveit_config_)/config/ros_controllers.yaml"/>注释掉,替换成<rosparam file="$(find ur5_moveit_config_)/config/controllers.yaml"/>

第二步,到别的地方复制OK的controllers.yaml文件粘贴到对应的路径下

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值