mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 21:35:09 +00:00
fix move it
This commit is contained in:
@@ -292,9 +292,17 @@ class MoveitInterface:
|
|||||||
)
|
)
|
||||||
end_pose = deep_pose
|
end_pose = deep_pose
|
||||||
|
|
||||||
retval_ik = self.moveit2[cmd_dict["move_group"]].compute_ik(
|
retval_ik = None
|
||||||
position=end_pose, quat_xyzw=quaternion, constraints=Constraints(joint_constraints=constraints)
|
retry = config.get("retry", 10)
|
||||||
)
|
while retval_ik is None and retry > 0:
|
||||||
|
retval_ik = self.moveit2[cmd_dict["move_group"]].compute_ik(
|
||||||
|
position=end_pose, quat_xyzw=quaternion, constraints=Constraints(joint_constraints=constraints)
|
||||||
|
)
|
||||||
|
time.sleep(0.1)
|
||||||
|
retry -= 1
|
||||||
|
if retval_ik is None:
|
||||||
|
result.success = False
|
||||||
|
return result
|
||||||
position_ = [
|
position_ = [
|
||||||
retval_ik.position[retval_ik.name.index(i)]
|
retval_ik.position[retval_ik.name.index(i)]
|
||||||
for i in self.moveit2[cmd_dict["move_group"]].joint_names
|
for i in self.moveit2[cmd_dict["move_group"]].joint_names
|
||||||
|
|||||||
Reference in New Issue
Block a user