-
Notifications
You must be signed in to change notification settings - Fork 227
Added example_17: chained controllers for diff drive using effort interface and Gazebo. #786
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?
Conversation
…erface and Gazebo. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
******************************************************** | ||
|
||
This example shows how to create chained controllers using diff_drive_controller and pid_controllers to control a differential drive robot using effort interfaces. In contrast to *example_16* which uses velocity interface, control via effort interface is very suitable for simulation because it does not break physics (velocity-controlled objects are not affected by inertia etc.). If you haven't already, you can find the instructions for *example_16* in :ref:`ros2_control_demos_example_16_userdoc`. It is recommended to follow the steps given in that tutorial first before proceeding with this one. | ||
|
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.
This is a fascinating topic! Gazebo is new to me, and I’m eager to learn more. Could you include specific scenarios or examples to highlight the differences between control over effort versus velocity? With these, we could potentially streamline the tutorial steps by reducing overlap with example_16 and provide developers with more insights for simulation.
Thanks for your initiative! I know exactly what you want to showcase w.r.t. the physics engine. But I'm a bit reluctant in making your proposal a best practice.
Summarized, I propose adding such a custom plugin as an extension variant to the existing example_16, because this is IMHO the way to do it and perfectly enhances the existing example with a more sophisticated simulation. |
Thanks all for the comments. I'm on vacation this week, so I'll have a look at them next week. |
I know about ros-controls/gz_ros2_control#306 and I guess that would really be the best way. However, I don't have the resources to finish ros-controls/gz_ros2_control#306 . At the same time, I'm not happy with the state when the ROS2 control tutorials only provide a broken approach (wrong physics) and it may even seem it is the preferred one. What about this course of actions:
|
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.
@peci1 The PR itself looks fine itself and should be functional.
However, the motivation behind the example is something I don't encourage. If it is done somehow to show the functional integration with an effort based actuator, then it should be good. IMHO Just because the Gazebo physics are bad for the velocity interface, shouldn't drive this example. I agree with @christophfroehlich that the ecosystem developed should be agnostic, as that's the general idea of ros2_control.
That depends on the interface the robot provides. We, for example, have a robot that directly provides cmd_vel control via a micro-ROS MCU because it has a non-standard locomotion system and individual joints should not be controlled by the user. So the ROS interface on the main PC doesn't run ros_control at all. And ros_control is used only to fill this gap between what the simulator provides (velocity/effort control of individual joints) and what the real robot provides (diff-drive-like control). |
General
This combination is actually a part of the system described in https://control.ros.org/rolling/doc/ros2_control/controller_manager/doc/controller_chaining.html#motivation-purpose-and-use .
I think people quite often try to create a diff drive robot in Gazebo + ROS 2 control and all tutorials they find are actually scr***ng up physics by using the velocity interface. This is an example on how to properly do a diff drive robot in Gazebo.
New Examples
If you propose adding a new example, make sure that your new example has: