This is an old revision of the document!
Inverse Kinematics
Inverse Kinematics takes a goal in Cartesian coordinate space and returns a list of joint positions which result, if applied, in the end effector reaching the given goal.
In PyCRAM we use the KDL inverse kinematics solver to compute the joint positions for a respective chain of joints.
IK in PyCRAM
In PyCRAM everything related to inverse kinematics is located in the ik.py. Mainly this is the 'request_ik' method which sends a service call over ROS to KDL and returns the resulting list of joint positions if there was a solution. If no solution could be found a 'IKError' will be raised which contains the position.
request_ik
The request ik method takes 5 parameter which can be seen along with a description in the table below:
Parameter | Description | Type |
---|---|---|
root_link | The first link of the chain of joints for which a solution should be found | String |
tip_link | The last link of the chain of joints, this parameter together with root_link defines the chain of joints for which a solution should be found | String |
target_pose_and_rotation | The position and orientation of the end effector that should be achieved by KDL. | List of 2 lists representing pose and rotation. |
robot_object | The Object instance of the robot for which a solution should be found. | BulletWorld.Object |
joints | A list of the joint names in the chain defined by root_link and tip_link. | list |
Important The target_pose_and_rotation has to be in the coordinate frame of the root_link.