Skip to content

Convert last of pub/sub getters to pybind11#733

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

Convert last of pub/sub getters to pybind11#733
gbalke merged 9 commits intoros2:masterfrom
gbalke:last_of_pubsub

Conversation

@gbalke
Copy link
Copy Markdown
Contributor

@gbalke gbalke commented Mar 23, 2021

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 <greg@openrobotics.org>
Signed-off-by: Greg Balke <greg@openrobotics.org>
Signed-off-by: Greg Balke <greg@openrobotics.org>
@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 <greg@openrobotics.org>
@sloretz sloretz mentioned this pull request Mar 24, 2021
34 tasks
Signed-off-by: Greg Balke <greg@openrobotics.org>
@gbalke
Copy link
Copy Markdown
Contributor Author

gbalke commented Mar 24, 2021

@ros-pull-request-builder retest this please

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
Copy link
Copy Markdown
Contributor

hidmic commented Mar 24, 2021

Also, this boy needs a rebase.

Signed-off-by: Greg Balke <greg@openrobotics.org>
@gbalke
Copy link
Copy Markdown
Contributor Author

gbalke commented Mar 24, 2021

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 <greg@openrobotics.org>
@gbalke gbalke requested a review from hidmic March 24, 2021 22:09
Copy link
Copy Markdown
Contributor

@hidmic hidmic left a comment

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

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
Signed-off-by: Greg Balke <greg@openrobotics.org>
Signed-off-by: Greg Balke <greg@openrobotics.org>
@gbalke
Copy link
Copy Markdown
Contributor Author

gbalke commented Mar 24, 2021

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