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

Fixed code generation to include fully expanded message definition #174

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

Carter12s
Copy link
Collaborator

@Carter12s Carter12s commented Jul 6, 2024

Description

Previously our message_definition provided by Publishers did not include the fully expanded definition. This works fine for most cases, but PlotJuggler was fully parsing the definition for dynamic interaction. This should get our message_definition to be accepted by PlotJuggler.

Fixes

Closes: #173

Checklist

  • Update CHANGELOG.md

@lucasw
Copy link
Contributor

lucasw commented Jul 7, 2024

With this rostopic pub:

rostopic pub /point geometry_msgs/PointStamped "{point: {x: 1.0}}"

I see this from repr(msg._connection_header["message_definition"]) in a PointStamped:

"# This represents a Point with reference coordinate frame and timestamp\nHeader header\nPoint point\n\n================================================================================\nMSG: std_msgs/Header\n# Standard metadata for higher-level stamped data types.\n# This is generally used to communicate timestamped data \n# in a particular coordinate frame.\n# \n# sequence ID: consecutively increasing ID \nuint32 seq\n#Two-integer timestamp that is expressed as:\n# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n# time-handling sugar is provided by the client library\ntime stamp\n#Frame this data is associated with\nstring frame_id\n\n================================================================================\nMSG: geometry_msgs/Point\n# This contains the position of a point in free space\nfloat64 x\nfloat64 y\nfloat64 z\n"

but from a roslibrust node using this branch (at 03d73ac)) it's still not expanding the Header or Point fields:

'# This represents a Point with reference coordinate frame and timestamp\nHeader header\nPoint point'

@Carter12s
Copy link
Collaborator Author

Okay, was able to get to an actual dev environment today where I could directly test this. Found a bug in how I was collecting referenced types that was skipping a layer.

  • Manually confirmed works with plot juggler now
  • Manually confirmed works with rospy
  • Added at least a basic unit test to confirm message generation is generating the expanded types into the future

image

@Carter12s Carter12s merged commit 8e0066c into master Jul 8, 2024
5 checks passed
@Carter12s Carter12s deleted the fix-gendeps-in-message-definition branch August 3, 2024 19:49
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.

Plotjuggler 'Missing ROSType in library' on ros1 node published messages
2 participants