其实在启动demo.launch.py 文件时,就发现终端回报错
[spawner-6] [FATAL] [1706014276.999011394] [spawner_gripper_controller]:Failed loading controller gripper_controller
[ERROR] [spawner-6]: process has died
这个arm_controller都没加载出来想必夹爪也就不会执行规划后的结果。于是找到我的文件包中跟夹爪控制器文件相关的是moveit_controllers.yaml文件,和官方文(gripper_moveit_controllers.yaml)对比,发现type、action_ns和官方文件不一样,改成一样,发现没效果,继续寻找abb_irb2400.ros2_control.xacro文件,对比官方文件(panda_hand.ros2_control.xacro)少了
<joint name="panda_finger_joint2">
<param name="mimic">panda_finger_joint1</param>
<param name="multiplier">1</param>
<command_interface name="position" />
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_finger_joint1']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
也就是少了一个关节,补上去问题解决。
官方文档链接:
https://github.com/ros-planning/moveit_resources/blob/2c9c6a8f22c45398f55d74b1a3954db1d408cb33/panda_moveit_config/config/gripper_moveit_controllers.yaml
https://github.com/ros-planning/moveit_resources/blob/2c9c6a8f22c45398f55d74b1a3954db1d408cb33/panda_moveit_config/config/panda_hand.ros2_control.xacro