Moveit控制机械臂及报错与解决(No motion plan found. No executi-机械臂控制面板

MoveIt控制机械臂的参考程序

python版本(又waypoint)

https://blog.csdn.net/qq_33328642/article/details/122667192

python+cpp版本

https://blog.csdn.net/zzu_seu/article/details/90612876

报错及解决:Fail: ABORTED: No motion plan found. No execution attempted

设置笛卡尔坐标后,使用set_pose_target()设置目标后,再进行plan,会报错:

Fail: ABORTED: No motion plan found. No execution attempted

以下是分析过程:

位置是确定可以到达的,所以首先排除位置不可达的原因。(当然,对于大多数时候,出现这个报错首先应该考虑的是这个位置是否是可达的!)

且使用set_random_target()和set_joint_value_target()都可以,只有set_pose_target()会报错,所以moveit应当是没有问题的

在rviz里选中approx ik solutions是可以正常拖动末端然后使用规划路径的,所以猜测可能和approx这个设置有关。

参考及解决:

https://groups.google.com/g/moveit-users/c/uMG3hZYhYbw

这里提到kdl逆运动学解算插件对低自由度机械臂的逆运动学解算不友好,

所以后面我换了TRAC-IK解算,但是还是不成功。

另一种基于解析解的IKFAST逆运动学解算插件安装配置比较麻烦,所以虽然没有成功,但是我也不想继续尝试了

关于逆运动学解算插件的更换,可以参考古月居:https://mp.weixin.qq.com/s/RdVchbCFA6mUla18qOmBYA

https://answers.ros.org/question/341130/moveit-problem-fail-aborted-no-motion-plan-found-no-execution-attempted/

https://groups.google.com/g/moveit-users/c/h75nDpwOKLk

这两个都是印证我刚刚的猜想,和approx ik solutions设置有关。

如果使用c++的话可以使用函数group.setApproximateJointValueTarget(target_pose1, “link3”);来代替函数group.setPoseTarget(target_pose1,”link3”);(前提是在程序里设置了tolerance)

而是如果使用python的话,可以使用函数set_joint_value_target(pose, string, bool) ,第三个参数确定是否允许误差。

这个函数的第一个参数是允许Pose或PoseStamp类型的,所以可以用作笛卡尔空间的规划,函数的具体说明如下:

def moveit_commander.move_group.MoveGroupCommander.set_joint_value_target ( self,

arg1,

arg2 = None,

arg3 = None

)

Specify a target joint configuration for the group.

if the type of arg1 is one of the following: dict, list, JointState message, then no other arguments should be provided.

The dict should specify pairs of joint variable names and their target values, the list should specify all the variable values

for the group. The JointState message specifies the positions of some single-dof joints.

if the type of arg1 is string, then arg2 is expected to be defined and be either a real value or a list of real values. This is

interpreted as setting a particular joint to a particular value.

if the type of arg1 is Pose or PoseStamped, both arg2 and arg3 could be defined. If arg2 or arg3 are defined, their types must

be either string or bool. The string type argument is interpreted as the end-effector the pose is specified for (default is to use

the default end-effector), and the bool is used to decide whether the pose specified is approximate (default is false). This situation

allows setting the joint target of the group by calling IK. This does not send a pose to the planner and the planner will do no IK.

Instead, one IK solution will be computed first, and that will be sent to the planner.

官网链接:http://docs.ros.org/en/indigo/api/moveit_commander/html/classmoveit__commander_1_1move__group_1_1MoveGroupCommander.html#a55db2d061bbf73d05b9a06df7f31ea39

使用这个函数后就成功啦~

关于moveit的逆运动学解算不适用于低自由度机械臂还在以下地方提到:

https://answers.ros.org/question/240723/fail-aborted-no-motion-plan-found-no-execution-attempted/

https://answers.ros.org/question/342725/moveit-and-4-dof-arm/

https://answers.ros.org/question/332292/how-to-make-an-ik-solver-for-3-dof-robot-arm/

https://answers.ros.org/question/263925/generating-an-ikfast-solution-for-4-dof-arm/

免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:Moveit控制机械臂及报错与解决(No motion plan found. No executi-机械臂控制面板 https://www.yhzz.com.cn/a/8723.html

上一篇 2023-04-19 22:05:20
下一篇 2023-04-19 22:26:10

相关推荐

联系云恒

在线留言: 我要留言
客服热线:400-600-0310
工作时间:周一至周六,08:30-17:30,节假日休息。