Public Member Functions | Private Member Functions | Private Attributes
MapMerger Class Reference

#include <mapmerger.h>

List of all members.

Public Member Functions

bool getHasLocalMap ()
bool log_output_srv (map_merger::LogMaps::Request &req, map_merger::LogMaps::Response &res)
 Saves progress to log. Saves log information to the hard drive. At this point log information may include * global map * local map.
 MapMerger ()
void start ()
bool transformPointSRV (map_merger::TransformPoint::Request &req, map_merger::TransformPoint::Response &res)
void waitForLocalMetaData ()
void waitForRobotInformation ()

Private Member Functions

void callback_ask_other_robots (const ros::TimerEvent &e)
void callback_control (const adhoc_communication::MmControlConstPtr &msg)
void callback_global_pub (const ros::TimerEvent &e)
void callback_got_position (const nav_msgs::Odometry::ConstPtr &msg)
void callback_got_position_network (const adhoc_communication::MmRobotPosition::ConstPtr &msg)
void callback_got_robot_for_data (const std_msgs::StringConstPtr &msg)
void callback_map (const nav_msgs::OccupancyGrid::ConstPtr &msg)
void callback_map_meta_data_local (const nav_msgs::MapMetaData::ConstPtr &msg)
void callback_map_other (const adhoc_communication::MmMapUpdateConstPtr &msg)
void callback_new_robot (const std_msgs::StringConstPtr &msg)
void callback_recompute_transform (const ros::TimerEvent &e)
void callback_remove_robot (const std_msgs::StringConstPtr &msg)
void callback_robot_status (const nav_msgs::MapMetaData::ConstPtr &msg)
void callback_send_map (const ros::TimerEvent &e)
void callback_send_position (const ros::TimerEvent &e)
void callback_write_maps (const ros::TimerEvent &e)
void computeOffsets ()
void computeTransform (int mapDataIndex)
bool createLogPath ()
int findRobotIndex (int transform_index)
int findTransformIndex (int robot_index)
nav_msgs::OccupancyGrid * getMapPart (int map_index, int start_x, int start_y, int width, int height)
void makeEmptyMapData (string robot_name, int height, int width, float resolution)
cv::Mat mapToMat (const nav_msgs::OccupancyGrid *map)
nav_msgs::OccupancyGrid * matToMap (const cv::Mat mat, nav_msgs::OccupancyGrid *forInfo)
void mergeMaps (nav_msgs::OccupancyGrid *mapToMerge, int min_x=0, int min_y=0, int max_x=-1, int max_y=-1)
void processLocalMap (nav_msgs::OccupancyGrid *toInsert, int index)
void processMap (nav_msgs::OccupancyGrid *map, int index_in_mapdata)
void processPosition (geometry_msgs::PoseStamped *pose)
bool recomputeTransform (int mapDataIndex)
void sendBackAskedMapData (string robotName, std::vector< int > missingUpdates)
void sendControlMessage (std::vector< int > *updateNumbers, std::string dest)
void sendMapOverNetwork (string destination, std::vector< int > *containedUpdates, int start_row=0, int start_collum=0, int end_row=-1, int end_collum=-1)
void sendMetaData (float res=0.05)
cv::Mat transformImage (Mat img1, Mat trans)
void updateMap (nav_msgs::OccupancyGrid *mapToUpdate, int index_of_transform)
void updateMapArea (int map_index, nav_msgs::OccupancyGrid *newData, bool clear=false)

Private Attributes

ros::Timer ask_other_timer
std::string control_topic
geometry_msgs::PoseStamped * cur_position
bool debug
bool exchange_position
double first_trans_x
double first_trans_y
bool force_recompute_all
std::vector< UpdateEntry > * formerUpdates
std::string full_log_path
 log path argument specified by launch file
float g_start_x
float g_start_y
nav_msgs::OccupancyGrid * global_map
bool global_map_ready
ros::Timer global_timer_pub
bool has_local_map
int laser_range
cv::Mat lastTrans
ros::Publisher list_of_positions_publisher
nav_msgs::OccupancyGrid * local_map
std::string local_map_frame_id
std::string local_map_metadata_topic
bool local_map_new_data
nav_msgs::OccupancyGrid * local_map_old
std::string local_map_topic
std::string log_path
std::vector
< nav_msgs::OccupancyGrid * > * 
map_data
int map_height
std::string map_meta_topic
int map_width
double max_rotation_robot
double max_trans_robot
ros::Publisher my_pos_pub
std::vector< bool > * new_data_maps
ros::NodeHandlenodeHandle
float old_middle_distance
visualization_msgs::MarkerArray pos_array_my
std::vector
< visualization_msgs::MarkerArray > * 
pos_array_other
std::vector< ros::Publisher > * pos_pub_other
int pos_seq_my
std::vector< int > * pos_seq_other
std::string position_local_robot_topic
std::string position_other_robots_topic
adhoc_communication::MmListOfPoints * positions
ros::Publisher pub
ros::Timer recompute_transform_timer
std::string robot_hostname
std::string robot_name
std::string robot_prefix
std::vector< std::string > * robots
std::vector< std::string > * robots_in_transform
std::vector< ros::Publisher > * robots_position_publisher
int seconds_meta_timer
int seconds_publish_timer
int seconds_recompute_transform
int seconds_send_position
int seconds_send_timer
ros::Timer send_map
ros::Timer send_position
int size
bool splitted
ros::Time time_start
 the full log path where to store files
std::string topic_over_network
std::vector< cv::Mat > * transforms
bool turning
std::vector< UpdateEntry * > * update_list
int update_seq
int updateCount
updateManagerupdateMan

Detailed Description

Definition at line 49 of file mapmerger.h.


Constructor & Destructor Documentation

Definition at line 14 of file mapmerger.cpp.


Member Function Documentation

Definition at line 1915 of file mapmerger.cpp.

void MapMerger::callback_control ( const adhoc_communication::MmControlConstPtr &  msg) [private]

Definition at line 261 of file mapmerger.cpp.

void MapMerger::callback_global_pub ( const ros::TimerEvent e) [private]

Definition at line 374 of file mapmerger.cpp.

void MapMerger::callback_got_position ( const nav_msgs::Odometry::ConstPtr &  msg) [private]

Definition at line 828 of file mapmerger.cpp.

void MapMerger::callback_got_position_network ( const adhoc_communication::MmRobotPosition::ConstPtr &  msg) [private]

Definition at line 657 of file mapmerger.cpp.

void MapMerger::callback_got_robot_for_data ( const std_msgs::StringConstPtr &  msg) [private]

Definition at line 212 of file mapmerger.cpp.

void MapMerger::callback_map ( const nav_msgs::OccupancyGrid::ConstPtr &  msg) [private]

Definition at line 932 of file mapmerger.cpp.

void MapMerger::callback_map_meta_data_local ( const nav_msgs::MapMetaData::ConstPtr &  msg) [private]

Definition at line 343 of file mapmerger.cpp.

void MapMerger::callback_map_other ( const adhoc_communication::MmMapUpdateConstPtr &  msg) [private]

Definition at line 837 of file mapmerger.cpp.

void MapMerger::callback_new_robot ( const std_msgs::StringConstPtr &  msg) [private]

Definition at line 217 of file mapmerger.cpp.

Definition at line 492 of file mapmerger.cpp.

void MapMerger::callback_remove_robot ( const std_msgs::StringConstPtr &  msg) [private]

Definition at line 257 of file mapmerger.cpp.

void MapMerger::callback_robot_status ( const nav_msgs::MapMetaData::ConstPtr &  msg) [private]

Definition at line 1513 of file mapmerger.cpp.

void MapMerger::callback_send_map ( const ros::TimerEvent e) [private]

Definition at line 537 of file mapmerger.cpp.

void MapMerger::callback_send_position ( const ros::TimerEvent e) [private]

Definition at line 458 of file mapmerger.cpp.

void MapMerger::callback_write_maps ( const ros::TimerEvent e) [private]
void MapMerger::computeOffsets ( ) [private]
void MapMerger::computeTransform ( int  mapDataIndex) [private]

Definition at line 1423 of file mapmerger.cpp.

bool MapMerger::createLogPath ( ) [private]

Definition at line 1665 of file mapmerger.cpp.

int MapMerger::findRobotIndex ( int  transform_index) [private]

Definition at line 1654 of file mapmerger.cpp.

int MapMerger::findTransformIndex ( int  robot_index) [private]

Definition at line 1633 of file mapmerger.cpp.

Definition at line 1910 of file mapmerger.cpp.

nav_msgs::OccupancyGrid * MapMerger::getMapPart ( int  map_index,
int  start_x,
int  start_y,
int  width,
int  height 
) [private]

Definition at line 1275 of file mapmerger.cpp.

bool MapMerger::log_output_srv ( map_merger::LogMaps::Request &  req,
map_merger::LogMaps::Response &  res 
)

Saves progress to log. Saves log information to the hard drive. At this point log information may include * global map * local map.

Definition at line 1689 of file mapmerger.cpp.

void MapMerger::makeEmptyMapData ( string  robot_name,
int  height,
int  width,
float  resolution 
) [private]

Definition at line 1487 of file mapmerger.cpp.

cv::Mat MapMerger::mapToMat ( const nav_msgs::OccupancyGrid *  map) [private]

Definition at line 1182 of file mapmerger.cpp.

nav_msgs::OccupancyGrid * MapMerger::matToMap ( const cv::Mat  mat,
nav_msgs::OccupancyGrid *  forInfo 
) [private]

Definition at line 1219 of file mapmerger.cpp.

void MapMerger::mergeMaps ( nav_msgs::OccupancyGrid *  mapToMerge,
int  min_x = 0,
int  min_y = 0,
int  max_x = -1,
int  max_y = -1 
) [private]

Definition at line 1135 of file mapmerger.cpp.

void MapMerger::processLocalMap ( nav_msgs::OccupancyGrid *  toInsert,
int  index 
) [private]

Definition at line 972 of file mapmerger.cpp.

void MapMerger::processMap ( nav_msgs::OccupancyGrid *  map,
int  index_in_mapdata 
) [private]

Definition at line 1022 of file mapmerger.cpp.

void MapMerger::processPosition ( geometry_msgs::PoseStamped *  pose) [private]

Definition at line 1036 of file mapmerger.cpp.

bool MapMerger::recomputeTransform ( int  mapDataIndex) [private]

Definition at line 1365 of file mapmerger.cpp.

void MapMerger::sendBackAskedMapData ( string  robotName,
std::vector< int >  missingUpdates 
) [private]

Definition at line 1867 of file mapmerger.cpp.

void MapMerger::sendControlMessage ( std::vector< int > *  updateNumbers,
std::string  dest 
) [private]

Definition at line 1892 of file mapmerger.cpp.

void MapMerger::sendMapOverNetwork ( string  destination,
std::vector< int > *  containedUpdates,
int  start_row = 0,
int  start_collum = 0,
int  end_row = -1,
int  end_collum = -1 
) [private]

todo: values for the mapPart are used wrong, always creates one great map part if i just send 688 x 688 packets, fix the problem

Definition at line 1530 of file mapmerger.cpp.

void MapMerger::sendMetaData ( float  res = 0.05) [private]

Definition at line 1607 of file mapmerger.cpp.

void MapMerger::start ( )

Definition at line 1059 of file mapmerger.cpp.

cv::Mat MapMerger::transformImage ( Mat  img1,
Mat  trans 
) [private]

Definition at line 1236 of file mapmerger.cpp.

bool MapMerger::transformPointSRV ( map_merger::TransformPoint::Request &  req,
map_merger::TransformPoint::Response &  res 
)

Definition at line 1826 of file mapmerger.cpp.

void MapMerger::updateMap ( nav_msgs::OccupancyGrid *  mapToUpdate,
int  index_of_transform 
) [private]

Definition at line 1257 of file mapmerger.cpp.

void MapMerger::updateMapArea ( int  map_index,
nav_msgs::OccupancyGrid *  newData,
bool  clear = false 
) [private]

Definition at line 1323 of file mapmerger.cpp.

Definition at line 136 of file mapmerger.cpp.

Definition at line 156 of file mapmerger.cpp.


Member Data Documentation

Definition at line 160 of file mapmerger.h.

std::string MapMerger::control_topic [private]

Definition at line 144 of file mapmerger.h.

geometry_msgs::PoseStamped* MapMerger::cur_position [private]

Definition at line 140 of file mapmerger.h.

bool MapMerger::debug [private]

Definition at line 130 of file mapmerger.h.

Definition at line 130 of file mapmerger.h.

double MapMerger::first_trans_x [private]

Definition at line 158 of file mapmerger.h.

double MapMerger::first_trans_y [private]

Definition at line 158 of file mapmerger.h.

Definition at line 130 of file mapmerger.h.

std::vector<UpdateEntry>* MapMerger::formerUpdates [private]

Definition at line 116 of file mapmerger.h.

std::string MapMerger::full_log_path [private]

log path argument specified by launch file

Definition at line 144 of file mapmerger.h.

float MapMerger::g_start_x [private]

Definition at line 141 of file mapmerger.h.

float MapMerger::g_start_y [private]

Definition at line 141 of file mapmerger.h.

nav_msgs::OccupancyGrid* MapMerger::global_map [private]

Definition at line 128 of file mapmerger.h.

Definition at line 130 of file mapmerger.h.

Definition at line 160 of file mapmerger.h.

bool MapMerger::has_local_map [private]

Definition at line 130 of file mapmerger.h.

int MapMerger::laser_range [private]

Definition at line 121 of file mapmerger.h.

cv::Mat MapMerger::lastTrans [private]

Definition at line 138 of file mapmerger.h.

Definition at line 118 of file mapmerger.h.

nav_msgs::OccupancyGrid * MapMerger::local_map [private]

Definition at line 128 of file mapmerger.h.

std::string MapMerger::local_map_frame_id [private]

Definition at line 144 of file mapmerger.h.

std::string MapMerger::local_map_metadata_topic [private]

Definition at line 144 of file mapmerger.h.

Definition at line 130 of file mapmerger.h.

nav_msgs::OccupancyGrid * MapMerger::local_map_old [private]

Definition at line 128 of file mapmerger.h.

std::string MapMerger::local_map_topic [private]

Definition at line 144 of file mapmerger.h.

std::string MapMerger::log_path [private]

Definition at line 144 of file mapmerger.h.

std::vector<nav_msgs::OccupancyGrid*>* MapMerger::map_data [private]

Definition at line 126 of file mapmerger.h.

int MapMerger::map_height [private]

Definition at line 121 of file mapmerger.h.

std::string MapMerger::map_meta_topic [private]

Definition at line 144 of file mapmerger.h.

int MapMerger::map_width [private]

Definition at line 121 of file mapmerger.h.

Definition at line 142 of file mapmerger.h.

double MapMerger::max_trans_robot [private]

Definition at line 142 of file mapmerger.h.

Definition at line 163 of file mapmerger.h.

std::vector<bool>* MapMerger::new_data_maps [private]

Definition at line 115 of file mapmerger.h.

Definition at line 109 of file mapmerger.h.

Definition at line 159 of file mapmerger.h.

visualization_msgs::MarkerArray MapMerger::pos_array_my [private]

Definition at line 165 of file mapmerger.h.

std::vector<visualization_msgs::MarkerArray>* MapMerger::pos_array_other [private]

Definition at line 164 of file mapmerger.h.

std::vector<ros::Publisher>* MapMerger::pos_pub_other [private]

Definition at line 162 of file mapmerger.h.

int MapMerger::pos_seq_my [private]

Definition at line 167 of file mapmerger.h.

std::vector<int>* MapMerger::pos_seq_other [private]

Definition at line 166 of file mapmerger.h.

Definition at line 144 of file mapmerger.h.

Definition at line 144 of file mapmerger.h.

adhoc_communication::MmListOfPoints* MapMerger::positions [private]

Definition at line 120 of file mapmerger.h.

Definition at line 139 of file mapmerger.h.

Definition at line 160 of file mapmerger.h.

std::string MapMerger::robot_hostname [private]

Definition at line 144 of file mapmerger.h.

std::string MapMerger::robot_name [private]

Definition at line 144 of file mapmerger.h.

std::string MapMerger::robot_prefix [private]

Definition at line 144 of file mapmerger.h.

std::vector<std::string>* MapMerger::robots [private]

Definition at line 111 of file mapmerger.h.

std::vector<std::string>* MapMerger::robots_in_transform [private]

Definition at line 112 of file mapmerger.h.

Definition at line 117 of file mapmerger.h.

Definition at line 121 of file mapmerger.h.

Definition at line 121 of file mapmerger.h.

Definition at line 121 of file mapmerger.h.

Definition at line 121 of file mapmerger.h.

Definition at line 121 of file mapmerger.h.

Definition at line 160 of file mapmerger.h.

Definition at line 160 of file mapmerger.h.

int MapMerger::size [private]

Definition at line 121 of file mapmerger.h.

bool MapMerger::splitted [private]

Definition at line 130 of file mapmerger.h.

the full log path where to store files

Definition at line 157 of file mapmerger.h.

std::string MapMerger::topic_over_network [private]

Definition at line 144 of file mapmerger.h.

std::vector<cv::Mat>* MapMerger::transforms [private]

Definition at line 114 of file mapmerger.h.

bool MapMerger::turning [private]

Definition at line 168 of file mapmerger.h.

std::vector<UpdateEntry*>* MapMerger::update_list [private]

Definition at line 127 of file mapmerger.h.

int MapMerger::update_seq [private]

Definition at line 143 of file mapmerger.h.

int MapMerger::updateCount [private]

Definition at line 121 of file mapmerger.h.

Definition at line 107 of file mapmerger.h.


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


map_merger
Author(s): Peter Kohout , Torsten Andre
autogenerated on Thu Jun 6 2019 20:59:50