完美解决 [ERROR] Unable to identify any set of controllers that can actuate the specified joints 非命名空间问题

项目场景:

在跟着古月学ROS过程,无法利用moveit + gazebo对机械臂进行仿真,表现为在moveit中可以进行plan,但是无法execute,即机械臂在gazebo中无法运动,终端报错如下:


问题描述

报错:

[ERROR] [1722672782.967956296, 19.158000000]: Unable to identify any set of controllers that can actuate the specified joints: [ joint1 joint2 joint3 joint4 joint5 joint6 ]
[ERROR] [1722672782.967970834, 19.158000000]: Known controllers and their joints:


原因分析:

看起来就是moveit与gazebo的控制没有对应起来,网上搜的大部分解决方案主要是检查命名空间以及运动规划组的名称问题,比如moveit! 与 gazebo 仿真中的问题:Unable to identify any set of controllers that can actuate the specified..._unable to identify any set of controllers that can-CSDN博客

但是检查无数次也没发现名词有什么问题,再有解决方案是说加载控制器的配置问题,比如Moveit报错:Unable to identify any set of controllers that can actuate the specified joints-CSDN博客

发现还是解决不了,不过未加载配置确实就是核心问题。


解决方案:

未能正确加载控制器配置的根源在于ROS的版本不一样了,我用的是noetic,而很多教程是之前的版本,我就说我这个版本的moveit配置

找到marm_moveit_config/launch/move_group.launch,找到对应代码


  <!-- move_group settings -->
  <arg name="pipeline" default="ompl" />
  <arg name="allow_trajectory_execution" default="true"/>

  <!-- 问题出现在这行代码了 -->
  <arg name="moveit_controller_manager" default="simple" />

  <arg name="fake_execution_type" default="interpolate"/>
  <arg name="max_safe_path_cost" default="1"/>
  <arg name="publish_monitored_planning_scene" default="true"/>

这个simple默认值直接将后面控制器配置trajectory_execution.launch.xml文件中这行代码

<!-- We use pass_all_args=true here to pass fake_execution_type, which is required by fake controllers, but not by real-robot controllers.
       As real-robot controller_manager.launch files shouldn't be required to define this argument, we use the trick of passing all args. -->
  <include file="$(dirname)/$(arg moveit_controller_manager)_moveit_controller_manager.launch.xml"/>

加载成simple__moveit_controller_manager.launch.xml,而这个文件加载的配置是simple_moveit_controllers.yaml

因此解决方案有两个,第一种是改marm_moveit_config/launch/move_group.launch的代码,将simple改成你的机器人命名,如arm


  <!-- move_group settings -->
  <arg name="pipeline" default="ompl" />
  <arg name="allow_trajectory_execution" default="true"/>

  <!-- 改这行 -->
  <arg name="moveit_controller_manager" default="arm" />

  <arg name="fake_execution_type" default="interpolate"/>
  <arg name="max_safe_path_cost" default="1"/>
  <arg name="publish_monitored_planning_scene" default="true"/>

第二种就是将控制器配置写在simple_moveit_controllers.yaml中,如下:

两种方法均可解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jiang_Tesla

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值