TNeighborAgentMapProps.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+
9  */
10 #pragma once
11 
12 #include <ros/ros.h>
13 #include <nav_msgs/OccupancyGrid.h>
14 #include <nav_msgs/Path.h>
15 #include <mrpt/ros1bridge/map.h>
16 #include <mrpt_msgs/GraphSlamAgents.h>
17 #include <mrpt/system/COutputLogger.h>
18 #include <mrpt/maps/COccupancyGridMap2D.h>
19 #include <mrpt/math/utils.h>
20 
21 namespace mrpt
22 {
23 namespace graphslam
24 {
31 {
33  mrpt::system::COutputLogger* logger_in,
34  const mrpt_msgs::GraphSlamAgent& agent_in, ros::NodeHandle* nh_in);
35 
36  void readROSParameters();
37  void setupComm();
38  void setupSubs();
39  void setupPubs();
43  void updateGridMap(const nav_msgs::OccupancyGrid::ConstPtr& nav_gridmap);
47  void updateRobotTrajectory(const nav_msgs::Path::ConstPtr& nav_robot_traj);
48 
52  size_t getNodeCount() { return nav_robot_trajectory->poses.size(); }
53 
54  mrpt::system::COutputLogger* m_logger;
57  const mrpt_msgs::GraphSlamAgent& agent;
59  nav_msgs::OccupancyGrid::ConstPtr nav_map;
61  nav_msgs::Path::ConstPtr nav_robot_trajectory;
71  std::string map_topic;
74  size_t queue_size;
77 
78 }; // end of TNeighborAgentMapProps
79 
80 } // namespace graphslam
81 } // namespace mrpt
void updateRobotTrajectory(const nav_msgs::Path::ConstPtr &nav_robot_traj)
Callback method to be called when new data in the Estimated Trajectory topic is available.
TNeighborAgentMapProps(mrpt::system::COutputLogger *logger_in, const mrpt_msgs::GraphSlamAgent &agent_in, ros::NodeHandle *nh_in)
void updateGridMap(const nav_msgs::OccupancyGrid::ConstPtr &nav_gridmap)
Callback method to be called when new data in the map topic is available.
size_t getNodeCount()
Return how many nodes have been registered in the fetched robot trajectory.
nav_msgs::Path::ConstPtr nav_robot_trajectory
Trajectory of the correspondign agent - in ROS form.
const mrpt_msgs::GraphSlamAgent & agent
Pointer to the GraphSlamAgent instance of the neighbor.
Struct holding a COccupancyGridMap2D (as well as subscribers for updating it) for a specific running ...
ros::Subscriber map_sub
Map subscriber instance.
nav_msgs::OccupancyGrid::ConstPtr nav_map
Map generated by the corresponding agent - in ROS form.
std::string map_topic
Map topic to subscribe and fetch the map from.


mrpt_graphslam_2d
Author(s): Nikos Koukis
autogenerated on Sun Jun 26 2022 02:12:26