Simplify NodeInterface API mehotd call#129
Conversation
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
|
If you have some time available I appreciate your reviews @elsayedelsheikh @SteveMacenski |
| POINT_CLOUD_TRANSPORT_PUBLIC | ||
| Publisher create_publisher( | ||
| std::shared_ptr<rclcpp::node_interfaces::NodeInterfaces< | ||
| rclcpp::node_interfaces::NodeInterfaces< |
There was a problem hiding this comment.
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.
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.
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.
These APIs were added on rolling, I know I already released the package but I would claim that It was unestable.
| { | ||
| advertiseImpl( | ||
| node_interfaces, base_topic, | ||
| *node_interfaces.get(), base_topic, |
There was a problem hiding this comment.
Do we really want to bypass the reference counter here and similar places below?
There was a problem hiding this comment.
@ahcorde there are a number of places this is done, I only pointed out one instance
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
point_cloud_transport/include/point_cloud_transport/subscriber_plugin.hpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Remove node_interfaces declaration lines from 84:88
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
|
Pulls: #129, ros2/rviz#1526 |
I simplify the
std::shared_ptrNodeInterfacesto just the typeNodeInterfaces. The motivation is to simplify how the API call is done:now with these changes it's much more simpler:
auto pct = PointCloudTransport(*node, ...);FYI @elsayedelsheikh @SteveMacenski