Nav2 Navigation Stack - lyrical  lyrical
ROS 2 Navigation Stack
Public Member Functions | List of all members
nav2_costmap_2d::Costmap2DPublisher Class Reference

A tool to periodically publish visualization data from a Costmap2D. More...

#include <nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp>

Public Member Functions

 Costmap2DPublisher (const nav2::LifecycleNode::WeakPtr &parent, Costmap2D *costmap, std::string global_frame, std::string topic_name, bool always_send_full_costmap=false, double map_vis_z=0.0)
 Constructor for the Costmap2DPublisher.
 
 ~Costmap2DPublisher ()
 Destructor.
 
void on_configure ()
 Configure node.
 
void on_activate ()
 Activate node.
 
void on_deactivate ()
 deactivate node
 
void on_cleanup ()
 Cleanup node.
 
void updateBounds (unsigned int x0, unsigned int xn, unsigned int y0, unsigned int yn)
 Include the given bounds in the changed-rectangle.
 
void publishCostmap ()
 Publishes the visualization data over ROS. More...
 

Detailed Description

A tool to periodically publish visualization data from a Costmap2D.

Definition at line 65 of file costmap_2d_publisher.hpp.

Member Function Documentation

◆ publishCostmap()

void nav2_costmap_2d::Costmap2DPublisher::publishCostmap ( )

Publishes the visualization data over ROS.

Note
Only publishes when the associated layer is enabled

Definition at line 237 of file costmap_2d_publisher.cpp.

References nav2_costmap_2d::Costmap2D::getOriginX(), nav2_costmap_2d::Costmap2D::getOriginY(), nav2_costmap_2d::Costmap2D::getResolution(), nav2_costmap_2d::Costmap2D::getSizeInCellsX(), and nav2_costmap_2d::Costmap2D::getSizeInCellsY().

Here is the call graph for this function:

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