ROS 2 port of "TRAC-IK": An alternative IK solver

Hi all,

Over the past few days I’ve done some work to write a ROS 2 port of TRACLabs’ IK solver, TRAC-IK. TRAC-IK is an “alternative Inverse Kinematics solver to the popular inverse Jacobian methods in Orocos’ KDL”. I’d used TRAC-IK for robotics research before, and thought it would be nice to have ROS 2 support for it.

So far, I’ve completed porting trac_ik_lib and trac_ik_examples with minimal changes to the API (documented here). As such, the TRAC-IK project is technically ready for use in a ROS 2 project! :slight_smile:

Link to my fork: GitHub - aprotyas/trac_ik: ROS 2 port of `trac_ik`, an alternative Inverse Kinematics solver to the popular inverse Jacobian methods in KDL.
Link to the upstream repository: Bitbucket
Link to ROS 2 port progress tracker: Add ROS 2 support · Issue #1 · aprotyas/trac_ik · GitHub


To the community, please feel free to leave feedback/requests through Github issues on my fork - I will try my best to engage with things as they come up. I’ve written this port in a short time, and hence there are some shortcomings to address:

  • ROS 2 support for trac_ik_kinematic_plugin and trac_ik_python is WIP. I recognize support for the former would be quite high impact because the moveit2 supports plugins already.
  • TracIK is not composable. Well, it doesn’t instantiate a rclcpp::Node object anyway, because I used static loggers and because the API change involves constructing TracIK with the full URDF XML of a robot in string form. This is not a problem unless I decide to add a subscription mechanism to capture URDF XMLs in trying to replicate how data flows using robot_state_publisher.
  • Documentation is lacking. Really. If someone could help out with this…
6 Likes

Is this ready for use in MoveIt2 yet? In ROS1 it just required a one-line change in kinematics.yaml IIRC

@AndyZe not yet unfortunately – there’s an open PR that ports the kinematic plugin package to MoveIt2 but I haven’t been able to review it yet: Ros2 plugin by ravnicas · Pull Request #34 · aprotyas/trac_ik · GitHub

The C++ API (and its demo) is ready-to-go, but help with the plugin and the Python API would be much appreciated!

I’ve found the article just now.

I’ve made some minor fixes to the kinematics plugin of @aprotyas port. It seems to be usable and stable on humble, the robotics system at my university already uses this port for several months.

@AndyZe it is ready for MoveIt2, and it already is a drop in replacement for KDL.

3 Likes

Do you have a public fork or a repo that you are using at you University? Are there any updates on an official trac_ik version in ros2?

I don’t know about any other works. We currently use GitHub - ravnicas/trac_ik: ROS 2 port of `trac_ik`, an alternative Inverse Kinematics solver to the popular inverse Jacobian methods in KDL. . I uploaded the current fixes for ROS 2 humble.

trac_ik has been released into Rolling and Jazzy (release repository: here).

Source repository is at Bitbucket.

You can build it from source on Humble and Iron.

2 Likes

The best place to find a specific package and where it’s released is on ROS Index.

Shows all the versions links to the sources etc.