-
Notifications
You must be signed in to change notification settings - Fork 524
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
Dynamics controllers for Computed Torque Control / Gravity Compensation #433
base: melodic-devel
Are you sure you want to change the base?
Dynamics controllers for Computed Torque Control / Gravity Compensation #433
Conversation
First of all, we need to either get someone to update the ROS Melodic upstream KDL (tricky) or we ship a custom KDL internally with this package (not ideal). |
In my case I have a local copy of KDL - I wrote the solver for trees so it was convenient for me to have it locally. As far as I can tell, the only "extra" files not already in Melodic's KDL are those of the tree solver (it's just one header + the associated cpp). So as a quick and easy solution I could simply copy these files locally until the upstream is updated. |
If this approach is chosen, I would recommend to either only include them in the compilation units that need them (ie: only include in the |
I manually added the sources for the Tree solver: they are all inside the |
dynamics_controllers/README.md
Outdated
- They require proper identification of the Dynamic Parameters. | ||
- The parameters must be provided in URDF format. This is a limitation since | ||
the identification will often return a smaller set of regrouped parameters. | ||
- The sub-controller must control all joints of the internal `Chain`/`Tree`. |
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.
Couldn't this be detected via parsing the KDL tree?
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.
If you mean that it is necessary to make sure that all joints are handled by the sub-controller, then yes, it can be checked from the parsed tree and is addressed in the code here. My comment in the readme is meant to warn users that it is not possible to run dynamics controllers if the sub-controller evaluates the efforts just for a subset of the joints.
|
||
- They all assume a static base. The main implication is that you cannot | ||
"serially join" controllers for different parts of the robot. | ||
- They require proper identification of the Dynamic Parameters. |
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.
Could you please add some pointers on how one would go about this?
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.
That is supposed to be a warning about the fact that model-based computed torque controls require a sufficiently good identification of the parameters. Do you want me to add references about possible identification strategies?
dynamics_controllers/include/dynamics_controllers/kdl_tree_controller.h
Outdated
Show resolved
Hide resolved
I left a few quick points from my phone, excuse my brevity. |
Thanks for all the feedback, I will try to address these points in few more commits! |
In the last two commits I added support for multiple sub-controllers (so that it is not strictly necessary to use a I was considering to handle safety limits, however as far as I understand they should be enforced at the very end of the control flow directly by the |
My two-cents from a long-time-user point of view.... and facing new-comers having issues with naming conventions in ros-controls..... Since the proposed controllers send torque to the For example, To me Great work btw! It remided me of an very old work here ... https://github.com/CentroEPiaggio/kuka-lwr/tree/master/lwr_controllers |
I see your point, and for me it would not be a big deal moving from
Thanks! 🎉 |
Hello! During the last year I worked on some Computed Torque Controllers and I finally thought that this might be a nice addition to ROS control. In this PR, I added a new package,
dynamics_controllers
whose aim is to take into account the inverse dynamics model.Two controllers are added: one works on serial chains, while the other on whole trees. KDL is used to evaluate the efforts via the Recursive Newton-Euler algorithm. What I think is really interesting is that these controllers work only at a "high-level". In practice, they allow to instanciate a "sub-controller" (operating on an EffortJointInterface) to obtain an acceleration command - technically speaking, the produced command should be an effort, but is interpreted in a different way inside the package.
One important remark: to compute the dynamics of kinematic trees it is necessary to use the latest version of KDL.
Let me know what you think about it and what should be improved!