A tool to periodically publish visualization data from a Costmap2D. More...
#include <costmap_2d_publisher.h>
Public Member Functions | |
bool | active () |
Check if the publisher is active. | |
Costmap2DPublisher (ros::NodeHandle ros_node, double publish_frequency, std::string global_frame) | |
Constructor for the Costmap2DPublisher. | |
void | publishCostmap () |
Publishes the visualization data over ROS. | |
void | publishFootprint () |
Publishes footprint visualization data over ROS. | |
void | updateCostmapData (const Costmap2D &costmap, const std::vector< geometry_msgs::Point > &footprint=std::vector< geometry_msgs::Point >(), const tf::Stamped< tf::Pose > &global_pose=tf::Stamped< tf::Pose >()) |
Update the visualization data from a Costmap2D. | |
~Costmap2DPublisher () | |
Destructor. | |
Private Member Functions | |
void | mapPublishLoop (double frequency) |
Private Attributes | |
bool | active_ |
std::vector< geometry_msgs::Point > | footprint_ |
ros::Publisher | footprint_pub_ |
std::string | global_frame_ |
tf::Stamped< tf::Pose > | global_pose_ |
ros::Publisher | inf_obs_pub_ |
std::vector< std::pair< double, double > > | inflated_obstacles_ |
double | inscribed_radius_ |
boost::recursive_mutex | lock_ |
A lock. | |
bool | new_data_ |
ros::Publisher | obs_pub_ |
std::vector< std::pair< double, double > > | raw_obstacles_ |
double | resolution_ |
std::vector< std::pair< double, double > > | unknown_space_ |
ros::Publisher | unknown_space_pub_ |
boost::thread * | visualizer_thread_ |
A thread for publising to the visualizer. | |
bool | visualizer_thread_shutdown_ |
A tool to periodically publish visualization data from a Costmap2D.
Definition at line 50 of file costmap_2d_publisher.h.
costmap_2d::Costmap2DPublisher::Costmap2DPublisher | ( | ros::NodeHandle | ros_node, | |
double | publish_frequency, | |||
std::string | global_frame | |||
) |
Constructor for the Costmap2DPublisher.
ros_node | The node under which to publish the visualization output | |
global_frame | The frame in which to publish the visualization output |
Definition at line 40 of file costmap_2d_publisher.cpp.
costmap_2d::Costmap2DPublisher::~Costmap2DPublisher | ( | ) |
Destructor.
Definition at line 51 of file costmap_2d_publisher.cpp.
bool costmap_2d::Costmap2DPublisher::active | ( | ) | [inline] |
Check if the publisher is active.
Definition at line 87 of file costmap_2d_publisher.h.
void costmap_2d::Costmap2DPublisher::mapPublishLoop | ( | double | frequency | ) | [private] |
Definition at line 59 of file costmap_2d_publisher.cpp.
void costmap_2d::Costmap2DPublisher::publishCostmap | ( | ) |
Publishes the visualization data over ROS.
Definition at line 160 of file costmap_2d_publisher.cpp.
void costmap_2d::Costmap2DPublisher::publishFootprint | ( | ) |
Publishes footprint visualization data over ROS.
Definition at line 121 of file costmap_2d_publisher.cpp.
void costmap_2d::Costmap2DPublisher::updateCostmapData | ( | const Costmap2D & | costmap, | |
const std::vector< geometry_msgs::Point > & | footprint = std::vector<geometry_msgs::Point>() , |
|||
const tf::Stamped< tf::Pose > & | global_pose = tf::Stamped<tf::Pose>() | |||
) |
Update the visualization data from a Costmap2D.
costmap | The Costmap2D object to create visualization messages from | |
footprint | The footprint of the robot associated with the costmap |
Definition at line 85 of file costmap_2d_publisher.cpp.
bool costmap_2d::Costmap2DPublisher::active_ [private] |
Definition at line 96 of file costmap_2d_publisher.h.
std::vector<geometry_msgs::Point> costmap_2d::Costmap2DPublisher::footprint_ [private] |
Definition at line 99 of file costmap_2d_publisher.h.
ros::Publisher costmap_2d::Costmap2DPublisher::footprint_pub_ [private] |
Definition at line 97 of file costmap_2d_publisher.h.
std::string costmap_2d::Costmap2DPublisher::global_frame_ [private] |
Definition at line 92 of file costmap_2d_publisher.h.
tf::Stamped<tf::Pose> costmap_2d::Costmap2DPublisher::global_pose_ [private] |
Definition at line 100 of file costmap_2d_publisher.h.
ros::Publisher costmap_2d::Costmap2DPublisher::inf_obs_pub_ [private] |
Definition at line 97 of file costmap_2d_publisher.h.
std::vector< std::pair<double, double> > costmap_2d::Costmap2DPublisher::inflated_obstacles_ [private] |
Definition at line 94 of file costmap_2d_publisher.h.
double costmap_2d::Costmap2DPublisher::inscribed_radius_ [private] |
Definition at line 98 of file costmap_2d_publisher.h.
boost::recursive_mutex costmap_2d::Costmap2DPublisher::lock_ [private] |
A lock.
Definition at line 95 of file costmap_2d_publisher.h.
bool costmap_2d::Costmap2DPublisher::new_data_ [private] |
Definition at line 96 of file costmap_2d_publisher.h.
ros::Publisher costmap_2d::Costmap2DPublisher::obs_pub_ [private] |
Definition at line 97 of file costmap_2d_publisher.h.
std::vector< std::pair<double, double> > costmap_2d::Costmap2DPublisher::raw_obstacles_ [private] |
Definition at line 94 of file costmap_2d_publisher.h.
double costmap_2d::Costmap2DPublisher::resolution_ [private] |
Definition at line 98 of file costmap_2d_publisher.h.
std::vector< std::pair<double, double> > costmap_2d::Costmap2DPublisher::unknown_space_ [private] |
Definition at line 94 of file costmap_2d_publisher.h.
ros::Publisher costmap_2d::Costmap2DPublisher::unknown_space_pub_ [private] |
Definition at line 97 of file costmap_2d_publisher.h.
boost::thread* costmap_2d::Costmap2DPublisher::visualizer_thread_ [private] |
A thread for publising to the visualizer.
Definition at line 93 of file costmap_2d_publisher.h.
bool costmap_2d::Costmap2DPublisher::visualizer_thread_shutdown_ [private] |
Definition at line 101 of file costmap_2d_publisher.h.