ikin(pos, sol_space, ref)
Features
This function returns the joint position corresponding to sol_space, which is equivalent to the robot pose in the operating space, among 8 joint shapes. Joint position is returned according to closest joint position depend on option(ref_pos_opt). Through status of return value, you can check whether current robot pose is in wrist singularity or out of operating region. When DR_SOL_AUTO(255) is entered into sol_space, it moves to robot configuration that is the closest to the home position (0,0,0,0,0,0), (the smallest L2 norm in the joint space of axes 2-5) among the eight joint combination types.
Note
- After SW version V2.9, if the accuracy of robot is corrected when using this function, the accuracy correction algorithm operates. The level of accuracy is adjustable according to the option (iter_threshold). Also, depending on the robot posture, there may be a delay of up to 0.1 seconds.
- Refer to ikin_norm() command to find the inverse kinematics solution related to each robot model's well known nominal DH parameters before calibrated DH parameters.
- Please ensure the use of 'Lock' to prevent global variable collisions when updating the return value posj in ikin with Threads.
Parameters
Parameter Name | Data Type | Default Value | Description |
pos | posx | - | posx or position list |
list (float[6]) | |||
sol_space | int | - | solution space
|
ref | int | DR_BASE | reference coordinate
|
Robot configuration vs. solution space
Solution space | Binary | Shoulder | Elbow | Wrist |
0 | 000 | Lefty | Below | No Flip |
1 | 001 | Lefty | Below | Flip |
2 | 010 | Lefty | Above | No Flip |
3 | 011 | Lefty | Above | Flip |
4 | 100 | Righty | Below | No Flip |
5 | 101 | Righty | Below | Flip |
6 | 110 | Righty | Above | No Flip |
7 | 111 | Righty | Above | Flip |
| 255 | Auto Calculation (the smallest L2 norm in the joint space of axes 2-5) | |||
Return
| Value | Description |
|---|---|
posj | Joint space point |
Exception
| Exception | Description |
|---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
x1 = posx(370.9, 719.7, 651.5, 90, -180, 0)
q1 = ikin(x1, 2, DR_BASE) # Joint angle q1 where the coordinate of the robot edge is x1 (second of 8 cases), reference joint position : posj(0,0,0,0,0,0)
# q1=posj(60.3, 81.0, -60.4, -0.0, 159.4, -29.7) (M1013, tcp=(0,0,0))
movej(q1,v=10,a=20)