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

Basic functionality for loading introspection type support libraries #279

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

nnmm
Copy link
Contributor

@nnmm nnmm commented Oct 8, 2022

Given a topic type in the form of a string like "geometry_msgs/msg/Pose", this will

  • Parse the string into the package name "geometry_msgs" and the message name "Pose" (see the MessageTypeName type)
  • Search the ament index for the prefix of the "geometry_msgs" package. In the prefix, the introspection type support library will be in lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so (via the ament_rs crate)
  • Load that library using libloading (see get_type_support_library())
  • Extract the symbol corresponding to the "Pose" type from that library (see get_type_support_handle())

This commit intentionally leaves out an important part of the DynamicMessageMetadata type: The representation of the message structure. This will follow in another commit.

@nnmm nnmm force-pushed the dynamic_messages_2 branch 2 times, most recently from c3e2b31 to 567e782 Compare October 8, 2022 12:48
@nnmm nnmm requested a review from a team October 8, 2022 14:01
@esteve
Copy link
Collaborator

esteve commented Oct 11, 2022

@nnmm have you looked into https://github.com/PlotJuggler/plotjuggler-ros-plugins/tree/development/plugins/ros2_introspection? This may solve a similar problem and/or serve as inspiration.

@nnmm
Copy link
Contributor Author

nnmm commented Oct 11, 2022

@esteve Thanks for the link, I didn't know that one yet. I think my branch already covers the functionality from that package and more.

jhdcs
jhdcs previously approved these changes Oct 17, 2022
Copy link
Collaborator

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the wait, this seems good to me! I don't see any glaring issues, at any rate.

@nnmm
Copy link
Contributor Author

nnmm commented Oct 17, 2022

Thank you very much @jhdcs!

@esteve, do you have any further comments? Otherwise I'll go ahead and merge this.

This commit intentionally leaves out an important part of the DynamicMessageMetadata type:
The representation of the message structure. This will follow in another commit.
@nnmm nnmm force-pushed the dynamic_messages_2 branch from aa77231 to bb90e6f Compare October 26, 2022 18:03
@nnmm
Copy link
Contributor Author

nnmm commented Oct 26, 2022

@jhdcs Could you reapprove? I had to rebase onto main.

@nnmm
Copy link
Contributor Author

nnmm commented Oct 26, 2022

Thank you!

@nnmm nnmm merged commit 3534b0e into main Oct 26, 2022
@delete-merged-branch delete-merged-branch bot deleted the dynamic_messages_2 branch October 26, 2022 18:34
@esteve esteve mentioned this pull request Nov 7, 2023
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.

3 participants