Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
Signed-off-by: Arjo Chakravarty <[email protected]>
  • Loading branch information
arjo129 committed Feb 23, 2023
1 parent ea93a1b commit 4fd5c9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions src/systems/environment_preload/VisualizationTool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ void EnvironmentVisualizationTool::CreatePointCloudTopics(

for (auto key : _data->frame.Keys())
{
this->pubs.emplace(key, node.Advertise<gz::msgs::Float_V>(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<gz::msgs::Float_V>(key));
gz::msgs::Float_V msg;
this->floatFields.emplace(key, msg);
this->sessions.emplace(key, _data->frame[key].CreateSession());
}
}

Expand Down Expand Up @@ -92,7 +92,7 @@ void EnvironmentVisualizationTool::Step(
/////////////////////////////////////////////////
void EnvironmentVisualizationTool::Visualize(
const std::shared_ptr<components::EnvironmentalData> data,
double _xSamples, double _ySamples, double _zSamples)
double _xSamples, double _ySamples, double _zSamples)
{

for (auto key : data->frame.Keys())
Expand Down
11 changes: 6 additions & 5 deletions src/systems/environment_preload/VisualizationTool.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -116,16 +117,16 @@ class EnvironmentVisualizationTool

/// \brief Publishers for data
private: std::unordered_map<std::string, transport::Node::Publisher> pubs;

/// \brief Floating point message buffers
private: std::unordered_map<std::string, gz::msgs::Float_V> floatFields;

/// \brief GZ buffers
private: transport::Node node;

/// \brief Point cloud buffer
private: gz::msgs::PointCloudPacked pcMsg;

/// \brief Session cursors
private: std::unordered_map<std::string,
gz::math::InMemorySession<double, double>> sessions;
Expand Down

0 comments on commit 4fd5c9e

Please sign in to comment.