# A library for inverse dynamics computation - where to contribute?

**URL:** <https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643>\
**Category:** ROS General\
**Tags:** ros2, development, humble\
**Created:** [January 20, 2025, 2:21pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643 "2025-01-20T14:21:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![v8p1197](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/v8p1197/32/21330_2.png) [@v8p1197](https://discourse.openrobotics.org/u/v8p1197)\
**Post date:** [January 20, 2025, 2:21pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/1 "2025-01-20T14:21:52Z")

</div>

I have developed an interface exposing methods to compute the dynamic components of robots (inertia, coriolis, gravity, friction).

I am also willing to specialize this interface with a KDL-based solver for simulated robots, and with a concrete solver for real manipulators.

I am wondering where I should commit the code I have produced:

- should it be a new repository? If so, how can I create a new repo under existing organizations?
- should it be a PR in a specific repository? If so, which repository should it be?

For your convenience, the library has been released on CodeOcean: [Code Ocean](https://codeocean.com/capsule/8515919/tree/v2)

---

<div class="post-metadata">

**Author:** ![kos\_316](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/kos_316/32/22538_2.png) [@kos\_316](https://discourse.openrobotics.org/u/kos_316)\
**Post date:** [January 20, 2025, 3:05pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/2 "2025-01-20T15:05:16Z")

</div>

Have you considered integrating it with moveit2 or gazebo ignition?

---

<div class="post-metadata">

**Author:** ![v8p1197](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/v8p1197/32/21330_2.png) [@v8p1197](https://discourse.openrobotics.org/u/v8p1197)\
**Post date:** [January 20, 2025, 3:14pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/3 "2025-01-20T15:14:38Z")

</div>

I don’t think it fits Ignition Gazebo, as the interface I am developing can be inherited by solvers for _real_ robots, too.  
Indeed, I am developing two concrete implementations for two different real robots.

Do you have an idea of which _moveit_ repository this feature might apply to?

---

<div class="post-metadata">

**Author:** ![scastro](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/scastro/32/13805_2.png) [@scastro](https://discourse.openrobotics.org/u/scastro)\
**Post date:** [January 20, 2025, 9:02pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/4 "2025-01-20T21:02:51Z")

</div>

I may suggest considering an alternative to the `ros2_control` `kinematics_interface` ([GitHub - ros-controls/kinematics\_interface](https://github.com/ros-controls/kinematics_interface)) … but one that offers the dynamics portion as you’ve described?

The idea being that you can create plugins that can be used in real-time controllers that use a robot’s dynamics in their control laws.

However, I will always promote Pinocchio over KDL 🙂

---

<div class="post-metadata">

**Author:** ![v8p1197](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/v8p1197/32/21330_2.png) [@v8p1197](https://discourse.openrobotics.org/u/v8p1197)\
**Post date:** [January 21, 2025, 8:16am UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/5 "2025-01-21T08:16:32Z")

</div>

> I may suggest considering an alternative to the `ros2_control` `kinematics_interface` ([GitHub - ros-controls/kinematics\_interface](https://github.com/ros-controls/kinematics_interface)) … but one that offers the dynamics portion as you’ve described?

Yes, that was the idea! But in that case, I’d have to create a new repository. I am new in officially contributing to ROS… do you know how can I propose my own repository to the [ros-control](https://github.com/ros-controls) organization?

> However, I will always promote Pinocchio over KDL 🙂

Thanks, I’ll check this out!

---

<div class="post-metadata">

**Author:** ![scastro](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/scastro/32/13805_2.png) [@scastro](https://discourse.openrobotics.org/u/scastro)\
**Post date:** [January 21, 2025, 1:51pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/6 "2025-01-21T13:51:23Z")

</div>

@destogl @bmagyar @saikishor – what do you guys think?

---

<div class="post-metadata">

**Author:** ![saikishor](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/saikishor/32/26420_2.png) [@saikishor](https://discourse.openrobotics.org/u/saikishor)\
**Post date:** [January 21, 2025, 11:11pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/7 "2025-01-21T23:11:54Z")

</div>

@v8p1197 In my opinion, this inverse dynamics library should be an independent library (even ROS-independent), similar to other rigid body dynamics libraries such as RBDL and Pinocchio. This separation would help distinguish the core logic from what is integrated into a controller, avoiding the need to maintain an entirely new dynamics library.

In the future, if we add a dynamics-based controller to `ros2_controllers`, it would be worth considering a plugin-based system. This would allow users to switch between different inverse dynamics solvers simply by changing the plugin. For instance, how [kinematics\_interface\_kdl](https://github.com/ros-controls/kinematics_interface/tree/master/kinematics_interface_kdl) has been implemented and integrated with the [admittance\_controller](https://github.com/ros-controls/ros2_controllers/tree/master/admittance_controller).

---

<div class="post-metadata">

**Author:** ![v8p1197](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/v8p1197/32/21330_2.png) [@v8p1197](https://discourse.openrobotics.org/u/v8p1197)\
**Post date:** [January 22, 2025, 9:14am UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/8 "2025-01-22T09:14:06Z")

</div>

@saikishor Thank you for your suggestion. If my understanding is correct, I have to create my own repository, follow [these guidelines](https://docs.ros.org/en/humble/How-To-Guides/Releasing/Release-Team-Repository.html#create-a-new-release-repository), and open a PR to [ros/rosdistro](https://github.com/ros/rosdistro) to make my library available as a ROS package. Can you confirm this is the correct way to proceed?

> In the future, if we add a dynamics-based controller to `ros2_controllers`, it would be worth considering a plugin-based system. This would allow users to switch between different inverse dynamics solvers simply by changing the plugin.

Yes, that was exactly our idea. Our library is plugin-based, and users can choose the solver to use in controllers or planning algorithms by changing the plugin.

---

<div class="post-metadata">

**Author:** ![saikishor](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/saikishor/32/26420_2.png) [@saikishor](https://discourse.openrobotics.org/u/saikishor)\
**Post date:** [January 22, 2025, 12:51pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/9 "2025-01-22T12:51:01Z")

</div>

> [@v8p1197](#):
>
> If my understanding is correct, I have to create my own repository, follow [these guidelines](https://docs.ros.org/en/humble/How-To-Guides/Releasing/Release-Team-Repository.html#create-a-new-release-repository), and open a PR to [ros/rosdistro](https://github.com/ros/rosdistro) to make my library available as a ROS package. Can you confirm this is the correct way to proceed?

@v8p1197 Yes, doing a `bloom-release` from your repository should do 🙂

---

<div class="post-metadata">

**Author:** ![v8p1197](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/v8p1197/32/21330_2.png) [@v8p1197](https://discourse.openrobotics.org/u/v8p1197)\
**Post date:** [January 22, 2025, 2:53pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/10 "2025-01-22T14:53:36Z")

</div>

@scastro @saikishor thank you! If you have any suggestion/resource I should follow to correctly set up my repo, I’d be glad to check them out.

Thank you again for your valuable advice! 🙂

---

<div class="post-metadata">

**Author:** ![destogl](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/destogl/32/7158_2.png) [@destogl](https://discourse.openrobotics.org/u/destogl)\
**Post date:** [February 15, 2025, 11:12pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/11 "2025-02-15T23:12:25Z")

</div>

@v8p1197 I was just checking the code in more detail. To gain serious traction in ROS 2 you will have to reconsider the used license. Usual license also allows professional use of such libraries. For example, with this license, I could not support having a controller or an example for ros2\_control.

---

<div class="post-metadata">

**Author:** ![mjcarroll](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/mjcarroll/32/35469_2.png) [@mjcarroll](https://discourse.openrobotics.org/u/mjcarroll)\
**Post date:** [February 16, 2025, 3:55pm UTC](https://discourse.openrobotics.org/t/a-library-for-inverse-dynamics-computation-where-to-contribute/41643/12 "2025-02-16T15:55:46Z")

</div>

Did I miss something? I thought it was BSD-3-Clause?
