",new_robot_joints.tolist()) Bu">
SolveIK not working with TOOL可打印版本 +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: SolveIK not working with TOOL (/Thread-SolveIK-not-working-with-TOOL) |
SolveIK not working with TOOL-edon-03-20-2020 I need to get the target joints of movement without moving the robot on simulation. I can use the finction SolveIK like this: new_robot_joints = robot.SolveIK(joints, tool=tool) print("--->",new_robot_joints.tolist()) But when I try to get the joints with a tool I get error: toolWeld = RDK.Item('KH-TOURCH') print("XXX-->",toolWeld.Pose()) new_robot_joints = robot.SolveIK(joints, tool=tool) print("--->",new_robot_joints.tolist()) This is the error: Traceback (most recent call last): File "D:\work\Design\Welding-Robot\Modular-Structures\kehui_simulation.py", line 468, in new_robot_joints = robot.SolveIK(pose=joints, tool=tool) File "C:\RoboDK\Python\robolink\robolink.py", line 4606, in SolveIK pose = pose*invH(tool) File "C:\RoboDK\Python\robolink\robodk.py", line 353, in invH return matrix.invH() AttributeError: 'Item' object has no attribute 'invH' 追求ion: 1/ Is there other a way to get the joints with tool? 2/ why I get this error although the tool is corret RE: SolveIK not working with TOOL-Albert-03-20-2020 The tool you provide to the SolveIK function should be a pose (a 4x4 matrix as an object of type Mat). Example:
Code:
new_robot_joints = robot.SolveIK(pose=robot.Pose(), joints=robot.Joints(), tool=robot.PoseTool(), frame=frame.PoseFrame())
RE: SolveIK not working with TOOL-edon-03-21-2020 Thanks, it is working perfect. |