Add package with "Fake" components for simple integration of framework#323
Add package with "Fake" components for simple integration of framework#323destogl merged 22 commits intoros-controls:masterfrom
Conversation
Does that mean that we can have Gazebo examples in ros2_control_demos ? |
1fcf3bd to
2d3848a
Compare
v-lopez
left a comment
There was a problem hiding this comment.
In general LGTM.
I do not fully understand the need to separate the standard and other interfaces.
Thanks for a fast review! It is rather a convenience feature. So if one wants to extend the class and create some simple simulation for it, the interfaces relevant for the dynamic are already there, so they do not need to filter them. The second reason is the JointStateController which is unhappy with |
No, not yet, but I see you are on it :) |
|
Linking to the first MoveIt PR that has tried to use this. Notice that lines of code went up by 120 compared to |
|
I guess the difference is, I just want to make sure we aren't making things more complicated than they need to be. |
This implementation provides a general solution where FakeSystem is adapting itself to the interfaces described with URDF. So it doesn't matter anymore which are used by your robot. In combination with at general JointTrajectoryController this works for really any set or input and output interfaces. (At least it should). |
I also don't like those lengthy launch files but what can we do about it? It feels that a lot of ROS2 is just dumping all the complexity on the end user in the name of freedom. Not that we should be doing this but we can't help launch files and param handling being inconvenient. Additionally, consider that if this can completely replace |
bmagyar
left a comment
There was a problem hiding this comment.
@destogl I think in general the approach is good but we shouldn't create a new package for it. I think it would fit well in hardware_interface with the fake_component namespace you are already using, it's sole purpose after all is to fake some of that away.
| PLUGINLIB_EXPORT_CLASS(fake_components::GenericSystem, hardware_interface::SystemInterface) | ||
| PLUGINLIB_EXPORT_CLASS(fake_components::GenericRobot, hardware_interface::SystemInterface) |
There was a problem hiding this comment.
Out of curiosity, any reason for exporting two different names for the same library .?
There was a problem hiding this comment.
Only convenience. For the most users in the most cases: System == Robot.
@bmagyar Are you also OK with this? We wanted to add this throughout the framework
There was a problem hiding this comment.
That seems confusing to me. Why exactly?
There was a problem hiding this comment.
Let's discuss this at the next WG meeting. If we want to revise nomenclature, that's fine, could do that for Galactic but I'd prefer to keep an official nomenclature without convenience duplications.
I will move this then... |
Co-authored-by: Victor Lopez <3469405+v-lopez@users.noreply.github.com>
d021d7c to
61dc9a2
Compare
hardware_interface/test/fake_components/test_generic_system.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
ros-controls#323) * Generic components FakeSystem for simple testing of ros2_control framework. * Correct typo. Co-authored-by: Victor Lopez <3469405+v-lopez@users.noreply.github.com> * Update ros2_control/package.xml Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com> * Remove dual names Co-authored-by: JafarAbdi <cafer.abdi@gmail.com> Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
This package implements fake components (currently only System/Robot) which simply mirror the incoming commands to its states. It is basically a very simple simulation without a need for Gazebo. It also provides much more flexibility for integration tests than Gazebo. The use-cases are the following:
fake_jointimplementation. (@JafarAbdi)Why I propose to merge this here and not in the ros2_control_demos repository? Because this package should be released at some point and the demos repository is meant to be used always from the source for users to see the implementation examples. Also, this is not a demonstration functionality, but rather a tool for setting up and testing the ros2_control framework.