-
Notifications
You must be signed in to change notification settings - Fork 408
Feature/gravity pd controller #1956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature/gravity pd controller #1956
Conversation
- [REF] Refactor CMakeLists.txt, update documentation, and improve code formatting across multiple files
- [ADD] Update CMakeLists.txt and package.xml for testing dependencies
…y_pd_controller into feature/gravity_pd_controller
…st configuration parameters - [REF] Remove redundant README.md for gravity_compensation_pd_controller
…y_pd_controller into feature/gravity_pd_controller
Where do you think inverse_dynamics_solver should be published? It does not fit to ros2_controllers, either you include this in kinematics_interface plugins, or we look for a different place..? |
Hi @christophfroehlich, I am the original proposer of #1651, main contributor of the inverse dynamics solver and a colleague of @my-rice. As explained in the ROS discourse thread, the idea of the solver was to be the equivalent of Our idea was to keep the solver outside the Let us know :) |
I haven't followed the discourse post (I was not tagged there :D), let me have a closer look. Yes we would need a release on rolling to go on this with PR, but if we decide to move it into ros-controls, then we will do that first.. |
@christophfroehlich thank you so much for your interest :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO kdl_inverse_dynamics_solver
is pretty old. I think we should move on to more maintained libraries like Pinocchio or Drake etc. it's for the own good of this package.
Moreover, the API requirements of a dynamics solver is going to be huge, we would need to take a closer look before proceeding.
@saikishor thank you for your suggestion. We can implement a Pinocchio-based solver. As mentioned here, I'll join the next WG meeting this Wednesday to discuss other aspects. |
Sure, we can discuss that part. |
This PR introduces a new controller package,
gravity_pd_controller
, which implements a joint space PD controller with gravity compensation. The control law is described in detail in the package’s userdoc.rst.The controller uses the
inverse_dynamics_solver
plugin interface to compute the gravity torque vector, g(q), and combines it with PD control terms.IMPORTANT
The goal is to provide a robot-agnostic, model-based controller example within
ros2_controllers
, as discussed in ros2_controllers#1651. That PR was closed because no software modules were available that actually made use of theinverse_dynamics_solver
.Here, I am proposing a controller that explicitly depends on it. This raises the need for a strategy/decision on how to handle this dependency: since
inverse_dynamics_solver
is not yet part ofros2_controllers
orros2_control
, the solver should be integrated before this controller.Furthermore, since the
inverse_dynamics_solver
interface and its concrete implementations (e.g.,kdl_inverse_dynamics_solver
, etc.) are not yet part ofros2_controllers
orros2_control
packages, we developed a demo repository that provides both, along with detailed usage instructions.NOTES
The
gravity_pd_controller
uses the chaining technique to receive its input references. This means it relies on an upstream controller (e.g.,joint_trajectory_controller
) to provide the joint targets. With this approach, this package contains only the control logic, while reusing the existing reference generation logic (in the demo, provided by thejoint_trajectory_controller
). This avoids duplicating code and keeps the implementation more modular and maintainable.