Ik Geo

July 9, 2024 · View on GitHub

This is a Rust implementation of the analytic inverse kinematics algorithms found in the IK-Geo paper. This implemenation has been adapted from the original Rust implementation by RPI Robotics.

Usage

To use this package, you either need to choose a an implemented model by name, or specify the kinematics as a Product of Exponentials and select the appropriate problem decomposition.

// Only need to import the one you are using
use ik_geo::robot::{
    spherical, spherical_two_parallel, spherical_two_intersecting, three_parallel_two_intersecting, three_parallel, two_parallel, 
    two_intersecting, gen_six_dof
}
use ik_geo::robot::{
    ur5, irb6640, three_parallel_bot, two_parallel_bot, spherical_bot
}

fn main() {
    let robot = ur5();

    let R: Matrix3<f64> = ...
    let t: Vector3<f64> = ...

    // Solutions is a list of IK solutions
    // and whether they are least squares approximations.
    // Depending on the specific decomposition, a least squares solution might not be available.
    let solns = robot.ik(R, t);

    for (q, is_ls) in solns {
        if !is_ls {
            // This is an exact solution
        } else {
            // This one is close, but not exact
        }
    }
}

Performance

While this implementation can be used on a wide range of manipulators, it performs much better on when the solution can be found entirely analytically. The following table shows which method is used for each type of kinematics:

Solution TypeRobot Kinematic FamilyExample
Closed-formSpherical jointFranka Production 3, fixed q5q_5
     and two intersecting axesKUKA LBR iiwa 7 R800 , fixed q3q_3
     and two parallel axesABB IRB 6640
Three parallel axesN/A
     and two intersecting axesUniversal Robots UR5
     and two parallel axesN/A
1D searchTwo intersecting axesKassow Robots KR810, fixed q7q_7
     and two intersecting axesFANUC CRX-10iA/L
     and two parallel axesKawasaki KJ125
Two parallel axesN/A
     and two parallel axesN/A
Two intersecting axes k,k+2k, k+2ABB YuMi, fixed q3q_3
     and two intersecting axesRRC K-1207i, fixed q6q_6
     and two parallel axesN/A
2D searchGeneral 6RKassow Robots KR810, fixed q6q_6

Testing

Correctness Tests

$ cargo test --release

For diagnostic info:

$ cargo test --release -- --nocapture