• Stars
    star
    113
  • Rank 310,055 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library for solving inverse kinematics with graphical models and distance geometry.

GraphIK

GraphIK is a library for solving inverse kinematics problems by modelling robots as geometric graphs and using concepts from distance geometry.

Dependencies

GraphIK is implemented in Python 3. See setup.py for a full list of dependencies.

Usage

Use of GraphIK can be summarized by four key steps, which we'll walk through below (see the scripts in experiments/ for more details).

1. Load a Robot

In this example, we'll parse a URDF file describing a Schunk LWA4P manipulator.

from graphik.utils.roboturdf import load_schunk_lwa4d
robot, graph = load_schunk_lwa4d()

GraphIK's interface between robot models and IK solvers is the abstract ProblemGraph class. For the LWA4P, we'll use ProblemGraphRevolute, a subclass of ProblemGraph that can represent 3D robots with revolute joints.

2. Instantiate a ProblemGraph Object with Obstacles

If you are considering an environment with spherical obstacles, you can include constraints that prevent collisions. In this example, we will use a set of spheres that approximate a table:

from graphik.utils.utils import table_environment
obstacles = table_environment()
# This loop is not needed if you are not using obstacle avoidance constraints 
for idx, obs in enumerate(obstacles):
    graph.add_spherical_obstacle(f"o{idx}", obs[0], obs[1])

3. Specify a Goal Pose

Interfaces to our solvers require a goal pose defined by the liegroups library. For this simple example, using the robot's forward kinematics is the fastest way to get a sample goal pose:

q_goal = robot.random_configuration()
T_goal = robot.pose(q_goal, f"p{robot.n}")

4. Solve the IK Problem

The main purpose of our graphical interpretation of robot kinematics is to develop distance-geometric IK solvers. One example is the Riemannian optimization-based solver implemented in RiemannianSolver.

from graphik.solvers.riemannian_solver import solve_with_riemannian
q_sol, solution_points = solve_with_riemannian(graph, T_goal, jit=False)  # Returns None if infeasible or didn't solve

For faster computation, precompile costs and gradients using numba by running python costs.py in graphik/solvers/.

For a similar example using CIDGIK, a convex optimization-based approach, please see experiments/cidgik_example.py.

If you use any of this code in your research work, please kindly cite the relevant publications listed here.

Riemannian Optimization

IEEE Transactions on Robotics: Riemannian Optimization for Distance-Geometric Inverse Kinematics

@article{marić2022riemannian,
  author = {Filip Mari\'{c} and Matthew Giamou and Adam W. Hall and Soroush Khoubyarian and Ivan Petrović and Jonathan Kelly},
  journal = {{IEEE} Transactions on Robotics},
  month = {June},
  number = {3},
  pages = {1703--1722},
  title = {Riemannian Optimization for Distance-Geometric Inverse Kinematics},
  volume = {38},
  year = {2022}
}

arXiv: Riemannian Optimization for Distance-Geometric Inverse Kinematics

@misc{marić2021riemannian_arxiv,
  author={Filip Marić and Matthew Giamou and Adam W. Hall and Soroush Khoubyarian and Ivan Petrović and Jonathan Kelly},
  title={Riemannian Optimization for Distance-Geometric Inverse Kinematics}, 
  year={2021},
  eprint={2108.13720},
  archivePrefix={arXiv},
  primaryClass={cs.RO}
}

arXiv: Inverse Kinematics as Low-Rank Euclidean Distance Matrix Completion

Semidefinite Programming (SDP) Relaxations

CIDGIK

IEEE Robotics & Automation Letters: Convex Iteration for Distance-Geometric Inverse Kinematics

@article{giamou2022convex,
  author = {Matthew Giamou and Filip Marić and David M. Rosen and Valentin Peretroukhin and Nicholas Roy and Ivan Petrović and Jonathan Kelly},
  journal = {{IEEE} Robotics and Automation Letters},
  month = {April},
  number = {2},
  pages = {1952--1959},
  title = {Convex Iteration for Distance-Geometric Inverse Kinematics},
  volume = {7},
  year = {2022}
}

arXiv: Convex Iteration for Distance-Geometric Inverse Kinematics

@misc{giamou2022convex_arxiv,
  author={Matthew Giamou and Filip Marić and David M. Rosen and Valentin Peretroukhin and Nicholas Roy and Ivan Petrović and Jonathan Kelly},
  title={Convex Iteration for Distance-Geometric Inverse Kinematics}, 
  year={2022},
  eprint={2109.03374},
  archivePrefix={arXiv},
  primaryClass={cs.RO}
}

Sparse Sum-of-Squares Optimization for Planar and Spherical IK

IEEE ICRA 2020: Inverse Kinematics for Serial Kinematic Chains via Sum of Squares Optimization

@inproceedings{marić2020inverse,
  address = {Paris, France},
  author = {Filip Marić and Matthew Giamou and Soroush Khoubyarian and Ivan Petrović and Jonathan Kelly},
  booktitle = {Proceedings of the {IEEE} International Conference on Robotics and Automation {(ICRA})},
  pages = {7101--7107},
  title = {Inverse Kinematics for Serial Kinematic Chains via Sum of Squares Optimization},
  year = {2020}
}

arXiv: Inverse Kinematics for Serial Kinematic Chains via Sum of Squares Optimization

@misc{marić2022convex_arxiv,
  author={Filip Marić and {Matthew Giamou and Soroush Khoubyarian and Ivan Petrović and Jonathan Kelly},
  title={Inverse Kinematics for Serial Kinematic Chains via Sum of Squares Optimization}, 
  year={2020},
  eprint={1909.09318},
  archivePrefix={arXiv},
  primaryClass={cs.RO}
}

MATLAB Code: https://github.com/utiasSTARS/sos-ik

More Repositories

1

pykitti

Python tools for working with KITTI data.
Python
1,152
star
2

liegroups

Python implementation of SO2, SE2, SO3, and SE3 matrix Lie groups using numpy or pytorch
Python
332
star
3

bingham-rotation-learning

A Smooth Representation of SO(3) for Deep Rotation Learning with Uncertainty.
Jupyter Notebook
182
star
4

msckf-swf-comparison

MATLAB code and data for our CRV 2015 paper
MATLAB
132
star
5

pyshoe

An open source foot-mounted INS accompanied by a comprehensive inertial dataset.
Python
83
star
6

pyslam

Non-linear least-squares SLAM in Python using scipy and numpy. Modelled after Google's Ceres solver.
Python
73
star
7

dpc-net

Deep Pose Correction for Visual Localization
Python
72
star
8

certifiable-calibration

Certifiably globally optimal extrinsic calibration for sensors providing egomotion estimates.
Python
66
star
9

PhoenixDrone

Open-Source Releases of the Phoenix Tail-sitter Drone Project
52
star
10

cat-net

Canonical Appearance Transformations
Python
52
star
11

ss-dpc-net

Supporting Code for "Self-Supervised Deep Pose Corrections for Robust Visual Odometry"
Python
52
star
12

learned_scale_recovery

Accompanying code for 'Self-Supervised Scale Recovery for Monocular Visual Odometry'
Python
47
star
13

sun-bcnn

Bayesian CNN Sun Detector
Python
34
star
14

enav-planetary-dataset

Energy-Aware Planetary Navigation Dataset
Python
34
star
15

sos-rotation-averaging

Certifiably globally optimal unit quaternion rotation averaging via Sparse Bounded-degree sum of squares optimization.
MATLAB
16
star
16

lfgp

Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code
Python
15
star
17

pyb-sim-models

PyBullet simulation models repository
Python
15
star
18

sos-ik

Inverse kinematics using sum of squares optimization.
MATLAB
14
star
19

tightly-coupled-SfM

Python
14
star
20

matchable-image-transforms

Learning Matchable Image Transformations
Python
12
star
21

manipulator-learning

Manipulation OpenAI Gym environments to simulate robots at the STARS lab, as well as compatible imitation learning tools
Python
11
star
22

cslam-resource

MATLAB
11
star
23

Phoenix-Simulink

Phoenix Tailsitter MATLAB Simulink Models
10
star
24

inertial-identification-with-part-segmentation

Source code implementing our visual part-segmentation pipeline and inertial identification algorithms, and our contributed dataset of objects used to test the whole pipeline.
C++
9
star
25

so3_learning

Learning deep probabilistic estimates of SO(3)
Python
9
star
26

learned-camera-controller

Python
8
star
27

visual-haptic-dynamics

Visual-Haptic Latent Dynamics
Jupyter Notebook
8
star
28

multiview-manipulation

Seeing All the Angles: Learning Multiview Manipulation Policies for Contact-Rich Tasks from Demonstrations
Jupyter Notebook
8
star
29

generative-graphik

Generative and Graphical Inverse Kinematics
Python
8
star
30

PX4-PhoenixDrone

PX4 Source Code for Phoenix Tail-sitter
C++
7
star
31

ceres-slam

A Ceres-based SLAM system.
C++
7
star
32

robust-latent-srl

Heteroscedastic Uncertainty for Robust Generative Latent Dynamics
Python
6
star
33

panda-rl-envs

Reinforcement Learning on a Panda Manipulator using FAIR's Polymetis
Python
4
star
34

vpace

Scripts for running VPACE experiments.
Python
3
star
35

ROB498-support

Materials for ROB498 Capstone Design Course.
2
star
36

ROB498-flight

ROB498 flight software repository (for Jetson, etc.).
Dockerfile
2
star
37

panda-polymetis

Tools for working with a panda robot using FAIR's polymetis library.
Python
2
star
38

transform-utils

Common SO3 and SE3 functionalities that can be used across repos.
Python
2
star
39

ros-np-tools

A set of reusable functions and classes for reducing boilerplate ROS and related numpy code.
Python
2
star
40

ALLO

The Anomaly Localization in Lunar Orbit (ALLO) data generation code and benchmark evaluation
Python
2
star
41

thing-gym-ros

A repository containing OpenAI gym-based envs built on ROS to be combined with the Thing mobile manipulation platform at UTIAS.
Python
1
star
42

Phoenix-MCAD

Mechanical CAD files for construction of Phoenix Tailsitter
1
star
43

PhoenixDrone-sitl_gazebo

Gazebo Plugins for SITL Simulation with Phoenix Drone
C++
1
star