Categories
Author: Daniel Rakita
Description: An inverse kinematics (IK) solver

# Relaxed IK

### An inverse kinematics (IK) solver

## About

Welcome to RelaxedIK! We implement the methods discussed in our paper RelaxedIK: Real-time Synthesis of Accurate and Feasible Robot Arm Motion and CollisionIK: A Per-Instant Pose Optimization Method for Generating Robot Motions with Environment Collision Avoidance.

- Video of presentation at RSS 2018 (RelaxedIK part starts around 12:00): https://youtu.be/bih5e9MHc88?t=737
- Video explaining RelaxedIK: https://youtu.be/AhsQFJzB8WQ
- Video explaining CollisionIK: [Working on it…]

RelaxedIK is an inverse kinematics (IK) solver designed for robot platforms such that the conversion between Cartesian end-effector pose goals (such as “move the robot’s right arm end-effector to position X, while maintaining an end-effector orientation Y”) to Joint-Space (i.e., the robot’s rotation values for each joint degree-of-freedom at a particular time-point) is done both ACCURATELY and FEASIBLY. By this, we mean that RelaxedIK attempts to find the closest possible solution to the desired end-effector pose goals without exhibiting negative effects such as self-collisions, environment collisions, kinematic-singularities, or joint-space discontinuities.

CollisionIK is a per-instant pose optimization method that can generate configurations that achieve specified pose or motion objectives as best as possible over a sequence of solutions, while also simultaneously avoiding collisions with static or dynamic obstacles in the environment. CollisionIK extends RelaxedIK by incorporating environment collision avoidance into the optimization structure.

## Core

The core part of RelaxedIK and CollisionIK is at RelaxedIK Core. The core contains a Rust implementation of RelaxedIK and CollisionIK with both a library crate and a binary crate. The library crate includes all the kinematics libraries of RelaxedIK, while the binary crate is desgined for the purpose of testing. Since the core is not designed to be run independently in general (although it is runnable), please refer to the Wrappers section and READMEs in those wrapper repos for more information on how to run RelaxedIK or CollisionIK.

To introduce relaxed_ik_core, let’s first talk about the previous iteration of RelaxedIK at relaxed_ik. There are three parts in this repo: the Rust library of RelaxedIK, a ROS wrapper around it, and a preprocessing toolkit for robot config files needed for RelaxedIK. To make it more convenient to extend RelaxedIK and build all kinds of wrappers around it, we extract the Rust library from that repo to be relaxed_ik_core. Also, to ease the process of setting up a robot arm with RelaxedIK, we decide to exclude the preprocessing toolkit (which is accessible in relaxed_ik) from relaxed_ik_core and instead provide all of the pre-generated config files for some mostly used robot manipulators. The list of available robots include baxter, hubo, iiwa7, jaco7, panda, sawyer, ur5, and yumi. Please refer to the READMEs in those repos if you intend to work with a robot not in this list.

## Wrappers

Although the core is runnable, it is usually not intended to be run alone. Wrappers are required to connect RelaxedIK to different interfaces. Here are 4 wrappers that we implemented for ROS, CoppeliaSim, Mujoco, and Unity respectively. Each wrapper has detailed instructions on how to work with them in the READMEs in their repo. If you are interested, it is possible to wrap up the core in other interfaces as well.

The links to these github repos are here:

- RelaxedIK ROS1
- RelaxedIK Unity
- RelaxedIK CoppeliaSim
- RelaxedIK Mujoco

### RelaxedIK ROS1

- This wrapper has the complete set of features available in the RelaxedIK package and it is also where CollisionIK resides. If you doesn’t have strong preferences over any specific wrapper, you probably should consider this ROS wrapper as the first choice. A keyboard pose goal driver and an rviz viewer are provided for testing purpose.

### RelaxedIK CoppeliaSim

- This wrapper is a RelaxedIK plugin for CoppeliaSim. Although it’s possible to access the ROS1 wrapper of RelaxedIK in CoppeliaSim through ROS topics and params, it might be more convenient to directly access RelaxedIK in the form of a CoppeliaSim Pluggin. That’s where the inspiration of this wrapper comes from. If you don’t need ROS in your project, this wrapper is designed for you; however, if you need ROS for other parts of your project, it is still recommended to use the ROS wrapper since that one has the complete set of features available.

### RelaxedIK Mujoco

- This wrapper is a RelaxedIK Plugin for MuJoCo. MuJoCo is an advanced physics simulation engine that may have some extra features unavailable in CoppeliaSim.

### RelaxedIK Unity

- This wrapper allows users to use RelaxedIK in Unity. This is designed to work on Windows and it probably won’t work on a Linux machine. A few commonly used simulated robot arms have already been set up for you to play with. In the simulation, you will be able to disable or enable RelaxedIK as you like. When RelaxedIK is disabled, a joint angle writer panel will show up for you to adjust and visualize the joint angle configuration. When RelaxedIK is enabled, you will be able to have real-time interactions with RelaxedIK by dragging the transform gizmo associated with the gripper of the robot.

  RelaxedIK Unity

## Contact

If you have any comments or questions on any of this, or if you encounter any bugs in the wrappers of the solver, feel free to post an issue or email me directly at rakita@cs.wisc.edu.