Skip to content

Convert last of pub/sub getters to pybind11 - #733

Merged
gbalke merged 9 commits into
ros2:masterfrom
gbalke:last_of_pubsub
Mar 25, 2021
Merged

gbalke merged 9 commits into
ros2:masterfrom
gbalke:last_of_pubsub

Conversation

@gbalke

@gbalke gbalke commented Mar 23, 2021

Copy link
Copy Markdown
Contributor

Part of #665.

This handles:

rclpy_get_publisher_logger_name
rclpy_get_publishers_info_by_topic
rclpy_get_subscriptions_info_by_topic

Greg Balke added 3 commits March 23, 2021 15:01
Signed-off-by: Greg Balke <[email protected]>
Signed-off-by: Greg Balke <[email protected]>
Signed-off-by: Greg Balke <[email protected]>
@gbalke
gbalke requested review from hidmic and sloretz March 23, 2021 23:48
@gbalke gbalke self-assigned this Mar 23, 2021
Signed-off-by: Greg Balke <[email protected]>
Comment thread rclpy/src/rclpy/graph.cpp Resolved
Comment thread rclpy/src/rclpy/graph.cpp Resolved
Comment thread rclpy/src/rclpy/graph.hpp Resolved
Comment thread rclpy/src/rclpy/graph.hpp Resolved
Comment thread rclpy/src/rclpy/publisher.hpp Resolved
Comment thread rclpy/src/rclpy/graph.cpp Resolved
@sloretz sloretz mentioned this pull request Mar 24, 2021
32 of 34 tasks
Comment thread rclpy/src/rclpy/graph.cpp Resolved
@gbalke

gbalke commented Mar 24, 2021

Copy link
Copy Markdown
Contributor Author

@ros-pull-request-builder retest this please

Comment thread rclpy/src/rclpy/graph.cpp Outdated
if (RCL_RET_UNSUPPORTED == ret) {
throw RCLError(
"Failed to get information by topic. "
"Function not supported by RMW_IMPLEMENTATION");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@gbalke I think it'd be best not to change the exception type (used to be NotImplementedError). You may add a new exception and register a translator to PyExc_NotImplementedError, see https://pybind11.readthedocs.io/en/stable/advanced/exceptions.html#registering-custom-translators.

CC @sloretz for feedback.

@hidmic

hidmic commented Mar 24, 2021

Copy link
Copy Markdown
Contributor

Also, this boy needs a rebase.

@gbalke

gbalke commented Mar 24, 2021

Copy link
Copy Markdown
Contributor Author

Also, this boy needs a rebase.

Doesn't really matter as I'm going to squash and merge in the end?

Signed-off-by: Greg Balke <[email protected]>
@gbalke
gbalke requested a review from hidmic March 24, 2021 22:09

@hidmic hidmic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM but for a few minor comments

Comment thread rclpy/src/rclpy/graph.cpp Resolved
Comment thread rclpy/src/rclpy/graph.cpp Resolved
using RCLError::RCLError;
};

class NotImplementedError : public RCLError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@gbalke hmm, does RCL_RET_UNSUPPORTED set an rcl error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Greg Balke added 2 commits March 24, 2021 15:46
@gbalke

gbalke commented Mar 24, 2021

Copy link
Copy Markdown
Contributor Author

CI up to rclpy

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

@gbalke
gbalke merged commit 6765802 into ros2:master Mar 25, 2021
@gbalke
gbalke deleted the last_of_pubsub branch March 25, 2021 17:23
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