Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

SolveIK not working with TOOL

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)

But when I try to get the joints with a tool I get error:
toolWeld  = RDK.Item('KH-TOURCH')
new_robot_joints = robot.SolveIK(joints, tool=tool)

This is the error:
Traceback (most recent call last):
  File "D:\work\Design\Welding-Robot\Modular-Structures\", line 468, in <module>
    new_robot_joints = robot.SolveIK(pose=joints, tool=tool)
  File "C:\RoboDK\Python\robolink\", line 4606, in SolveIK
    pose = pose*invH(tool)
  File "C:\RoboDK\Python\robolink\", line 353, in invH
    return matrix.invH()
AttributeError: 'Item' object has no attribute 'invH'

1/ Is there other a way to get the joints with tool?
2/ why I get this error although the tool is corret
The tool you provide to the SolveIK function should be a pose (a 4x4 matrix as an object of type Mat).

new_robot_joints = robot.SolveIK(pose=robot.Pose(), joints=robot.Joints(), tool=robot.PoseTool(), frame=frame.PoseFrame())
Thanks, it is working perfect.

Users browsing this thread:
1 Guest(s)