29 #ifndef EXPLORATION_TRANSFORM_VIS_H___ 30 #define EXPLORATION_TRANSFORM_VIS_H___ 32 #include <sensor_msgs/PointCloud.h> 56 unsigned int size = size_x * size_y;
60 for (
size_t i = 0; i < size; ++i){
61 if ((exploration_array[i] < INT_MAX) && (exploration_array[i] > max)){
62 max = exploration_array[i];
66 float max_f =
static_cast<float>(max);
68 sensor_msgs::PointCloud cloud;
69 cloud.header.frame_id =
"/map";
72 double x_world, y_world;
74 geometry_msgs::Point32 point;
76 for (
size_t x = 0;
x < size_x; ++
x){
77 for (
size_t y = 0;
y < size_y; ++
y){
81 if (exploration_array[index] < INT_MAX){
86 point.z =
static_cast<float>(exploration_array[index])/max_f;
88 cloud.points.push_back(point);
void publish(const boost::shared_ptr< M > &message) const
void mapToWorld(unsigned int mx, unsigned int my, double &wx, double &wy) const
TFSIMD_FORCE_INLINE const tfScalar & y() const
TFSIMD_FORCE_INLINE const tfScalar & x() const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
unsigned int getSizeInCellsY() const
unsigned int getSizeInCellsX() const
uint32_t getNumSubscribers() const
unsigned int getIndex(unsigned int mx, unsigned int my) const