You should useSolveIKto calculate the inverse kinematics. This will give you joint values given Cartesian and Euler angle information (for example, KUKA's XYZABC).
SolveIK requires the pose of the robot flange to be provided with respect to the robot base. So you should do something like this:
The latest version also allows you to pass the tool pose and the reference pose like this:
joints = SolveIK(robot_pose, tool, base)
SolveIK requires the pose of the robot flange to be provided with respect to the robot base. So you should do something like this:
Code:
# enter the target information: The TCP (KUKA's $TOOL) with respect to the reference (KUKA's $BASE)
target1_pose = KUKA_2_Pose([x,y,z,a,b,c])
base= KUKA_2_Pose([x,y,z,a,b,c])
tool = KUKA_2_Pose([x,y,z,a,b,c])
# Then you can calculate the robot pose:
robot_pose = invH(base)*target1_pose*tool
joints = SolveIK(robot_pose)
# you can then use joints.list() to get the joint as a list of float
The latest version also allows you to pass the tool pose and the reference pose like this:
joints = SolveIK(robot_pose, tool, base)