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

Add ROS2 array ("sequence<X>") support #39

Open
wants to merge 2 commits into
base: humble
Choose a base branch
from

Conversation

egordon
Copy link

@egordon egordon commented Apr 11, 2023

In response to issue #23.

Unfortunately, get_slot_type in rqt_py_common is now out-of-date, as it doesn't handle sequence types. This PR by-passes that function to allow rqt_publisher to publish array-like messages of type "sequence".

This is done by:

  • Manually catching sequence types (which are represented as list)
  • Manually catching all sequence types (which are represented as array.array)
  • Modifying the eval expression to allow for defining array literals
  • Finally, since array.array does not have a copy constructor, allow for the passing of the direct evaluation if the type matches.

Note: this has only been tested on my personal setup with sensor_msgs/msg/JointState, as I am unsure of a better testing suite.

@egordon
Copy link
Author

egordon commented Jun 14, 2023

Wanted to bump @gbiggs

We've been using our own copy of this repo for months now to publish arrays, wanted to see if you want this upstream merge (happy to put in cycles to fix it if needed) to help others with #23

@styczen
Copy link

styczen commented Jul 20, 2023

Little bump for @gbiggs @egordon
It seems that this problem is already solved with #33 but this is for Rolling. To use it on Humble, one has to build this plugin from source.

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