Skip to content

Dynamic message publishers and subscribers #492

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

luca-della-vedova
Copy link
Collaborator

This PR revives #262 from @nnmm (as evident from the first commit that actually does 95% of the work!), with a few minor updates:

  • Solve whatever merge conflict from 3 years ago and bring up to date with latest supported ROS distros.
  • Migrate to the new pub/sub async workers APIs.
  • Make some of the public API a bit more robust (i.e. introduce a struct for message types rather than having to rely on strings).
  • Add tests for basic pub / sub behavior to validate that this is actually working.

I'll admit that most of the code under field_access (where the casting and reinterpreting of arbitrary messages is done) is a bit out of my comfort zone, however loopback tests, message serialization and deserialization seem to work so it is at least doing something sensible.

Following the initial implementation this is all under a dyn_msg feature flag, but I'm not 100% convinced that the additional [cfg(feature = "dyn_msg")] directives that are scattered throughout the codebase are worth it. Specifically on my (very overpowered) machine a clean build with dyn_msg enabled builds a total of 93 packages while a clean build without the feature builds 89 packages. The compile time difference itself is hard to detect.

Originally, the PR was split into a separate one that only included the message structure. I'm happy to split this into smaller chunks if that makes it easier to review but I thought I would show what a full implementation looks like first.

This only tackles messages, publishers and subscribers. Services (and actions) are left as a future implementation.

nnmm and others added 30 commits November 3, 2022 14:35
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants