Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cloudini_ros/test/test_plugin_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ class CloudiniPluginPublisherTestNode : public rclcpp::Node {
RCLCPP_INFO(this->get_logger(), "Subscribing to: %s", input_topic.c_str());
RCLCPP_INFO(this->get_logger(), "Publishing to: %s", output_topic.c_str());

// Create point_cloud_transport publisher
pct_ = std::make_shared<point_cloud_transport::PointCloudTransport>(shared_from_this());
// Create point_cloud_transport publisher. PointCloudTransport binds the node by
// non-const lvalue ref (rclcpp::NodeInterfaces), so pass a named lvalue — Rolling
// dropped the deprecated by-value Node::SharedPtr ctor.
std::shared_ptr<rclcpp::Node> node = shared_from_this();
pct_ = std::make_shared<point_cloud_transport::PointCloudTransport>(node);
transport_publisher_ = pct_->advertise(output_topic, 10);

// Create standard ROS2 subscriber
Expand Down
5 changes: 4 additions & 1 deletion cloudini_ros/test/test_plugin_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class CloudiniPluginTestNode : public rclcpp::Node {
RCLCPP_INFO(this->get_logger(), "Subscribing to topic: %s", topic.c_str());
RCLCPP_INFO(this->get_logger(), "Using transport: %s", transport.c_str());

pct_ = std::make_shared<point_cloud_transport::PointCloudTransport>(shared_from_this());
// PointCloudTransport binds the node by non-const lvalue ref (rclcpp::NodeInterfaces),
// so pass a named lvalue — Rolling dropped the deprecated by-value Node::SharedPtr ctor.
std::shared_ptr<rclcpp::Node> node = shared_from_this();
pct_ = std::make_shared<point_cloud_transport::PointCloudTransport>(node);

// Create transport hints to specify which compression to use
auto transport_hint = std::make_shared<point_cloud_transport::TransportHints>(transport);
Expand Down
Loading