Struct responsible for holding properties (nodeIDs, node positions, LaserScans) that have been registered by a nearby GraphSlamAgent. More...
#include <CGraphSlamEngine_MR.h>
Public Member Functions | |
void | computeGridMap () const |
Using the fetched LaserScans and nodeID positions, compute the occupancy gridmap of the given neighbor. | |
void | fillOptPaths (const std::set< mrpt::utils::TNodeID > &nodeIDs, paths_t *opt_paths) const |
Fill the optimal paths for each combination of the given nodeIDs. | |
std::string | getAgentNs () const |
void | getCachedNodes (mrpt::vector_uint *nodeIDs=NULL, std::map< mrpt::utils::TNodeID, node_props_t > *nodes_params=NULL, bool only_unused=true) const |
Return cached list of nodeIDs (with their corresponding poses, LaserScans) | |
const mrpt::maps::COccupancyGridMap2DPtr & | getGridMap () const |
void | getGridMap (mrpt::maps::COccupancyGridMap2DPtr &map) const |
Fill the given occupancy gridmap object with the current neighbor's grdmap. | |
const sensor_msgs::LaserScan * | getLaserScanByNodeID (const mrpt::utils::TNodeID nodeID) const |
Utility method for fetching the ROS LaserScan that corresponds to a nodeID. | |
bool | hasNewData () const |
Return True if there are new data (node positions and corresponding LaserScans available) | |
bool | hasNewNodesBatch (int new_batch_size) |
Decide whether there are enough new nodes + scans that have not been integrated in the graph yet. | |
bool | operator< (const TNeighborAgentProps &other) const |
bool | operator== (const TNeighborAgentProps &other) const |
void | resetFlags () const |
void | setTColor (const mrpt::utils::TColor &color_in) |
Set the color related to the current neighbor agent. | |
void | setupComm () |
Wrapper for calling setupSubs, setupSrvs. | |
void | setupSrvs () |
Setup necessary services for neighbor. | |
void | setupSubs () |
Setup the necessary subscribers for fetching nodes, laserScans for the current neighbor. | |
TNeighborAgentProps (CGraphSlamEngine_MR< GRAPH_T > &engine_in, const mrpt_msgs::GraphSlamAgent &agent_in) | |
Constructor. | |
~TNeighborAgentProps () | |
Destructor. | |
Subscriber callback methods | |
Methods to be called when data is received on the subscribed topics | |
void | fetchUpdatedNodesList (const mrpt_msgs::NodeIDWithPose_vec::ConstPtr &nodes) |
Update nodeIDs + corresponding estimated poses. | |
void | fetchLastRegdIDScan (const mrpt_msgs::NodeIDWithLaserScan::ConstPtr &last_regd_id_scan) |
Fill the LaserScan of the last registered nodeID. | |
Public Attributes | |
const mrpt_msgs::GraphSlamAgent | agent |
GraphSlamAgent instance of the neighbor. | |
mrpt::utils::TColor | color |
Unique color of current TNeighborAgentProps instance. | |
CGraphSlamEngine_MR< GRAPH_T > & | engine |
Constant reference to the outer class. | |
mrpt::maps::COccupancyGridMap2DPtr | gridmap_cached |
Pointer to the gridmap object of the neighbor. | |
bool | has_new_nodes |
bool | has_new_scans |
bool | has_setup_comm |
std::pair < mrpt::utils::TNodeID, mrpt::poses::CPose2D > | last_integrated_pair_neighbor_frame |
Last nodeID/CPose2D of neighbor that was integrated - Pose is taken with regards to neighbor's frame of reference. | |
int | m_queue_size |
ros::NodeHandle * | nh |
NodeHandle passed by the calling CGraphSlamEngine_MR class. | |
mrpt::poses::CPose2D | tf_self_to_neighbor_first_integrated_pose |
CPose2D connecting own graph origin to neighbor first received and integrated node. If this pose is 0 then it is not yet computed. | |
Neighbor cached properties | |
std::set< mrpt::utils::TNodeID > | nodeIDs_set |
NodeIDs that I have received from this graphSLAM agent. | |
GRAPH_T::global_poses_t | poses |
Poses that I have received from this graphSLAM agent. | |
std::vector < mrpt_msgs::NodeIDWithLaserScan > | ros_scans |
ROS LaserScans that I have received from this graphSLAM agent. | |
std::map< mrpt::utils::TNodeID, bool > | nodeID_to_is_integrated |
Have I already integrated this node in my graph? | |
Subscriber/Services Instances | |
ros::Subscriber | last_regd_nodes_sub |
ros::Subscriber | last_regd_id_scan_sub |
ros::ServiceClient | cm_graph_srvclient |
Full topic names / service names | |
Names of the full topic paths that the neighbor publishes nodes, LaserScans at. | |
std::string | last_regd_nodes_topic |
std::string | last_regd_id_scan_topic |
std::string | cm_graph_service |
Struct responsible for holding properties (nodeIDs, node positions, LaserScans) that have been registered by a nearby GraphSlamAgent.
Definition at line 98 of file CGraphSlamEngine_MR.h.
mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::TNeighborAgentProps | ( | CGraphSlamEngine_MR< GRAPH_T > & | engine_in, |
const mrpt_msgs::GraphSlamAgent & | agent_in | ||
) |
Constructor.
Definition at line 1030 of file CGraphSlamEngine_MR_impl.h.
mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::~TNeighborAgentProps | ( | ) |
Destructor.
Definition at line 1069 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::computeGridMap | ( | ) | const |
Using the fetched LaserScans and nodeID positions, compute the occupancy gridmap of the given neighbor.
Definition at line 1374 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::fetchLastRegdIDScan | ( | const mrpt_msgs::NodeIDWithLaserScan::ConstPtr & | last_regd_id_scan | ) |
Fill the LaserScan of the last registered nodeID.
Definition at line 1179 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::fetchUpdatedNodesList | ( | const mrpt_msgs::NodeIDWithPose_vec::ConstPtr & | nodes | ) |
Update nodeIDs + corresponding estimated poses.
Definition at line 1112 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::fillOptPaths | ( | const std::set< mrpt::utils::TNodeID > & | nodeIDs, |
paths_t * | opt_paths | ||
) | const |
Fill the optimal paths for each combination of the given nodeIDs.
Definition at line 1325 of file CGraphSlamEngine_MR_impl.h.
std::string mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::getAgentNs | ( | ) | const [inline] |
Definition at line 169 of file CGraphSlamEngine_MR.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::getCachedNodes | ( | mrpt::vector_uint * | nodeIDs = NULL , |
std::map< mrpt::utils::TNodeID, node_props_t > * | nodes_params = NULL , |
||
bool | only_unused = true |
||
) | const |
Return cached list of nodeIDs (with their corresponding poses, LaserScans)
[in] | only_unused | Include only the nodes that have not already been used in the current CGraphSlamEngine's graph |
[out] | nodeIDs | Pointer to vector of nodeIDs that are actually returned. This argument is redundant but may be convinient in case that just the nodeIDs are required |
[out] | node_params | Pointer to the map of nodeIDs Corresponding properties that is to be filled by the method |
Definition at line 1201 of file CGraphSlamEngine_MR_impl.h.
const mrpt::maps::COccupancyGridMap2DPtr & mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::getGridMap | ( | ) | const |
Definition at line 1404 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::getGridMap | ( | mrpt::maps::COccupancyGridMap2DPtr & | map | ) | const |
Fill the given occupancy gridmap object with the current neighbor's grdmap.
Definition at line 1416 of file CGraphSlamEngine_MR_impl.h.
const sensor_msgs::LaserScan * mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::getLaserScanByNodeID | ( | const mrpt::utils::TNodeID | nodeID | ) | const |
Utility method for fetching the ROS LaserScan that corresponds to a nodeID.
Definition at line 1302 of file CGraphSlamEngine_MR_impl.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::hasNewData | ( | ) | const |
Return True if there are new data (node positions and corresponding LaserScans available)
Caller is responsible of setting the underlying has_new_* variables to false using the resetFlags method upon successful integration of (some of) the nodes
Definition at line 1430 of file CGraphSlamEngine_MR_impl.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::hasNewNodesBatch | ( | int | new_batch_size | ) |
Decide whether there are enough new nodes + scans that have not been integrated in the graph yet.
Method takes in account only the nodeIDs that have a valid LaserScan
Definition at line 1282 of file CGraphSlamEngine_MR_impl.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::operator< | ( | const TNeighborAgentProps & | other | ) | const [inline] |
Definition at line 175 of file CGraphSlamEngine_MR.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::operator== | ( | const TNeighborAgentProps & | other | ) | const [inline] |
Definition at line 171 of file CGraphSlamEngine_MR.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::resetFlags | ( | ) | const |
Definition at line 1274 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::setTColor | ( | const mrpt::utils::TColor & | color_in | ) | [inline] |
Set the color related to the current neighbor agent.
Handy in visualization operations
Definition at line 204 of file CGraphSlamEngine_MR.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::setupComm | ( | ) |
Wrapper for calling setupSubs, setupSrvs.
Definition at line 1072 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::setupSrvs | ( | ) |
Setup necessary services for neighbor.
Definition at line 1088 of file CGraphSlamEngine_MR_impl.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::setupSubs | ( | ) |
Setup the necessary subscribers for fetching nodes, laserScans for the current neighbor.
Definition at line 1096 of file CGraphSlamEngine_MR_impl.h.
const mrpt_msgs::GraphSlamAgent mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::agent |
GraphSlamAgent instance of the neighbor.
UPDATE: This should be a real instance instead of a reference
Definition at line 189 of file CGraphSlamEngine_MR.h.
std::string mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::cm_graph_service |
Definition at line 243 of file CGraphSlamEngine_MR.h.
ros::ServiceClient mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::cm_graph_srvclient |
Definition at line 229 of file CGraphSlamEngine_MR.h.
mrpt::utils::TColor mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::color |
Unique color of current TNeighborAgentProps instance.
Definition at line 207 of file CGraphSlamEngine_MR.h.
CGraphSlamEngine_MR<GRAPH_T>& mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::engine |
Constant reference to the outer class.
Definition at line 234 of file CGraphSlamEngine_MR.h.
mrpt::maps::COccupancyGridMap2DPtr mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::gridmap_cached [mutable] |
Pointer to the gridmap object of the neighbor.
Definition at line 248 of file CGraphSlamEngine_MR.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::has_new_nodes [mutable] |
Definition at line 250 of file CGraphSlamEngine_MR.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::has_new_scans [mutable] |
Definition at line 251 of file CGraphSlamEngine_MR.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::has_setup_comm |
Definition at line 257 of file CGraphSlamEngine_MR.h.
std::pair< mrpt::utils::TNodeID, mrpt::poses::CPose2D> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::last_integrated_pair_neighbor_frame |
Last nodeID/CPose2D of neighbor that was integrated - Pose is taken with regards to neighbor's frame of reference.
Definition at line 269 of file CGraphSlamEngine_MR.h.
ros::Subscriber mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::last_regd_id_scan_sub |
Definition at line 227 of file CGraphSlamEngine_MR.h.
std::string mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::last_regd_id_scan_topic |
Definition at line 241 of file CGraphSlamEngine_MR.h.
ros::Subscriber mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::last_regd_nodes_sub |
Definition at line 226 of file CGraphSlamEngine_MR.h.
std::string mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::last_regd_nodes_topic |
Definition at line 240 of file CGraphSlamEngine_MR.h.
int mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::m_queue_size |
Definition at line 253 of file CGraphSlamEngine_MR.h.
ros::NodeHandle* mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::nh |
NodeHandle passed by the calling CGraphSlamEngine_MR class.
Definition at line 256 of file CGraphSlamEngine_MR.h.
std::map<mrpt::utils::TNodeID, bool> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::nodeID_to_is_integrated |
Have I already integrated this node in my graph?
Definition at line 221 of file CGraphSlamEngine_MR.h.
std::set<mrpt::utils::TNodeID> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::nodeIDs_set |
NodeIDs that I have received from this graphSLAM agent.
Definition at line 212 of file CGraphSlamEngine_MR.h.
GRAPH_T::global_poses_t mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::poses |
Poses that I have received from this graphSLAM agent.
Definition at line 214 of file CGraphSlamEngine_MR.h.
std::vector<mrpt_msgs::NodeIDWithLaserScan> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::ros_scans |
ROS LaserScans that I have received from this graphSLAM agent.
Definition at line 216 of file CGraphSlamEngine_MR.h.
mrpt::poses::CPose2D mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::TNeighborAgentProps::tf_self_to_neighbor_first_integrated_pose |
CPose2D connecting own graph origin to neighbor first received and integrated node. If this pose is 0 then it is not yet computed.
Definition at line 263 of file CGraphSlamEngine_MR.h.