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
mrpt::graphslam::TNeighborAgentMapProps::map_sub
ros::Subscriber map_sub
Map subscriber instance.
Definition: TNeighborAgentMapProps.h:65
mrpt::graphslam::TNeighborAgentMapProps::queue_size
size_t queue_size
Definition: TNeighborAgentMapProps.h:74
ros.h
mrpt::graphslam::TNeighborAgentMapProps::m_logger
mrpt::system::COutputLogger * m_logger
Definition: TNeighborAgentMapProps.h:54
mrpt::graphslam::TNeighborAgentMapProps::updateRobotTrajectory
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.
Definition: TNeighborAgentMapProps.cpp:93
mrpt::graphslam::TNeighborAgentMapProps::robot_trajectory_topic
std::string robot_trajectory_topic
Definition: TNeighborAgentMapProps.h:72
mrpt
Definition: CConnectionManager.h:31
mrpt::graphslam::TNeighborAgentMapProps::getNodeCount
size_t getNodeCount()
Return how many nodes have been registered in the fetched robot trajectory.
Definition: TNeighborAgentMapProps.h:52
mrpt::graphslam::TNeighborAgentMapProps::nh
ros::NodeHandle * nh
Definition: TNeighborAgentMapProps.h:55
mrpt::graphslam::TNeighborAgentMapProps::setupSubs
void setupSubs()
Definition: TNeighborAgentMapProps.cpp:75
mrpt::graphslam::TNeighborAgentMapProps::agent
const mrpt_msgs::GraphSlamAgent & agent
Pointer to the GraphSlamAgent instance of the neighbor.
Definition: TNeighborAgentMapProps.h:57
mrpt::graphslam::TNeighborAgentMapProps::robot_trajectory_sub
ros::Subscriber robot_trajectory_sub
Definition: TNeighborAgentMapProps.h:66
mrpt::graphslam::TNeighborAgentMapProps::has_init_class
bool has_init_class
Definition: TNeighborAgentMapProps.h:75
mrpt::graphslam::TNeighborAgentMapProps
Struct holding a COccupancyGridMap2D (as well as subscribers for updating it) for a specific running ...
Definition: TNeighborAgentMapProps.h:30
mrpt::graphslam::TNeighborAgentMapProps::map_topic
std::string map_topic
Map topic to subscribe and fetch the map from.
Definition: TNeighborAgentMapProps.h:71
mrpt::graphslam::TNeighborAgentMapProps::setupPubs
void setupPubs()
mrpt::graphslam::TNeighborAgentMapProps::readROSParameters
void readROSParameters()
Definition: TNeighborAgentMapProps.cpp:47
mrpt::graphslam::TNeighborAgentMapProps::nav_robot_trajectory
nav_msgs::Path::ConstPtr nav_robot_trajectory
Trajectory of the correspondign agent - in ROS form.
Definition: TNeighborAgentMapProps.h:61
mrpt::graphslam::TNeighborAgentMapProps::updateGridMap
void updateGridMap(const nav_msgs::OccupancyGrid::ConstPtr &nav_gridmap)
Callback method to be called when new data in the map topic is available.
Definition: TNeighborAgentMapProps.cpp:87
mrpt::graphslam::TNeighborAgentMapProps::has_setup_comm
bool has_setup_comm
Definition: TNeighborAgentMapProps.h:76
mrpt::graphslam::TNeighborAgentMapProps::TNeighborAgentMapProps
TNeighborAgentMapProps(mrpt::system::COutputLogger *logger_in, const mrpt_msgs::GraphSlamAgent &agent_in, ros::NodeHandle *nh_in)
Definition: TNeighborAgentMapProps.cpp:21
mrpt::graphslam::TNeighborAgentMapProps::setupComm
void setupComm()
Definition: TNeighborAgentMapProps.cpp:67
mrpt::graphslam::TNeighborAgentMapProps::nav_map
nav_msgs::OccupancyGrid::ConstPtr nav_map
Map generated by the corresponding agent - in ROS form.
Definition: TNeighborAgentMapProps.h:59
ros::NodeHandle
ros::Subscriber


mrpt_graphslam_2d
Author(s): Nikos Koukis
autogenerated on Thu Sep 19 2024 02:26:31