From cb2fb5431eebe1a11406210df0adc178670bf042 Mon Sep 17 00:00:00 2001 From: William Woodall Date: Wed, 8 May 2019 14:25:01 -0700 Subject: [PATCH] changes to avoid deprecated API's (#399) Signed-off-by: William Woodall --- rviz_common/include/rviz_common/ros_topic_display.hpp | 7 +++++-- .../displays/camera/camera_display.cpp | 7 +++++-- .../src/rviz_default_plugins/displays/map/map_display.cpp | 7 +++++-- .../displays/marker/marker_display.cpp | 7 +++++-- .../src/rviz_default_plugins/tools/nav_goal/goal_tool.cpp | 2 +- .../src/rviz_default_plugins/tools/point/point_tool.cpp | 4 +++- .../tools/pose_estimate/initial_pose_tool.cpp | 2 +- .../publishers/camera_info_publisher.hpp | 2 +- .../publishers/fluid_pressure_publisher.hpp | 2 +- .../publishers/grid_cells_publisher.hpp | 2 +- .../publishers/illuminance_publisher.hpp | 2 +- .../rviz_default_plugins/publishers/image_publisher.hpp | 2 +- .../publishers/laser_scan_publisher.hpp | 2 +- .../test/rviz_default_plugins/publishers/map_publisher.hpp | 2 +- .../publishers/marker_array_publisher.hpp | 3 ++- .../rviz_default_plugins/publishers/marker_publisher.hpp | 4 ++-- .../rviz_default_plugins/publishers/odometry_publisher.hpp | 2 +- .../rviz_default_plugins/publishers/path_publisher.hpp | 2 +- .../publishers/point_cloud2_publisher.hpp | 2 +- .../publishers/point_cloud_publisher.hpp | 2 +- .../publishers/point_stamped_publisher.hpp | 2 +- .../publishers/pose_array_publisher.hpp | 2 +- .../rviz_default_plugins/publishers/pose_publisher.hpp | 2 +- .../rviz_default_plugins/publishers/range_publisher.hpp | 2 +- .../publishers/relative_humidity_publisher.hpp | 2 +- .../publishers/single_marker_publisher.hpp | 2 +- .../publishers/temperature_publisher.hpp | 2 +- 27 files changed, 47 insertions(+), 32 deletions(-) diff --git a/rviz_common/include/rviz_common/ros_topic_display.hpp b/rviz_common/include/rviz_common/ros_topic_display.hpp index fdfdcbbc7..e2de9417a 100644 --- a/rviz_common/include/rviz_common/ros_topic_display.hpp +++ b/rviz_common/include/rviz_common/ros_topic_display.hpp @@ -183,12 +183,15 @@ class RosTopicDisplay : public _RosTopicDisplay } try { + // TODO(wjwwood): update this class to use rclcpp::QoS. + auto qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(qos_profile)); + qos.get_rmw_qos_profile() = qos_profile; // TODO(anhosi,wjwwood): replace with abstraction for subscriptions once available subscription_ = rviz_ros_node_.lock()->get_raw_node()->template create_subscription( topic_property_->getTopicStd(), - [this](const typename MessageType::ConstSharedPtr message) {incomingMessage(message);}, - qos_profile); + qos, + [this](const typename MessageType::ConstSharedPtr message) {incomingMessage(message);}); setStatus(properties::StatusProperty::Ok, "Topic", "OK"); } catch (rclcpp::exceptions::InvalidTopicNameError & e) { setStatus(properties::StatusProperty::Error, "Topic", diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/camera/camera_display.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/camera/camera_display.cpp index e81a695e0..a4951df80 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/camera/camera_display.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/camera/camera_display.cpp @@ -279,16 +279,19 @@ void CameraDisplay::subscribe() void CameraDisplay::createCameraInfoSubscription() { try { + // TODO(wjwwood): update this class to use rclcpp::QoS. + auto qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(qos_profile)); + qos.get_rmw_qos_profile() = qos_profile; // TODO(anhosi,wjwwood): replace with abstraction for subscriptions one available caminfo_sub_ = rviz_ros_node_.lock()->get_raw_node()-> template create_subscription( topic_property_->getTopicStd() + "/camera_info", + qos, [this](sensor_msgs::msg::CameraInfo::ConstSharedPtr msg) { std::unique_lock lock(caminfo_mutex_); current_caminfo_ = msg; new_caminfo_ = true; - }, - qos_profile); + }); setStatus(StatusLevel::Ok, CAM_INFO_STATUS, "OK"); } catch (rclcpp::exceptions::InvalidTopicNameError & e) { setStatus(StatusLevel::Error, CAM_INFO_STATUS, QString("Error subscribing: ") + e.what()); diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp index 7b330e925..afed74c0f 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp @@ -187,13 +187,16 @@ void MapDisplay::subscribe() RTDClass::subscribe(); try { + // TODO(wjwwood): update this class to use rclcpp::QoS. + auto qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(qos_profile)); + qos.get_rmw_qos_profile() = qos_profile; update_subscription_ = rviz_ros_node_.lock()->get_raw_node()-> template create_subscription( topic_property_->getTopicStd() + "_updates", + qos, [this](const map_msgs::msg::OccupancyGridUpdate::ConstSharedPtr message) { incomingUpdate(message); - }, - qos_profile); + }); setStatus(rviz_common::properties::StatusProperty::Ok, "Update Topic", "OK"); } catch (rclcpp::exceptions::InvalidTopicNameError & e) { setStatus( diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/marker/marker_display.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/marker/marker_display.cpp index 2a53303fd..f27e2dfd8 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/marker/marker_display.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/marker/marker_display.cpp @@ -74,14 +74,17 @@ void MarkerDisplay::subscribe() void MarkerDisplay::createMarkerArraySubscription() { try { + // TODO(wjwwood): update this class to use rclcpp::QoS. + auto qos = rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(qos_profile)); + qos.get_rmw_qos_profile() = qos_profile; // TODO(anhosi,wjwwood): replace with abstraction for subscriptions one available array_sub_ = rviz_ros_node_.lock()->get_raw_node()-> template create_subscription( topic_property_->getTopicStd() + "_array", + qos, [this](visualization_msgs::msg::MarkerArray::ConstSharedPtr msg) { marker_common_->addMessage(msg); - }, - qos_profile); + }); setStatus(StatusLevel::Ok, "Array Topic", "OK"); } catch (rclcpp::exceptions::InvalidTopicNameError & e) { setStatus(StatusLevel::Error, "Array Topic", QString("Error subscribing: ") + e.what()); diff --git a/rviz_default_plugins/src/rviz_default_plugins/tools/nav_goal/goal_tool.cpp b/rviz_default_plugins/src/rviz_default_plugins/tools/nav_goal/goal_tool.cpp index 6d1433315..ede5dc77b 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/tools/nav_goal/goal_tool.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/tools/nav_goal/goal_tool.cpp @@ -66,7 +66,7 @@ void GoalTool::updateTopic() { // TODO(anhosi, wjwwood): replace with abstraction for publishers once available publisher_ = context_->getRosNodeAbstraction().lock()->get_raw_node()-> - template create_publisher(topic_property_->getStdString()); + template create_publisher(topic_property_->getStdString(), 10); } void GoalTool::onPoseSet(double x, double y, double theta) diff --git a/rviz_default_plugins/src/rviz_default_plugins/tools/point/point_tool.cpp b/rviz_default_plugins/src/rviz_default_plugins/tools/point/point_tool.cpp index 985022aa2..4087d4790 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/tools/point/point_tool.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/tools/point/point_tool.cpp @@ -80,7 +80,9 @@ void PointTool::updateTopic() { // TODO(anhosi, wjwwood): replace with abstraction for publishers once available publisher_ = context_->getRosNodeAbstraction().lock()->get_raw_node()-> - template create_publisher(topic_property_->getStdString()); + template create_publisher( + topic_property_->getStdString(), + 10); } void PointTool::updateAutoDeactivate() {} diff --git a/rviz_default_plugins/src/rviz_default_plugins/tools/pose_estimate/initial_pose_tool.cpp b/rviz_default_plugins/src/rviz_default_plugins/tools/pose_estimate/initial_pose_tool.cpp index c748faeb1..4bbed6d9f 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/tools/pose_estimate/initial_pose_tool.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/tools/pose_estimate/initial_pose_tool.cpp @@ -65,7 +65,7 @@ void InitialPoseTool::updateTopic() // TODO(anhosi, wjwwood): replace with abstraction for publishers once available publisher_ = context_->getRosNodeAbstraction().lock()->get_raw_node()-> template create_publisher( - topic_property_->getStdString()); + topic_property_->getStdString(), 10); } void InitialPoseTool::onPoseSet(double x, double y, double theta) diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/camera_info_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/camera_info_publisher.hpp index 0b6c1d43e..ecbec9442 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/camera_info_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/camera_info_publisher.hpp @@ -46,7 +46,7 @@ class CameraInfoPublisher : public rclcpp::Node CameraInfoPublisher() : Node("camera_info_publisher") { - publisher = this->create_publisher("/image/camera_info"); + publisher = this->create_publisher("/image/camera_info", 10); timer = this->create_wall_timer(500ms, std::bind(&CameraInfoPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp index 3cb82468d..5d1510f62 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp @@ -62,7 +62,7 @@ class FluidPressurePublisher : public rclcpp::Node FluidPressurePublisher::FluidPressurePublisher() : Node("fluid_pressure_publisher"), fluid_pressure_(0.) { - publisher_ = this->create_publisher("fluid_pressure"); + publisher_ = this->create_publisher("fluid_pressure", 10); auto timer_callback = [this]() -> void { diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/grid_cells_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/grid_cells_publisher.hpp index 0c767e5cd..c97243c5e 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/grid_cells_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/grid_cells_publisher.hpp @@ -49,7 +49,7 @@ class GridCellsPublisher : public rclcpp::Node GridCellsPublisher() : Node("grid_cells_publisher") { - publisher = this->create_publisher("grid_cells"); + publisher = this->create_publisher("grid_cells", 10); timer = this->create_wall_timer(500ms, std::bind(&GridCellsPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/illuminance_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/illuminance_publisher.hpp index 9e03c0a41..d085bab6e 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/illuminance_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/illuminance_publisher.hpp @@ -62,7 +62,7 @@ class IlluminancePublisher : public rclcpp::Node IlluminancePublisher::IlluminancePublisher() : Node("illuminance_publisher"), illuminance_(0.) { - publisher_ = this->create_publisher("illuminance"); + publisher_ = this->create_publisher("illuminance", 10); auto timer_callback = [this]() -> void { diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/image_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/image_publisher.hpp index f2e4ef81d..544c4c24d 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/image_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/image_publisher.hpp @@ -60,7 +60,7 @@ class ImagePublisher : public rclcpp::Node ImagePublisher() : Node("image_publisher") { - publisher = this->create_publisher("image"); + publisher = this->create_publisher("image", 10); timer = this->create_wall_timer(100ms, std::bind(&ImagePublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/laser_scan_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/laser_scan_publisher.hpp index 9ab3acbdc..18e4bacb6 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/laser_scan_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/laser_scan_publisher.hpp @@ -52,7 +52,7 @@ class LaserScanPublisher : public rclcpp::Node timer_(nullptr), publisher_(nullptr) { - publisher_ = this->create_publisher("laser_scan"); + publisher_ = this->create_publisher("laser_scan", 10); timer_ = this->create_wall_timer(500ms, std::bind(&LaserScanPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/map_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/map_publisher.hpp index 0f3b4834f..9e51237b8 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/map_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/map_publisher.hpp @@ -51,7 +51,7 @@ class MapPublisher : public rclcpp::Node MapPublisher() : Node("map_publisher") { - publisher = this->create_publisher("map"); + publisher = this->create_publisher("map", 10); timer = this->create_wall_timer(500ms, std::bind(&MapPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_array_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_array_publisher.hpp index 62a5d6b08..3ceeba4f1 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_array_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_array_publisher.hpp @@ -57,7 +57,8 @@ class MarkerArrayPublisher : public MarkerPublisher MarkerArrayPublisher() : MarkerPublisher("marker_array_publisher") { - array_publisher_ = this->create_publisher("marker_array"); + array_publisher_ = + this->create_publisher("marker_array", 10); } private: diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_publisher.hpp index ce467ec86..7a992ab10 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/marker_publisher.hpp @@ -56,7 +56,7 @@ class MarkerPublisher : public rclcpp::Node MarkerPublisher() : Node("marker_publisher") { - publisher_ = this->create_publisher("marker"); + publisher_ = this->create_publisher("marker", 10); timer_ = this->create_wall_timer(200ms, std::bind(&MarkerPublisher::timer_callback, this)); } @@ -65,7 +65,7 @@ class MarkerPublisher : public rclcpp::Node : Node(node_name) { timer_ = this->create_wall_timer(200ms, std::bind(&MarkerPublisher::timer_callback, this)); - publisher_ = this->create_publisher("marker"); + publisher_ = this->create_publisher("marker", 10); } protected: diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/odometry_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/odometry_publisher.hpp index d1065e880..7c718ca3f 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/odometry_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/odometry_publisher.hpp @@ -54,7 +54,7 @@ class OdometryPublisher : public rclcpp::Node OdometryPublisher() : Node("odometry_publisher") { - publisher = this->create_publisher("odometry"); + publisher = this->create_publisher("odometry", 10); timer = this->create_wall_timer(200ms, std::bind(&OdometryPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/path_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/path_publisher.hpp index ff26c8105..2cb817bb6 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/path_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/path_publisher.hpp @@ -51,7 +51,7 @@ class PathPublisher : public rclcpp::Node PathPublisher() : Node("path_publisher") { - publisher = this->create_publisher("path"); + publisher = this->create_publisher("path", 10); timer = this->create_wall_timer(500ms, std::bind(&PathPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud2_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud2_publisher.hpp index 503e86094..2f56d5df9 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud2_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud2_publisher.hpp @@ -65,7 +65,7 @@ class PointCloud2Publisher : public rclcpp::Node timer_(nullptr), publisher_(nullptr) { - publisher_ = this->create_publisher("pointcloud2"); + publisher_ = this->create_publisher("pointcloud2", 10); timer_ = this->create_wall_timer(500ms, std::bind(&PointCloud2Publisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud_publisher.hpp index 580555f90..dbb4d2701 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_cloud_publisher.hpp @@ -64,7 +64,7 @@ class PointCloudPublisher : public rclcpp::Node publisher_(nullptr), points_(points) { - publisher_ = this->create_publisher("pointcloud"); + publisher_ = this->create_publisher("pointcloud", 10); timer_ = this->create_wall_timer(500ms, std::bind(&PointCloudPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_stamped_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_stamped_publisher.hpp index 8ee56f1c5..77208f028 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/point_stamped_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/point_stamped_publisher.hpp @@ -47,7 +47,7 @@ class PointStampedPublisher : public rclcpp::Node PointStampedPublisher() : Node("point_publisher") { - publisher = this->create_publisher("point"); + publisher = this->create_publisher("point", 10); timer = this->create_wall_timer( 500ms, std::bind(&PointStampedPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_array_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_array_publisher.hpp index fb5f35f00..a8c3e6753 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_array_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_array_publisher.hpp @@ -47,7 +47,7 @@ class PoseArrayPublisher : public rclcpp::Node PoseArrayPublisher() : Node("pose_array_publisher") { - publisher = this->create_publisher("pose_array"); + publisher = this->create_publisher("pose_array", 10); timer = this->create_wall_timer(500ms, std::bind(&PoseArrayPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_publisher.hpp index 0a783acee..417fa2415 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/pose_publisher.hpp @@ -47,7 +47,7 @@ class PosePublisher : public rclcpp::Node PosePublisher() : Node("pose_publisher") { - publisher = this->create_publisher("pose"); + publisher = this->create_publisher("pose", 10); timer = this->create_wall_timer(500ms, std::bind(&PosePublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/range_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/range_publisher.hpp index d25a78d5f..173759e9a 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/range_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/range_publisher.hpp @@ -50,7 +50,7 @@ class RangePublisher : public rclcpp::Node RangePublisher() : Node("range_publisher") { - publisher = this->create_publisher("range"); + publisher = this->create_publisher("range", 10); timer = this->create_wall_timer(500ms, std::bind(&RangePublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/relative_humidity_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/relative_humidity_publisher.hpp index 269bdf3d4..c4b633e68 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/relative_humidity_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/relative_humidity_publisher.hpp @@ -62,7 +62,7 @@ class RelativeHumidityPublisher : public rclcpp::Node RelativeHumidityPublisher::RelativeHumidityPublisher() : Node("relative_humidity_publisher"), relative_humidity_(0.) { - publisher_ = this->create_publisher("relative_humidity"); + publisher_ = this->create_publisher("relative_humidity", 10); auto timer_callback = [this]() -> void { diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/single_marker_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/single_marker_publisher.hpp index 0c284b558..c7337270d 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/single_marker_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/single_marker_publisher.hpp @@ -54,7 +54,7 @@ class SingleMarkerPublisher : public rclcpp::Node SingleMarkerPublisher() : Node("marker_publisher") { - publisher = this->create_publisher("marker"); + publisher = this->create_publisher("marker", 10); timer = this->create_wall_timer(200ms, std::bind(&SingleMarkerPublisher::timer_callback, this)); } diff --git a/rviz_default_plugins/test/rviz_default_plugins/publishers/temperature_publisher.hpp b/rviz_default_plugins/test/rviz_default_plugins/publishers/temperature_publisher.hpp index 80b96db34..2764d43e8 100644 --- a/rviz_default_plugins/test/rviz_default_plugins/publishers/temperature_publisher.hpp +++ b/rviz_default_plugins/test/rviz_default_plugins/publishers/temperature_publisher.hpp @@ -62,7 +62,7 @@ class TemperaturePublisher : public rclcpp::Node TemperaturePublisher::TemperaturePublisher() : Node("temperature_publisher"), temperature_(0.) { - publisher_ = this->create_publisher("temperature"); + publisher_ = this->create_publisher("temperature", 10); auto timer_callback = [this]() -> void {