#include <GridMapVisualization.hpp>
Public Member Functions | |
void | callback (const grid_map_msgs::GridMap &message) |
GridMapVisualization (ros::NodeHandle &nodeHandle, const std::string ¶meterName) | |
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. | |
ros::Timer | activityCheckTimer_ |
Timer to check the activity of the visualizations. | |
VisualizationFactory | factory_ |
Visualization factory. | |
bool | isSubscribed_ |
If the grid map visualization is subscribed to the grid map. | |
ros::Subscriber | mapSubscriber_ |
ROS subscriber to the grid map. | |
std::string | mapTopic_ |
Topic name of the grid map to be visualized. | |
ros::NodeHandle & | nodeHandle_ |
ROS nodehandle. | |
std::vector< std::shared_ptr < VisualizationBase > > | visualizations_ |
List of visualizations. | |
std::string | visualizationsParameter_ |
Parameter name of the visualizer configuration list. |
Visualizes a grid map by publishing different topics that can be viewed in Rviz.
Definition at line 31 of file GridMapVisualization.hpp.
grid_map_visualization::GridMapVisualization::GridMapVisualization | ( | ros::NodeHandle & | nodeHandle, |
const std::string & | parameterName | ||
) |
Constructor.
nodeHandle | the ROS node handle. |
Definition at line 18 of file GridMapVisualization.cpp.
Destructor.
Definition at line 33 of file GridMapVisualization.cpp.
void grid_map_visualization::GridMapVisualization::callback | ( | const grid_map_msgs::GridMap & | message | ) |
Callback function for the grid map.
message | the grid map message to be visualized. |
Definition at line 158 of file GridMapVisualization.cpp.
bool grid_map_visualization::GridMapVisualization::initialize | ( | ) | [private] |
Initialization.
Definition at line 125 of file GridMapVisualization.cpp.
bool grid_map_visualization::GridMapVisualization::readParameters | ( | ) | [private] |
Read parameters from ROS.
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.
timerEvent | the timer event. |
Definition at line 135 of file GridMapVisualization.cpp.
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.
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.