-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support bounded and unbounded arrays with rqt_plot (This should NOT be merged to crystal) #53
Support bounded and unbounded arrays with rqt_plot (This should NOT be merged to crystal) #53
Conversation
@brawner and @dirk-thomas please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this depends on a PR that changes API and since this adjusts API slightly, I also think this one should be targeting Foxy.
if array_idx < 0: | ||
return slot_type, False, None | ||
topic_type_info = message_field_type_helpers.MessageFieldTypeInfo(topic_type_str) | ||
slot_type = topic_type_info.base_type_str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two variables are not used except as a return, you might as well just put them in the return directly.
if end_array_idx < 0: | ||
return None, False, None | ||
if topic_type_info.is_static_array: | ||
array_size = topic_type_info.static_array_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to create a helper function (in message_helpers.py?) that calculates array size with this information.
src/rqt_plot/plot_widget.py
Outdated
|
||
# TODO: add bytes to this as you could treat bytes as an array of uint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Byte array is standard type, so I think this should be included and nix the TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On further consideration, I don't think we should do this. It would be like plotting the first character of a string. Not that useful imho
Closing in favor of #71. |
This depends on As it depends on ros-visualization/rqt#224
By taking advantage of bounded and unbounded array support in rqt_py_common field parsing, we are able to once again plot values out of variable size arrays with rqt_plot
This change involved more or less reverting rosplot.py, and plot_widget.py to their ros1 equivalents and then using the new RQT_py_common support for dealing with bounded and unbounded arrays.