diff --git a/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc b/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc index 24afad83fe..a8cec773d2 100644 --- a/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc +++ b/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc @@ -75,7 +75,7 @@ class EnvironmentVisualizationTool /// \brief The sample resolution public: gz::msgs::Vector3d vec; - + /// \brief Publisher to publish sample resolution public: transport::Node::Publisher pcPub; diff --git a/src/systems/environment_preload/VisualizationTool.cc b/src/systems/environment_preload/VisualizationTool.cc index e906e75d61..a444ed5992 100644 --- a/src/systems/environment_preload/VisualizationTool.cc +++ b/src/systems/environment_preload/VisualizationTool.cc @@ -32,10 +32,10 @@ void EnvironmentVisualizationTool::CreatePointCloudTopics( for (auto key : _data->frame.Keys()) { - this->pubs.emplace(key, node.Advertise(key)); - gz::msgs::Float_V msg; - this->floatFields.emplace(key, msg); - this->sessions.emplace(key, _data->frame[key].CreateSession()); + this->pubs.emplace(key, node.Advertise(key)); + gz::msgs::Float_V msg; + this->floatFields.emplace(key, msg); + this->sessions.emplace(key, _data->frame[key].CreateSession()); } } @@ -92,7 +92,7 @@ void EnvironmentVisualizationTool::Step( ///////////////////////////////////////////////// void EnvironmentVisualizationTool::Visualize( const std::shared_ptr data, - double _xSamples, double _ySamples, double _zSamples) + double _xSamples, double _ySamples, double _zSamples) { for (auto key : data->frame.Keys()) diff --git a/src/systems/environment_preload/VisualizationTool.hh b/src/systems/environment_preload/VisualizationTool.hh index 3c85e5eee4..5bd6a4eef6 100644 --- a/src/systems/environment_preload/VisualizationTool.hh +++ b/src/systems/environment_preload/VisualizationTool.hh @@ -47,12 +47,13 @@ namespace sim inline namespace GZ_SIM_VERSION_NAMESPACE { -/// \brief This class helps +/// \brief This class helps handle point cloud visuallizations +/// of environment data. class EnvironmentVisualizationTool { /// \brief Environment constructor public: EnvironmentVisualizationTool(); - + /// \brief To synchronize member access. private: std::mutex mutex; @@ -116,16 +117,16 @@ class EnvironmentVisualizationTool /// \brief Publishers for data private: std::unordered_map pubs; - + /// \brief Floating point message buffers private: std::unordered_map floatFields; - + /// \brief GZ buffers private: transport::Node node; /// \brief Point cloud buffer private: gz::msgs::PointCloudPacked pcMsg; - + /// \brief Session cursors private: std::unordered_map> sessions;