mrpt::graphslam::CGraphSlamEngine derived class for executing multi-robot graphSLAM More...
#include <CGraphSlamEngine_MR.h>
Classes | |
struct | TNeighborAgentProps |
Struct responsible for holding properties (nodeIDs, node positions, LaserScans) that have been registered by a nearby GraphSlamAgent. More... | |
struct | TOptions |
Public Types | |
typedef GRAPH_T::constraint_t | constraint_t |
typedef mrpt::graphslam::deciders::CEdgeRegistrationDecider_MR< GRAPH_T > | edge_reg_mr_t |
typedef GRAPH_T::global_pose_t | global_pose_t |
typedef mrpt::graphs::detail::THypothesis< GRAPH_T > | hypot_t |
typedef std::vector< hypot_t > | hypots_t |
typedef std::vector< hypot_t * > | hypotsp_t |
typedef std::pair< TNodeID, mrpt::obs::CObservation2DRangeScan::Ptr > | MRPT_NodeIDWithLaserScan |
typedef std::vector< TNeighborAgentProps * > | neighbors_t |
typedef mrpt::graphslam::detail::TNodeProps< GRAPH_T > | node_props_t |
typedef std::map< TNodeID, mrpt::obs::CObservation2DRangeScan::Ptr > | nodes_to_scans2D_t |
typedef CGraphSlamEngine_ROS< GRAPH_T > | parent_t |
typedef std::vector< std::vector< TNodeID > > | partitions_t |
typedef mrpt::graphslam::TUncertaintyPath< GRAPH_T > | path_t |
typedef std::vector< path_t > | paths_t |
typedef constraint_t::type_value | pose_t |
typedef CGraphSlamEngine_MR< GRAPH_T > | self_t |
Public Types inherited from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T > | |
typedef CGraphSlamEngine< GRAPH_T > | parent |
Public Member Functions | |
bool | _execGraphSlamStep (mrpt::obs::CActionCollection::Ptr &action, mrpt::obs::CSensoryFrame::Ptr &observations, mrpt::obs::CObservation::Ptr &observation, size_t &rawlog_entry) |
CGraphSlamEngine_MR (ros::NodeHandle *nh, const std::string &config_file, const std::string &rawlog_fname="", const std::string &fname_GT="", mrpt::graphslam::CWindowManager *win_manager=NULL, mrpt::graphslam::deciders::CNodeRegistrationDecider< GRAPH_T > *node_reg=NULL, mrpt::graphslam::deciders::CEdgeRegistrationDecider< GRAPH_T > *edge_reg=NULL, mrpt::graphslam::optimizers::CGraphSlamOptimizer< GRAPH_T > *optimizer=NULL) | |
const neighbors_t & | getVecOfNeighborAgentProps () const |
void | initClass () |
bool | isOwnNodeID (const TNodeID nodeID, const global_pose_t *pose_out=NULL) const |
Return true if current CGraphSlamEngine_MR object initially registered this nodeID, false otherwise. More... | |
~CGraphSlamEngine_MR () | |
Public Member Functions inherited from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T > | |
CGraphSlamEngine_ROS (ros::NodeHandle *nh, const std::string &config_file, const std::string &rawlog_fname="", const std::string &fname_GT="", mrpt::graphslam::CWindowManager *win_manager=NULL, mrpt::graphslam::deciders::CNodeRegistrationDecider< GRAPH_T > *node_reg=NULL, mrpt::graphslam::deciders::CEdgeRegistrationDecider< GRAPH_T > *edge_reg=NULL, mrpt::graphslam::optimizers::CGraphSlamOptimizer< GRAPH_T > *optimizer=NULL) | |
void | initClass () |
Initialize object instance. More... | |
void | setupComm () |
Wrapper method around the protected setup* class methods. More... | |
virtual | ~CGraphSlamEngine_ROS () |
Private Member Functions | |
bool | addNodeBatchesFromAllNeighbors () |
Traverse all neighbors for which I know the inter-graph transformation, run addNodeBatchFromNeighbor. More... | |
bool | addNodeBatchFromNeighbor (TNeighborAgentProps *neighbor) |
neighbors for which I know the inter-graph transformation, add new batches of fetches nodeIDs and scans More... | |
bool | findTFsWithAllNeighbors () |
Using map-merging find a potentuial transofrmation between own graph map to another agent's map and using that transformation add other agent's nodes to own graph. More... | |
bool | findTFWithNeighbor (TNeighborAgentProps *neighbor) |
Method is used only when I haven't found any transformation between mine and the current neighbor's graph. When I do find one, I just add every new nodeID + LS directly in own graph since I can now connect the new ones with the already integrated nodes of the neighbor. More... | |
void | getAllOwnNodes (std::set< TNodeID > *nodes_set) const |
Fill given set with the nodeIDs that were initially registered by the current graphSLAM engine (and not by any neighboring agent. More... | |
bool | getCMGraph (mrpt_msgs::GetCMGraph::Request &req, mrpt_msgs::GetCMGraph::Response &res) |
Compute and fill the Condensed Measurements Graph. More... | |
mrpt::poses::CPose3D | getLSPoseForGridMapVisualization (const TNodeID nodeID) const |
bool | getNeighborByAgentID (const std::string &agent_ID_str, TNeighborAgentProps *&neighbor) const |
Fill the TNeighborAgentProps instance based on the given agent_ID_str string that is provided. More... | |
void | getNodeIDsOfEstimatedTrajectory (std::set< TNodeID > *nodes_set) const |
void | getRobotEstimatedTrajectory (typename GRAPH_T::global_poses_t *graph_poses) const |
void | monitorNodeRegistration (bool registered=false, std::string class_name="Class") |
Overriden method that takes in account registration of multiple nodes of other running graphSLAM agents. More... | |
void | printParams () const |
bool | pubLastRegdIDScan () |
Update the last registered NodeID and LaserScan of the current agent. More... | |
bool | pubUpdatedNodesList () |
Update the last registered NodeIDs and corresponding positions of the current agent. More... | |
void | readParams () |
void | readROSParameters () |
void | setObjectPropsFromNodeID (const TNodeID nodeID, mrpt::opengl::CSetOfObjects::Ptr &viz_object) |
void | setupPubs () |
void | setupSrvs () |
void | setupSubs () |
void | usePublishersBroadcasters () |
Provide feedback about the SLAM operation. More... | |
Private Attributes | |
ros::AsyncSpinner | cm_graph_async_spinner |
AsyncSpinner that is used to query the CM-Graph service in case a new request arrives. More... | |
mrpt::slam::CGridMapAligner::TConfigParams | m_alignment_options |
Parameters used during the alignment operation. More... | |
mrpt::graphslam::detail::CConnectionManager | m_conn_manager |
CConnectionManager instance. More... | |
size_t | m_graph_nodes_last_size |
Last known size of the m_nodes map. More... | |
TColorManager | m_neighbor_colors_manager |
std::map< TNeighborAgentProps *, bool > | m_neighbor_to_found_initial_tf |
Map from neighbor instance to transformation from own to neighbor's graph. More... | |
neighbors_t | m_neighbors |
GraphSlamAgent instance pointer to TNeighborAgentProps. More... | |
ros::NodeHandle * | m_nh |
NodeHandle pointer - inherited by the parent. Redefined here for convenience. More... | |
size_t | m_nodes_to_laser_scans2D_last_size |
Last known size of the m_nodes_to_laser_scans2D map. More... | |
mrpt::graphslam::CGraphSlamEngine_MR::TOptions | m_opts |
bool | m_registered_multiple_nodes |
Indicates whether multiple nodes were just registered. Used for checking correct node registration in the monitorNodeRgistration method. More... | |
std::string | m_sec_alignment_params |
std::string | m_sec_mr_slam_params |
Subscribers - Publishers | |
ROS Topic Subscriber/Publisher/Service instances | |
ros::Publisher | m_list_neighbors_pub |
ros::Publisher | m_last_regd_id_scan_pub |
Publisher of the laserScan + the corresponding (last) registered node. More... | |
ros::Publisher | m_last_regd_nodes_pub |
Publisher of the last registered nodeIDs and positions. More... | |
ros::ServiceServer | m_cm_graph_srvserver |
Topic Names | |
Names of the topics that the class instance subscribes or publishes to | |
std::string | m_mr_ns |
Condensed Measurements topic namespace. More... | |
std::string | m_list_neighbors_topic |
Name of topic at which we publish information about the agents that we can currently communicate with. More... | |
std::string | m_last_regd_id_scan_topic |
Name of the topic that the last registered laser scan (+ corresponding nodeID) is published at. More... | |
std::string | m_last_regd_nodes_topic |
Name of the topic that the last X registered nodes + positions are going to be published at. More... | |
std::string | m_cm_graph_service |
Name of the server which is to be called when other agent wants to have a subgraph of certain nodes returned. More... | |
double | m_offset_y_nrd |
Display the Deciders/Optimizers with which we are running as well as the namespace of the current agent. More... | |
double | m_offset_y_erd |
double | m_offset_y_gso |
double | m_offset_y_namespace |
int | m_text_index_nrd |
int | m_text_index_erd |
int | m_text_index_gso |
int | m_text_index_namespace |
Additional Inherited Members | |
Public Attributes inherited from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T > | |
ros::NodeHandle * | m_nh |
Protected Member Functions inherited from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T > | |
void | readParams () |
Read the problem configuration parameters. More... | |
void | readROSParameters () |
Read configuration parameters from the ROS parameter server. More... | |
Protected Attributes inherited from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T > | |
ros::CallbackQueue | custom_service_queue |
Custom Callback queue for processing requests for the services outside the standard CallbackQueue. More... | |
int | m_queue_size |
mrpt::graphslam::CGraphSlamEngine derived class for executing multi-robot graphSLAM
Definition at line 67 of file CGraphSlamEngine_MR.h.
typedef GRAPH_T::constraint_t mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::constraint_t |
Definition at line 72 of file CGraphSlamEngine_MR.h.
typedef mrpt::graphslam::deciders::CEdgeRegistrationDecider_MR<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::edge_reg_mr_t |
Definition at line 88 of file CGraphSlamEngine_MR.h.
typedef GRAPH_T::global_pose_t mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::global_pose_t |
Definition at line 84 of file CGraphSlamEngine_MR.h.
typedef mrpt::graphs::detail::THypothesis<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::hypot_t |
Definition at line 81 of file CGraphSlamEngine_MR.h.
typedef std::vector<hypot_t> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::hypots_t |
Definition at line 82 of file CGraphSlamEngine_MR.h.
typedef std::vector<hypot_t*> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::hypotsp_t |
Definition at line 83 of file CGraphSlamEngine_MR.h.
typedef std::pair< TNodeID, mrpt::obs::CObservation2DRangeScan::Ptr> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::MRPT_NodeIDWithLaserScan |
Definition at line 76 of file CGraphSlamEngine_MR.h.
typedef std::vector<TNeighborAgentProps*> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::neighbors_t |
Definition at line 287 of file CGraphSlamEngine_MR.h.
typedef mrpt::graphslam::detail::TNodeProps<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::node_props_t |
Definition at line 85 of file CGraphSlamEngine_MR.h.
typedef std::map< TNodeID, mrpt::obs::CObservation2DRangeScan::Ptr> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::nodes_to_scans2D_t |
Definition at line 79 of file CGraphSlamEngine_MR.h.
typedef CGraphSlamEngine_ROS<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::parent_t |
Definition at line 70 of file CGraphSlamEngine_MR.h.
typedef std::vector<std::vector<TNodeID> > mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::partitions_t |
Definition at line 80 of file CGraphSlamEngine_MR.h.
typedef mrpt::graphslam::TUncertaintyPath<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::path_t |
Definition at line 86 of file CGraphSlamEngine_MR.h.
typedef std::vector<path_t> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::paths_t |
Definition at line 87 of file CGraphSlamEngine_MR.h.
typedef constraint_t::type_value mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::pose_t |
Definition at line 73 of file CGraphSlamEngine_MR.h.
typedef CGraphSlamEngine_MR<GRAPH_T> mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::self_t |
Definition at line 71 of file CGraphSlamEngine_MR.h.
mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::CGraphSlamEngine_MR | ( | ros::NodeHandle * | nh, |
const std::string & | config_file, | ||
const std::string & | rawlog_fname = "" , |
||
const std::string & | fname_GT = "" , |
||
mrpt::graphslam::CWindowManager * | win_manager = NULL , |
||
mrpt::graphslam::deciders::CNodeRegistrationDecider< GRAPH_T > * | node_reg = NULL , |
||
mrpt::graphslam::deciders::CEdgeRegistrationDecider< GRAPH_T > * | edge_reg = NULL , |
||
mrpt::graphslam::optimizers::CGraphSlamOptimizer< GRAPH_T > * | optimizer = NULL |
||
) |
Definition at line 29 of file CGraphSlamEngine_MR_impl.h.
mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::~CGraphSlamEngine_MR | ( | ) |
Definition at line 61 of file CGraphSlamEngine_MR_impl.h.
|
virtual |
Reimplemented from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T >.
Definition at line 455 of file CGraphSlamEngine_MR_impl.h.
|
private |
Traverse all neighbors for which I know the inter-graph transformation, run addNodeBatchFromNeighbor.
Definition at line 76 of file CGraphSlamEngine_MR_impl.h.
|
private |
neighbors for which I know the inter-graph transformation, add new batches of fetches nodeIDs and scans
Try to integrate the newly received nodeIDs and laser Scans in own graph as a batch
Definition at line 97 of file CGraphSlamEngine_MR_impl.h.
|
private |
Using map-merging find a potentuial transofrmation between own graph map to another agent's map and using that transformation add other agent's nodes to own graph.
Method delegates task to the findMatchesWithNeighboor method.
Definition at line 223 of file CGraphSlamEngine_MR_impl.h.
|
private |
Method is used only when I haven't found any transformation between mine and the current neighbor's graph. When I do find one, I just add every new nodeID + LS directly in own graph since I can now connect the new ones with the already integrated nodes of the neighbor.
Definition at line 270 of file CGraphSlamEngine_MR_impl.h.
|
private |
Fill given set with the nodeIDs that were initially registered by the current graphSLAM engine (and not by any neighboring agent.
Definition at line 1022 of file CGraphSlamEngine_MR_impl.h.
|
private |
Compute and fill the Condensed Measurements Graph.
Definition at line 937 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 609 of file CGraphSlamEngine_MR_impl.h.
|
private |
Fill the TNeighborAgentProps instance based on the given agent_ID_str string that is provided.
Definition at line 638 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 1035 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 1006 of file CGraphSlamEngine_MR_impl.h.
|
inline |
Definition at line 289 of file CGraphSlamEngine_MR.h.
void mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::initClass | ( | ) |
Definition at line 491 of file CGraphSlamEngine_MR_impl.h.
bool mrpt::graphslam::CGraphSlamEngine_MR< GRAPH_T >::isOwnNodeID | ( | const TNodeID | nodeID, |
const global_pose_t * | pose_out = NULL |
||
) | const |
Return true if current CGraphSlamEngine_MR object initially registered this nodeID, false otherwise.
[in] | nodeID | nodeID for which the query is made. runtime_error In case given nodeID isn't registered at all in the graph |
Definition at line 827 of file CGraphSlamEngine_MR_impl.h.
|
private |
Overriden method that takes in account registration of multiple nodes of other running graphSLAM agents.
Definition at line 987 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 885 of file CGraphSlamEngine_MR_impl.h.
|
private |
Update the last registered NodeID and LaserScan of the current agent.
Definition at line 776 of file CGraphSlamEngine_MR_impl.h.
|
private |
Update the last registered NodeIDs and corresponding positions of the current agent.
Definition at line 718 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 860 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 877 of file CGraphSlamEngine_MR_impl.h.
|
private |
Definition at line 960 of file CGraphSlamEngine_MR_impl.h.
|
privatevirtual |
Reimplemented from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T >.
Definition at line 897 of file CGraphSlamEngine_MR_impl.h.
|
privatevirtual |
Reimplemented from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T >.
Definition at line 924 of file CGraphSlamEngine_MR_impl.h.
|
privatevirtual |
Reimplemented from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T >.
Definition at line 894 of file CGraphSlamEngine_MR_impl.h.
|
privatevirtual |
Provide feedback about the SLAM operation.
Method makes the necessary calls to all the publishers of the class and broadcaster instances
Reimplemented from mrpt::graphslam::CGraphSlamEngine_ROS< GRAPH_T >.
Definition at line 659 of file CGraphSlamEngine_MR_impl.h.
|
private |
AsyncSpinner that is used to query the CM-Graph service in case a new request arrives.
Definition at line 508 of file CGraphSlamEngine_MR.h.
|
private |
Parameters used during the alignment operation.
Definition at line 512 of file CGraphSlamEngine_MR.h.
|
private |
Name of the server which is to be called when other agent wants to have a subgraph of certain nodes returned.
Definition at line 466 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 439 of file CGraphSlamEngine_MR.h.
|
private |
CConnectionManager instance.
Definition at line 474 of file CGraphSlamEngine_MR.h.
|
private |
Last known size of the m_nodes map.
Definition at line 482 of file CGraphSlamEngine_MR.h.
|
private |
Publisher of the laserScan + the corresponding (last) registered node.
Definition at line 431 of file CGraphSlamEngine_MR.h.
|
private |
Name of the topic that the last registered laser scan (+ corresponding nodeID) is published at.
Definition at line 457 of file CGraphSlamEngine_MR.h.
|
private |
Publisher of the last registered nodeIDs and positions.
Definition at line 437 of file CGraphSlamEngine_MR.h.
|
private |
Name of the topic that the last X registered nodes + positions are going to be published at.
Definition at line 461 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 428 of file CGraphSlamEngine_MR.h.
|
private |
Name of topic at which we publish information about the agents that we can currently communicate with.
Definition at line 453 of file CGraphSlamEngine_MR.h.
|
private |
Condensed Measurements topic namespace.
Definition at line 449 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 514 of file CGraphSlamEngine_MR.h.
|
private |
Map from neighbor instance to transformation from own to neighbor's graph.
As long as the corresponding variable for a specific agent is False current engine keeps trying the map-matching proc to find a common transformation between own and neighbor graphs.
Definition at line 420 of file CGraphSlamEngine_MR.h.
|
private |
GraphSlamAgent instance pointer to TNeighborAgentProps.
Definition at line 413 of file CGraphSlamEngine_MR.h.
|
private |
NodeHandle pointer - inherited by the parent. Redefined here for convenience.
Definition at line 480 of file CGraphSlamEngine_MR.h.
|
private |
Last known size of the m_nodes_to_laser_scans2D map.
Definition at line 471 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 489 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 490 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 491 of file CGraphSlamEngine_MR.h.
|
private |
Display the Deciders/Optimizers with which we are running as well as the namespace of the current agent.
Definition at line 488 of file CGraphSlamEngine_MR.h.
|
private |
|
private |
Indicates whether multiple nodes were just registered. Used for checking correct node registration in the monitorNodeRgistration method.
Definition at line 503 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 516 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 517 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 494 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 495 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 496 of file CGraphSlamEngine_MR.h.
|
private |
Definition at line 493 of file CGraphSlamEngine_MR.h.