CGraphSlamEngine_ROS.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 
13 
15 #include <ros/ros.h>
16 
17 namespace mrpt { namespace graphslam {
18 
24 template<class GRAPH_t=typename mrpt::graphs::CNetworkOfPoses2DInf>
25 class CGraphSlamEngine_ROS : public CGraphSlamEngine<GRAPH_t>
26 {
27 public:
29 
31  ros::NodeHandle* nh,
32  const std::string& config_file,
33  const std::string& rawlog_fname="",
34  const std::string& fname_GT="",
35  mrpt::graphslam::CWindowManager* win_manager=NULL,
39  );
40  virtual ~CGraphSlamEngine_ROS();
47  void setupComm();
48 
50  void initClass();
52 protected:
57  void readParams();
63  virtual void usePublishersBroadcasters();
69  void readROSParameters();
70  virtual bool _execGraphSlamStep(
71  mrpt::obs::CActionCollection::Ptr& action,
72  mrpt::obs::CSensoryFrame::Ptr& observations,
73  mrpt::obs::CObservation::Ptr& observation,
74  size_t& rawlog_entry);
75 
83  virtual void setupSubs();
84  virtual void setupPubs();
85  virtual void setupSrvs();
98 
99 
101 };
102 
103 } } // end of namespaces
104 
106 
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 readParams()
Read the problem configuration parameters.
virtual bool _execGraphSlamStep(mrpt::obs::CActionCollection::Ptr &action, mrpt::obs::CSensoryFrame::Ptr &observations, mrpt::obs::CObservation::Ptr &observation, size_t &rawlog_entry)
ros::CallbackQueue custom_service_queue
Custom Callback queue for processing requests for the services outside the standard CallbackQueue...
virtual void usePublishersBroadcasters()
Provide feedback about the SLAM operation.
void initClass()
Initialize object instance.
void readROSParameters()
Read configuration parameters from the ROS parameter server.
void setupComm()
Wrapper method around the protected setup* class methods.
Class template that provides a wrapper around the MRPT CGraphSlamEngine class template and implements...


mrpt_graphslam_2d
Author(s): Nikos Koukis
autogenerated on Sat May 2 2020 03:44:17