Skip to content
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

ros2_control: Is it possible to use messages instead of reference interfaces? #5

Closed
dmronga opened this issue Sep 6, 2023 · 4 comments

Comments

@dmronga
Copy link
Contributor

dmronga commented Sep 6, 2023

Passing the control output via the reference interfaces is ugly, since it require serialization of the data, which has to be interpreted correctly by the next controller. Also, if there are many tasks, the number of reference interfaces will explode. Is it possible to use message passing instead

@mhubii
Copy link

mhubii commented Sep 9, 2024

Not sure I get this issue right. The idea of ros2_control is to be topic-free (latency, single access point). The controllers that you implement should only reference basic command / state interface.

The tasks themselves should be topics that the controller expects as input, which is what you have done (from what I can tell). Should this issue therefore be closed?

Refers to https://github.com/openjournals/joss-reviews/issues/6696 (untagging)

@dmronga
Copy link
Contributor Author

dmronga commented Sep 11, 2024

@mhubii This is a design problem of ros2_control (in my opinion) that data between chained controllers (and back/forth to the hardware interface) is passed via double arrays. To me this meant that I have to serialize the data myself, which is error prone and hard to maintain. In WBC I possibly have many reference interfaces (depending on the WBC configuration) with different data types and things get complicated very quickly. So my idea was to use ros2 nodes and ros2 messages instead. In theory the underlying DDS should do shared memory copy, when configured correctly and when 2 ros nodes are executed in the same process. But I get that message passing via topics is never real-time? And we also found that the overhead when you send messages with 1KHz can be significant. I was hoping that there is a different way for providing the state and reference interfaces in ros2_control

@mhubii
Copy link

mhubii commented Sep 11, 2024

hm okay I see, feel free to ignore this for the review btw. Just adding relevant issues:

@dmronga
Copy link
Contributor Author

dmronga commented Sep 12, 2024

Thanks for hints, I will check the options someday I guess. I always wondered if ros2_control is suited for more complex control architecture like MPC, WBC, ...

@dmronga dmronga closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants