gazebo_ros2_control
gazebo_ros2_control copied to clipboard
Mimic joints independent of the combination of command interfaces
I updated the mimic joint options to be independent on the command interfaces and also added an offset tag like the URDF-cousin has.
See the readme:
You can specify a mimicked joint independent of the combination of command interfaces. E.g., if you use an effort command interface for joint 1 but want to let joint 2 mimic the position of joint 1, set
<joint name="right_finger_joint"> <command_interface name="effort"/> <state_interface name="position"/> <state_interface name="velocity"/> <state_interface name="effort"/> </joint> <joint name="left_finger_joint"> <param name="mimic">right_finger_joint</param> <param name="multiplier">1</param> <param name="offset">0</param> <command_interface name="position"/> <state_interface name="position"/> <state_interface name="velocity"/> <state_interface name="effort"/> </joint>Be aware that these mimicked joints do not preserve any conservation of energy, i.e., the necessary effort of joint 1 won't be changed.
Let me know if this is not the intention of the maintainers, but for my robot it was a necessary fix. More elegant would be the usage of transmission tags by ros2_control, but it seems that they are not implemented yet.
@bmagyar and @destogl what do you think about this ?
Transmissions are coming in the very near future. Can you take a look whether that format would work for you?
https://github.com/ros-controls/ros2_control/pull/633
Transmissions are coming in the very near future. Can you take a look whether that format would work for you? ros-controls/ros2_control#633
Thanks for this hint, great to see it coming :) My real hardware has a mechanically linked telescope arm (one actuator, two prismatic joints). From the PR alone I do not get if this is supported yet, but I'll give it a try within the next days..
As far as parsing the functionality should already be there. It just doesn't load transmissions for you. You probably can even do without that PR
On Tue, 15 Feb 2022, 20:19 Christoph Fröhlich, @.***> wrote:
Transmissions are coming in the very near future. Can you take a look whether that format would work for you? ros-controls/ros2_control#633 https://github.com/ros-controls/ros2_control/pull/633
Thanks for this hint, great to see it coming :) My real hardware has a mechanically linked telescope arm (one actuator, two prismatic links). From the PR alone I do not get if this is supported yet, but I'll give it a try within the next days..
— Reply to this email directly, view it on GitHub https://github.com/ros-simulation/gazebo_ros2_control/pull/111#issuecomment-1040752095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA24PYMUK7HHA5M5HFHXECTU3KYOHANCNFSM5OKX54HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
@ahcorde It seems that my extension of the mimic joints does not meet with approval... Should I rewrite it by adding the offset only, and adding a paragraph to the readme discussing the limits of the mimicked joints?
@christophfroehlich since we are adding more parameters for mimic joints (rightly so!) I would propose that we update our parser on that.
The proposal would be to implement this syntax (@bmagyar what do you think?)
<joint name="right_finger_joint">
<command_interface name="effort"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="left_finger_joint">
<mimic joint="right_finger_joint" multiplier="1" offset="0" />
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
This would make the syntax the same as for the rest of URDF. The changes are fairly simple to do on ros2_control repository. If you would like to contribute, I can give you exact pointers what should be done. I don't have time unfortunately to implement this, but can support you with pointers and reviews.
@destogl I can give it a try if you point me into the right direction where to start ;) just a sidenote: your code example with different command_interfaces won't work without my proposed changes by this PR.
just a sidenote: your code example with different command_interfaces won't work without my proposed changes by this PR.
Yes, of course! Your code is great, but I would just like to have a long-term solution to this that is well integrated with other features.
@destogl I can give it a try if you point me into the right direction where to start ;)
Please check ros-controls/ros2_control#652 for detailed description, and please give your feedback there on how would you like this to be integrated and described in URDF? Since you are using it, you probably have a good idea how to make this nice and straightforward to use in URDF. Then we adjust the parser to it.
@christophfroehlich I hope I didn't break your idea in #154. Can you comment if that merge changes something here?
you did ;) But I fixed this with 0d4468adc61ff3da0d3aaf9b7e16bd0fcf6cc1cd already. I'm not sure if this is an elegant way, but it works at least. I'm not exactly sure what to do with the mimic joints in case of a command_mode_switch. I had a look into https://github.com/ros-controls/ros2_control/issues/652 and tried to understand how big this change would be. But as I understand now, the plan is to always mimic the position in any case, isn't it? Then we have to rewrite this part again anyways.
But as I understand now, the plan is to always mimic the position in any case, isn't it? Then we have to rewrite this part again anyways.
Why do you think so?
https://github.com/ros-controls/ros2_control/issues/652 needs definitely multiple (breaking) changes so it can take time. If you can or would like to tackle it I can give you pointers where to start.
Any updates on this?
Unfortunatley not yet, I never started with https://github.com/ros-controls/ros2_control/issues/652 Do you have a use case for this change?