This is Relaxed IK wrapped up in ROS2. The current version of this repository is made for ROS 2 Iron / Ubuntu 22.04. It may also work on other ROS 2 versions.
You can find an introduction and the citation information in the README of RelaxedIK Core which is a submodule of this repo. It is recommended to look at RelaxedIK Core before working with this wrapper.
RangedIK extends RelaxedIK by leveraging the flexibility afforded by tolerances. Also, RangedIK is recently maintained and works with more recent rust versions.
CollisionIK extends RelaxedIK by avoiding collisions with static or dynamic obstacles in the environment.
We provide a series of wrappers for our tools to be used in various platform or software.
ROS1 | ROS2 | WebAssembly | Coppeliasim | Mujoco | |
---|---|---|---|---|---|
RangedIK | link | link | link | x | x |
CollisionIK | link | x | x | x | x |
RelaxedIK | link | x | x | link | link |
- You will need to install ROS 2
- If you already have Conda for Python installed on your system, you may run into errors with your python interpreter. A partial fix to this is to make sure you always
conda deactivate
before running any ROS commands, and to setexport COLCON_PYTHON_EXECUTABLE=/usr/bin/python3
to make sure colcon builds with your system Python instead of Conda.
- If you already have Conda for Python installed on your system, you may run into errors with your python interpreter. A partial fix to this is to make sure you always
- You will need to install Rust in order to build relaxed_ik_core (currently a necessary step to run RelaxedIK)
- You will need a ros 2 workspace on your system
-
Clone this repo to
<your ros2 workspace>/src
-
Clone git submodules
cd relaxed_ik_ros2
git submodule init
git submodule update
- Compile relaxed_ik_core
cd relaxed_ik_core
cargo build
-
Clone robot descriptions under
your_workspace/src
.- UR5 (Foxy): https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/foxy (you can only keep the ur_description package)
-
Install the UR Description package for ROS 2. For ROS 2 Galactic and later (incl. Humble, Iron), this package has its own github repository. For ROS 2 Foxy, it is included in the UR Driver Repository.
-
Build the workspace and source it:
colcon build --symlink-install
. install/setup.bash
Run the demo script below to verify your RelaxedIK installation. This script visualizes the output in Rviz and does not require a real robot.
- Run relaxed_ik and a rviz viewer:
ros2 launch relaxed_ik_ros2 demo.launch.py
- To move the robot using keyboard, open a new terminal
ros2 run relaxed_ik_ros2 keyboard_input.py
And then use the folloing commands to move the robot.
c - kill the controller controller script
w - move end effector along +X
x - move end effector along -X
a - move end effector along +Y
d - move end effector along -Y
q - move end effector along +Z
z - move end effector along -Z
1 - rotate end effector around +X
2 - rotate end effector around -X
3 - rotate end effector around +Y
4 - rotate end effector around -Y
5 - rotate end effector around +Z
6 - rotate end effector around -Z
[] Visualize end-effector goal poses in Rviz
[] Add a service for relaxed-ik (currently you can only use topic)