1#ifndef TERRAIN_MAP_PUBLISHER_H
2#define TERRAIN_MAP_PUBLISHER_H
4#include <ros/package.h>
8#include <grid_map_core/grid_map_core.hpp>
9#include <grid_map_ros/GridMapRosConverter.hpp>
10#include <grid_map_ros/grid_map_ros.hpp>
63 std::vector<std::vector<double> >
loadCSV(std::string filename);
A terrain map publishing class.
Definition terrain_map_publisher.h:33
double resolution_
double for map resolution
Definition terrain_map_publisher.h:116
void spin()
Calls ros spinOnce and pubs data at set frequency.
Definition terrain_map_publisher.cpp:264
ros::Publisher terrain_map_pub_
ROS Publisher for the terrain map.
Definition terrain_map_publisher.h:91
double update_rate_
Definition terrain_map_publisher.h:98
void updateMap()
Updates the map object with params.
Definition terrain_map_publisher.cpp:74
void createMap()
Creates the map object from scratch.
Definition terrain_map_publisher.cpp:63
Step step1_
Step 1 object.
Definition terrain_map_publisher.h:128
Step step2_
Step 2 object.
Definition terrain_map_publisher.h:131
void loadMapFromImage(const sensor_msgs::Image &msg)
Loads data into the map object from an image topic.
Definition terrain_map_publisher.cpp:223
void loadMapFromCSV()
Loads data into the map object from a CSV.
Definition terrain_map_publisher.cpp:149
std::string terrain_type_
String for the terrain file name.
Definition terrain_map_publisher.h:107
grid_map::GridMap terrain_map_
grid_map::GridMap object for terrain data
Definition terrain_map_publisher.h:104
void publishMap()
Publishes map data to the terrain_map topic.
Definition terrain_map_publisher.cpp:253
double min_height_
double for map resolution
Definition terrain_map_publisher.h:119
std::string map_data_source_
string of the source of the terrain map data
Definition terrain_map_publisher.h:110
std::string map_frame_
Handle for the map frame.
Definition terrain_map_publisher.h:101
ros::Subscriber image_sub_
ROS Subscriber for image data.
Definition terrain_map_publisher.h:88
void updateParams()
Updates the terrain_map_publisher parameters.
Definition terrain_map_publisher.cpp:50
bool map_initialized_
bool to flag if the map has been initialized yet
Definition terrain_map_publisher.h:113
std::vector< std::vector< double > > loadCSV(std::string filename)
Loads data from a specified CSV file into a nested std::vector structure.
Definition terrain_map_publisher.cpp:111
Obstacle obstacle_
Obstacle object.
Definition terrain_map_publisher.h:125
ros::NodeHandle nh_
Nodehandle to pub to and sub from.
Definition terrain_map_publisher.h:94
double max_height_
double for map resolution
Definition terrain_map_publisher.h:122
Definition terrain_map_publisher.h:16
Definition terrain_map_publisher.h:23