-
Notifications
You must be signed in to change notification settings - Fork 19
Simplify NodeInterface API mehotd call #129
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,11 +88,11 @@ class PublisherPlugin | |
|
|
||
| POINT_CLOUD_TRANSPORT_PUBLIC | ||
| void advertise( | ||
| std::shared_ptr<rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeBaseInterface, | ||
| rclcpp::node_interfaces::NodeParametersInterface, | ||
| rclcpp::node_interfaces::NodeTopicsInterface, | ||
| rclcpp::node_interfaces::NodeLoggingInterface>> node_interfaces, | ||
| rclcpp::node_interfaces::NodeLoggingInterface> node_interfaces, | ||
| const std::string & base_topic, | ||
| rclcpp::QoS custom_qos, | ||
| const rclcpp::PublisherOptions & options = rclcpp::PublisherOptions()); | ||
|
|
@@ -142,13 +142,10 @@ class PublisherPlugin | |
| const rclcpp::PublisherOptions & options = rclcpp::PublisherOptions()) | ||
| { | ||
| advertiseImpl( | ||
| std::make_shared<rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeBaseInterface, | ||
| rclcpp::node_interfaces::NodeParametersInterface, | ||
| rclcpp::node_interfaces::NodeTopicsInterface, | ||
| rclcpp::node_interfaces::NodeLoggingInterface>>(*node), | ||
| base_topic, rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(custom_qos), custom_qos), | ||
| options); | ||
| *node, | ||
| base_topic, | ||
| rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(custom_qos), custom_qos), | ||
| options); | ||
| } | ||
|
|
||
| [[deprecated("Use advertiseImpl(rclcpp::node_interfaces..., rclcpp::QoS, ...) instead")]] | ||
|
|
@@ -163,17 +160,17 @@ class PublisherPlugin | |
| const rclcpp::PublisherOptions & options = rclcpp::PublisherOptions()) | ||
| { | ||
| advertiseImpl( | ||
| node_interfaces, base_topic, | ||
| *node_interfaces.get(), base_topic, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really want to bypass the reference counter here and similar places below?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ahcorde there are a number of places this is done, I only pointed out one instance
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ups, I will fix it
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(custom_qos), custom_qos), | ||
| options); | ||
| } | ||
|
|
||
| virtual void advertiseImpl( | ||
| std::shared_ptr<rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeBaseInterface, | ||
| rclcpp::node_interfaces::NodeParametersInterface, | ||
| rclcpp::node_interfaces::NodeTopicsInterface, | ||
| rclcpp::node_interfaces::NodeLoggingInterface>> node_interfaces, | ||
| rclcpp::node_interfaces::NodeLoggingInterface> node_interfaces, | ||
| const std::string & base_topic, | ||
| rclcpp::QoS custom_qos, | ||
| const rclcpp::PublisherOptions & options = rclcpp::PublisherOptions()) = 0; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Suggestion: Given the repetition of this - you could typedef it to make this more readable. Though, I think also keeping it as-is is useful as a reference for later readers.
Its a trade off between accessibility to general ROS developers reading this and code cleanliness.
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.
It would be better to keep it as it is to avoid possible name conflicts later on as well.
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 will also point out that this is changing a public interface, so we usually do a tick-tock deprecation (same goes for all of the public APIs below).
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 APIs were added on
rolling, I know I already released the package but I would claim that It was unestable.