1. 问题描述
在古月的gazebo机械臂仿真课程中,发现在启动仿真环境$ roslaunch marm_gazebo arm_bringup_moveit.launch时,moveit可以规划plan,但是点击执行execute时出现失败。
在终端中发现出现报错:
[ERROR] [1606720828.108327956,173.719000000]: Unable to identify any set of controllers that can actuate the specified joints: [ joint1 joint2 joint3 joint4 joLnt5 joint6 ]
[ERROR] [1606720828.108344184,173.719000000]: Known controllers and their joints:
[ERROR][1606720828.108361472,173.719000000]: Apparently trajectory initialization failed
2. 解决方案
解决方案分为两步
2.1 步骤一
如果在刚开始运行
roslaunch marm_gazebo arm_bringup_moveit.launch
时,发现如下错误
那么需要安装以下包
sudo apt-get install ros-melodic-joint-trajectory-controller
然后重新打开gazebo
2.2 步骤二
以上解决方案并不能直接解决点击执行execute时出现失败的问题,但是能够启动相应的action,是第二步的基础。
对于点击执行execute时出现如下错误:
[ERROR] [1606720828.108327956,173.719000000]: Unable to identify any set of controllers that can actuate the specified joints: [ joint1 joint2 joint3 joint4 joLnt5 joint6 ]
[ERROR] [1606720828.108344184,173.719000000]: Known controllers and their joints:
[ERROR][1606720828.108361472,173.719000000]: Apparently trajectory initialization failed
解决方案为:修改marm_moveit_config/launch/arm_moveit_controller_manager.launch文件
将下图的红框部分删除或者注释掉(这好像是moveit配置程序自动生成的一个.yaml文件),修改为红框上面的语句:
<rosparam file="$(find marm_moveit_config)/config/controllers.yaml" />
保存后在工作空间catkin_make一下,然后重新运行
roslaunch marm_gazebo arm_bringup_moveit.launch
即可