13 #include <fkie_multimaster_msgs/DiscoverMasters.h> 14 #include <mrpt_msgs/GraphSlamAgent.h> 15 #include <mrpt_msgs/GraphSlamAgents.h> 17 #include <mrpt/system/COutputLogger.h> 18 #include <mrpt/system/datetime.h> 19 #include <mrpt/system/os.h> 20 #include <mrpt/system/string_utils.h> 21 #include <mrpt/math/utils.h> 46 typedef mrpt_msgs::GraphSlamAgents::_list_type::iterator
agents_it;
47 typedef mrpt_msgs::GraphSlamAgents::_list_type::const_iterator
agents_cit;
64 mrpt_msgs::GraphSlamAgents* agents_vec,
bool ignore_self =
true);
117 const fkie_multimaster_msgs::ROSMaster& ros_master,
118 mrpt_msgs::GraphSlamAgent* slam_agent);
121 const mrpt_msgs::GraphSlamAgent& slam_agent,
122 fkie_multimaster_msgs::ROSMaster* ros_master);
130 const std::string& str,
unsigned short* agent_port = NULL);
157 const fkie_multimaster_msgs::ROSMaster& master1,
158 const fkie_multimaster_msgs::ROSMaster& master2);
160 const fkie_multimaster_msgs::ROSMaster& master1,
161 const fkie_multimaster_msgs::ROSMaster& master2);
169 const mrpt_msgs::GraphSlamAgent& agent1,
170 const mrpt_msgs::GraphSlamAgent& agent2);
172 const mrpt_msgs::GraphSlamAgent& agent1,
173 const mrpt_msgs::GraphSlamAgent& agent2);
175 const mrpt_msgs::GraphSlamAgent& agent1,
176 const mrpt_msgs::GraphSlamAgent& agent2);
184 const fkie_multimaster_msgs::ROSMaster& master,
185 const mrpt_msgs::GraphSlamAgent& agent);
187 const mrpt_msgs::GraphSlamAgent& agent,
188 const fkie_multimaster_msgs::ROSMaster& master);
190 const fkie_multimaster_msgs::ROSMaster& master,
191 const mrpt_msgs::GraphSlamAgent& agent);
193 const mrpt_msgs::GraphSlamAgent& agent,
194 const fkie_multimaster_msgs::ROSMaster& master);
CConnectionManager(mrpt::system::COutputLogger *logger, ros::NodeHandle *nh_in)
Constructor.
void setupComm()
Wrapper method around the private setup* class methods.
const mrpt_msgs::GraphSlamAgents & getNearbySlamAgents()
Read-only method for accessing list of nearby agents.
bool operator==(const fkie_multimaster_msgs::ROSMaster &master1, const fkie_multimaster_msgs::ROSMaster &master2)
ROSMaster instances are considered the same if the "uri" field is the same.
const std::string & getTrimmedNs() const
Get the agent ROS namespace.
void updateNearbySlamAgents()
Update the internal list of nearby SLAM agents.
const mrpt_msgs::GraphSlamAgents & getNearbySlamAgentsCached() const
Read-only method for accessing list of nearby agents. This doesn't update the internal list of GraphS...
mrpt_msgs::GraphSlamAgents::_list_type::const_iterator agents_cit
mrpt_msgs::GraphSlamAgents::_list_type::iterator agents_it
std::string own_ns
Namespace under which we are running. Corresponds to the agent_ID_str with which the nodes are going ...
ros::NodeHandle * m_nh
Pointer to the Ros NodeHanle instance.
static bool convert(const fkie_multimaster_msgs::ROSMaster &ros_master, mrpt_msgs::GraphSlamAgent *slam_agent)
ROSMaster ==> mrpt_msgs::GraphSlamAgent.
mrpt_msgs::GraphSlamAgents m_nearby_slam_agents
List of slam agents in the current agent's neighborhood.
bool operator<(const mrpt_msgs::GraphSlamAgent &agent1, const mrpt_msgs::GraphSlamAgent &agent2)
mrpt::system::COutputLogger * m_logger
Pointer to the logging instance.
ros::ServiceClient m_DiscoverMasters_client
static std::string extractHostnameOrIP(const std::string &str, unsigned short *agent_port=NULL)
Remove http:// prefix and port suffix from the string and return result.
~CConnectionManager()
Destructor.
bool operator!=(const fkie_multimaster_msgs::ROSMaster &master1, const fkie_multimaster_msgs::ROSMaster &master2)
Class responsible of handling the network communication between SLAM agents in the Multi-Robot graphS...