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

fix logic around populating arrays #62

Merged
merged 1 commit into from
May 30, 2019
Merged

Conversation

dirk-thomas
Copy link
Member

Fixes #61 which is a consequence direct consequence of #59.

For array fields there is no need to try/except the construction. If it fails the exception should be raised as is.

This makes both examples work:

  • ros2 topic pub -r 5 /joy sensor_msgs/Joy "{header:{stamp:{sec: 0, nanosec: 0}, frame_id: 'frame'}, axes:[0.0], buttons:[0]}"
  • ros2 topic pub -r 5 /foo std_msgs/Int32MultiArray '{layout: {dim: [{label: 'foo', size: 5, stride: 4}], data_offset: 12}, data: [1, 5.0]}'

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas added bug Something isn't working in review Waiting for review (Kanban column) labels May 30, 2019
@dirk-thomas dirk-thomas self-assigned this May 30, 2019
@dirk-thomas
Copy link
Member Author

CI up to rosidl_runtime_py:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Yep, this fixes the problems for me.

@dirk-thomas dirk-thomas merged commit 3a53519 into master May 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/fix61 branch May 30, 2019 23:29
jacobperron pushed a commit to ros2/rosidl_runtime_py that referenced this pull request Sep 19, 2019
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to publish an invalid array type gives opaque error message
3 participants