Skip to content

Add rosidl_runtime_py package#34

Merged
jacobperron merged 2 commits intomasterfrom
rosidl_runtime_py
Mar 28, 2019
Merged

Add rosidl_runtime_py package#34
jacobperron merged 2 commits intomasterfrom
rosidl_runtime_py

Conversation

@jacobperron
Copy link
Member

Migrated utility functions for working with Python ROS messages from the package ros2topic.

The intention is to reuse these functions in other CLI tools: ros2service and ros2action.

Replaces ros2/rclpy#285.

@jacobperron jacobperron added the in progress Actively being worked on (Kanban column) label Mar 15, 2019
@jacobperron
Copy link
Member Author

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

@jacobperron
Copy link
Member Author

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

@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 15, 2019
Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

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

Some of the code seems to be copied from other repos. Please provide exact links to the copied snippets to allow evaluating that they are the same. I think some of them might also have changed since this PR was created and need to be updated.

Migrated utility functions for working with Python ROS messages from the package `ros2topic`.

Conversion implementation taken from:

https://github.com/ros2/ros2cli/blob/978fc8807cb1f70b5f9c2b085e7b6fa74d191d0e/ros2topic/ros2topic/verb/echo.py

Set message implementation taken from

https://github.com/ros2/ros2cli/blob/978fc8807cb1f70b5f9c2b085e7b6fa74d191d0e/ros2topic/ros2topic/api/__init__.py#L93-L119

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add docstrings and annotations.
* Rename 'msg' -> 'message'
* Add more tests
* Remove default value from getattr in convert function
* Remove custom SetFieldError exception

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member Author

I've gone back and grabbed the latest code from ros2topic and put the initial migration in its own commit before my changes so the diff should be more clear.

Conversion implementation taken from:

https://github.com/ros2/ros2cli/blob/978fc8807cb1f70b5f9c2b085e7b6fa74d191d0e/ros2topic/ros2topic/verb/echo.py

Set message implementation taken from:

https://github.com/ros2/ros2cli/blob/978fc8807cb1f70b5f9c2b085e7b6fa74d191d0e/ros2topic/ros2topic/api/__init__.py#L93-L119

@jacobperron
Copy link
Member Author

The subsequent replacement in ros2cli: ros2/ros2cli#209

Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

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

I would suggest to merge without squashing to keep the two commits separate.

@jacobperron
Copy link
Member Author

Thanks for the review!

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

@jacobperron jacobperron merged commit 4fe2166 into master Mar 28, 2019
@jacobperron jacobperron deleted the rosidl_runtime_py branch March 28, 2019 21:36
@jacobperron jacobperron removed the in review Waiting for review (Kanban column) label Mar 28, 2019
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