diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/fluid_pressure/fluid_pressure_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/fluid_pressure/fluid_pressure_display.hpp index 1a2286c4f..2095fb263 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/fluid_pressure/fluid_pressure_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/fluid_pressure/fluid_pressure_display.hpp @@ -56,9 +56,10 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC FluidPressureDisplay FluidPressureDisplay(); ~FluidPressureDisplay() override; -private: +protected: void processMessage(const sensor_msgs::msg::FluidPressure::ConstSharedPtr message) override; +private: void setInitialValues() override; void hideUnneededProperties() override; }; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/illuminance/illuminance_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/illuminance/illuminance_display.hpp index a71b2a937..513bf9ad1 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/illuminance/illuminance_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/illuminance/illuminance_display.hpp @@ -56,9 +56,10 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC IlluminanceDisplay IlluminanceDisplay(); ~IlluminanceDisplay() override; -private: +protected: void processMessage(const sensor_msgs::msg::Illuminance::ConstSharedPtr message) override; +private: void setInitialValues() override; void hideUnneededProperties() override; }; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/marker/marker_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/marker/marker_display.hpp index 297c81450..e678d8c5f 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/marker/marker_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/marker/marker_display.hpp @@ -69,10 +69,9 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerDisplay protected: void subscribe() override; void unsubscribe() override; - -private: void processMessage(visualization_msgs::msg::Marker::ConstSharedPtr msg) override; +private: void createMarkerArraySubscription(); rclcpp::Subscription::SharedPtr array_sub_; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/marker_array/marker_array_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/marker_array/marker_array_display.hpp index fa4637521..cd2856df9 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/marker_array/marker_array_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/marker_array/marker_array_display.hpp @@ -65,9 +65,10 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerArrayDisplay void reset() override; -private: +protected: void processMessage(visualization_msgs::msg::MarkerArray::ConstSharedPtr array) override; +private: std::unique_ptr marker_common_; }; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/pointcloud/point_cloud_common.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/pointcloud/point_cloud_common.hpp index 1b035452a..767fe0c54 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/pointcloud/point_cloud_common.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/pointcloud/point_cloud_common.hpp @@ -178,9 +178,11 @@ private Q_SLOTS: void setXyzTransformerOptions(rviz_common::properties::EnumProperty * prop); void setColorTransformerOptions(rviz_common::properties::EnumProperty * prop); +protected: + void processMessage(sensor_msgs::msg::PointCloud2::ConstSharedPtr cloud); + private: bool transformCloud(const CloudInfoPtr & cloud, bool fully_update_transformers); - void processMessage(sensor_msgs::msg::PointCloud2::ConstSharedPtr cloud); bool transformPoints( const CloudInfoPtr & cloud_info, V_PointCloudPoint & cloud_points, bool update_transformers); void setProblematicPointsToInfinity(V_PointCloudPoint & cloud_points); diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/pose/pose_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/pose/pose_display.hpp index 18b0277cf..7ebf26db0 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/pose/pose_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/pose/pose_display.hpp @@ -89,6 +89,7 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC PoseDisplay : public /** @brief Overridden from MessageFilterDisplay to get arrow/axes visibility correct. */ void onEnable() override; void onDisable() override; + void processMessage(geometry_msgs::msg::PoseStamped::ConstSharedPtr message) override; private Q_SLOTS: void updateShapeVisibility(); @@ -98,7 +99,6 @@ private Q_SLOTS: void updateArrowGeometry(); private: - void processMessage(geometry_msgs::msg::PoseStamped::ConstSharedPtr message) override; void setupSelectionHandler(); std::unique_ptr arrow_; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/pose_covariance/pose_with_covariance_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/pose_covariance/pose_with_covariance_display.hpp index 63c4e5d6d..859158099 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/pose_covariance/pose_with_covariance_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/pose_covariance/pose_with_covariance_display.hpp @@ -89,6 +89,8 @@ class PoseWithCovarianceDisplay protected: /** @brief Overridden from MessageFilterDisplay to get Arrow/Axes visibility correct. */ void onEnable() override; + void + processMessage(geometry_msgs::msg::PoseWithCovarianceStamped::ConstSharedPtr message) override; private Q_SLOTS: void updateShapeVisibility(); @@ -99,8 +101,6 @@ private Q_SLOTS: void updateCovariance(); private: - void - processMessage(geometry_msgs::msg::PoseWithCovarianceStamped::ConstSharedPtr message) override; void setupSelectionHandler(); std::shared_ptr arrow_; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/relative_humidity/relative_humidity_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/relative_humidity/relative_humidity_display.hpp index be96714f3..11700b1f6 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/relative_humidity/relative_humidity_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/relative_humidity/relative_humidity_display.hpp @@ -56,9 +56,10 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC RelativeHumidityDisplay RelativeHumidityDisplay(); ~RelativeHumidityDisplay() override; -private: +protected: void processMessage(const sensor_msgs::msg::RelativeHumidity::ConstSharedPtr message) override; +private: void setInitialValues() override; void hideUnneededProperties() override; }; diff --git a/rviz_default_plugins/include/rviz_default_plugins/displays/temperature/temperature_display.hpp b/rviz_default_plugins/include/rviz_default_plugins/displays/temperature/temperature_display.hpp index 8c9603c0f..ee0a93e57 100644 --- a/rviz_default_plugins/include/rviz_default_plugins/displays/temperature/temperature_display.hpp +++ b/rviz_default_plugins/include/rviz_default_plugins/displays/temperature/temperature_display.hpp @@ -56,6 +56,7 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC TemperatureDisplay TemperatureDisplay(); ~TemperatureDisplay() override; +protected: void processMessage(const sensor_msgs::msg::Temperature::ConstSharedPtr message) override; private: