Public Member Functions | Private Member Functions | Private Attributes | List of all members
grid_map_visualization::GridMapVisualization Class Reference

#include <GridMapVisualization.hpp>

Public Member Functions

void callback (const grid_map_msgs::GridMap &message)
 
 GridMapVisualization (ros::NodeHandle &nodeHandle, const std::string &parameterName)
 
virtual ~GridMapVisualization ()
 

Private Member Functions

bool initialize ()
 
bool readParameters ()
 
void updateSubscriptionCallback (const ros::TimerEvent &timerEvent)
 

Private Attributes

ros::Duration activityCheckDuration_
 Duration of checking the activity of the visualizations. More...
 
ros::Timer activityCheckTimer_
 Timer to check the activity of the visualizations. More...
 
VisualizationFactory factory_
 Visualization factory. More...
 
bool isSubscribed_
 If the grid map visualization is subscribed to the grid map. More...
 
ros::Subscriber mapSubscriber_
 ROS subscriber to the grid map. More...
 
std::string mapTopic_
 Topic name of the grid map to be visualized. More...
 
ros::NodeHandlenodeHandle_
 ROS nodehandle. More...
 
std::vector< std::shared_ptr< VisualizationBase > > visualizations_
 List of visualizations. More...
 
std::string visualizationsParameter_
 Parameter name of the visualizer configuration list. More...
 

Detailed Description

Visualizes a grid map by publishing different topics that can be viewed in Rviz.

Definition at line 31 of file GridMapVisualization.hpp.

Constructor & Destructor Documentation

grid_map_visualization::GridMapVisualization::GridMapVisualization ( ros::NodeHandle nodeHandle,
const std::string &  parameterName 
)

Constructor.

Parameters
nodeHandlethe ROS node handle.

Definition at line 18 of file GridMapVisualization.cpp.

grid_map_visualization::GridMapVisualization::~GridMapVisualization ( )
virtual

Destructor.

Definition at line 33 of file GridMapVisualization.cpp.

Member Function Documentation

void grid_map_visualization::GridMapVisualization::callback ( const grid_map_msgs::GridMap &  message)

Callback function for the grid map.

Parameters
messagethe grid map message to be visualized.

Definition at line 158 of file GridMapVisualization.cpp.

bool grid_map_visualization::GridMapVisualization::initialize ( )
private

Initialization.

Returns
true if successful.

Definition at line 125 of file GridMapVisualization.cpp.

bool grid_map_visualization::GridMapVisualization::readParameters ( )
private

Read parameters from ROS.

Returns
true if successful.

Definition at line 37 of file GridMapVisualization.cpp.

void grid_map_visualization::GridMapVisualization::updateSubscriptionCallback ( const ros::TimerEvent timerEvent)
private

Check if visualizations are active (subscribed to), and accordingly cancels/activates the subscription to the grid map to safe bandwidth.

Parameters
timerEventthe timer event.

Definition at line 135 of file GridMapVisualization.cpp.

Member Data Documentation

ros::Duration grid_map_visualization::GridMapVisualization::activityCheckDuration_
private

Duration of checking the activity of the visualizations.

Definition at line 96 of file GridMapVisualization.hpp.

ros::Timer grid_map_visualization::GridMapVisualization::activityCheckTimer_
private

Timer to check the activity of the visualizations.

Definition at line 93 of file GridMapVisualization.hpp.

VisualizationFactory grid_map_visualization::GridMapVisualization::factory_
private

Visualization factory.

Definition at line 90 of file GridMapVisualization.hpp.

bool grid_map_visualization::GridMapVisualization::isSubscribed_
private

If the grid map visualization is subscribed to the grid map.

Definition at line 99 of file GridMapVisualization.hpp.

ros::Subscriber grid_map_visualization::GridMapVisualization::mapSubscriber_
private

ROS subscriber to the grid map.

Definition at line 81 of file GridMapVisualization.hpp.

std::string grid_map_visualization::GridMapVisualization::mapTopic_
private

Topic name of the grid map to be visualized.

Definition at line 84 of file GridMapVisualization.hpp.

ros::NodeHandle& grid_map_visualization::GridMapVisualization::nodeHandle_
private

ROS nodehandle.

Definition at line 75 of file GridMapVisualization.hpp.

std::vector<std::shared_ptr<VisualizationBase> > grid_map_visualization::GridMapVisualization::visualizations_
private

List of visualizations.

Definition at line 87 of file GridMapVisualization.hpp.

std::string grid_map_visualization::GridMapVisualization::visualizationsParameter_
private

Parameter name of the visualizer configuration list.

Definition at line 78 of file GridMapVisualization.hpp.


The documentation for this class was generated from the following files:


grid_map_visualization
Author(s): P├ęter Fankhauser
autogenerated on Tue Jun 25 2019 20:02:32