9 #include <ros/common.h> 12 #include <ros/publisher.h> 16 #include <nav_msgs/OccupancyGrid.h> 20 #include "../../include/cost_map_demos/from_ros_costmaps.hpp" 28 int main(
int argc,
char** argv)
54 cost_map::CostMap cost_map_5x5, cost_map_4x4, cost_map_5x5_3x3_offset, cost_map_5x5_3x3_centre, cost_map_5x5_2_5x2_5_offset;
69 ros::Publisher pub_5x5_3x3_offset = node_handle.
advertise<nav_msgs::OccupancyGrid>(
"converted_5x5_3x3_offset", 1,
true);
70 ros::Publisher pub_5x5_3x3_centre = node_handle.
advertise<nav_msgs::OccupancyGrid>(
"converted_5x5_3x3_centre", 1,
true);
71 ros::Publisher pub_5x5_2_5x2_5_offset = node_handle.
advertise<nav_msgs::OccupancyGrid>(
"converted_5x5_2_5x2_5_offset", 1,
true);
73 nav_msgs::OccupancyGrid occupancy_msg;
77 pub_4x4.publish(occupancy_msg);
79 pub_5x5_3x3_offset.publish(occupancy_msg);
81 pub_5x5_3x3_centre.publish(occupancy_msg);
83 pub_5x5_2_5x2_5_offset.publish(occupancy_msg);
int main(int argc, char **argv)
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void toOccupancyGrid(const cost_map::CostMap &cost_map, const std::string &layer, nav_msgs::OccupancyGrid &msg)
bool fromCostmap2DROS(costmap_2d::Costmap2DROS &ros_costmap, const std::string &layer_name, cost_map::CostMap &cost_map)
grid_map::Position Position
void broadcastCostmap2DROSTestSuiteTransforms(TransformBroadcaster &broadcaster)
const std::vector< std::string > & getLayers() const
ROSCostmapPtr getROSCostmap()
bool fromCostmap2DROSAtRobotPose(costmap_2d::Costmap2DROS &ros_costmap, const cost_map::Length &geometry, const std::string &layer_name, cost_map::CostMap &cost_map)