Main MRPT website > C++ reference for MRPT 1.9.9
CMRVisualizer.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-2017, 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 #ifndef CMRVISUALIZER_H
10 #define CMRVISUALIZER_H
11 
12 #include <iostream>
13 
16 #include <utility>
17 
18 namespace mrpt
19 {
20 namespace graphs
21 {
22 namespace detail
23 {
24 // (Dummy) standard version
25 //////////////////////////////////////////////////////////
26 
27 /**\brief Wrapper class that provides visualization of a network of poses that
28  * have been registered by many graphSLAM agents/robots
29  *
30  * \note This is a dummy 4 template arguments version of the CMRVisualizer
31  * class just to silence GCC warnings on conversions.
32  * For implementation details users should see its specialized version that
33  * runs specifically for TMRSlamNodeAnnotations as the 3rd template argument.
34  *
35  */
36 template <class CPOSE, // Type of edges
37  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
38  class NODE_ANNOTATIONS = mrpt::graphs::detail::TMRSlamNodeAnnotations,
39  class EDGE_ANNOTATIONS = mrpt::graphs::detail::edge_annotations_empty>
40 class CMRVisualizer : public CVisualizer<CPOSE, MAPS_IMPLEMENTATION,
41  NODE_ANNOTATIONS, EDGE_ANNOTATIONS>
42 {
43  public:
44  typedef CVisualizer<CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS,
45  EDGE_ANNOTATIONS>
47  typedef mrpt::graphs::CNetworkOfPoses<CPOSE, MAPS_IMPLEMENTATION,
48  NODE_ANNOTATIONS, EDGE_ANNOTATIONS>
50 
51  CMRVisualizer(const GRAPH_T& graph_in);
52 
54  void drawNodePoints(
56  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
57  void drawEdges(
59  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
60 
61  private:
62 };
63 
64 // Specialized version
65 //////////////////////////////////////////////////////////
66 
67 template <class CPOSE, // Type of edges
68  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
69  class EDGE_ANNOTATIONS>
70 class CMRVisualizer<CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations,
71  EDGE_ANNOTATIONS>
72  : public CVisualizer<CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations,
73  EDGE_ANNOTATIONS>
74 {
75  public:
76  typedef CVisualizer<CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations,
77  EDGE_ANNOTATIONS>
80  CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations, EDGE_ANNOTATIONS>
82 
83  CMRVisualizer(const GRAPH_T& graph_in);
84 
86  void drawNodePoints(
88  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
89  void drawEdges(
91  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
92 
93  private:
94 };
95 }
96 }
97 } // end of namespaces
98 
100 
101 #endif /* end of include guard: CMRVISUALIZER_H */
CVisualizer< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > parent
Definition: CMRVisualizer.h:46
void drawEdges(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
Base class for C*Visualizer classes.
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
CMRVisualizer(const GRAPH_T &graph_in)
std::shared_ptr< CSetOfObjects > Ptr
Definition: CSetOfObjects.h:32
CVisualizer< CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations, EDGE_ANNOTATIONS > parent
Definition: CMRVisualizer.h:78
mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, TMRSlamNodeAnnotations, EDGE_ANNOTATIONS > GRAPH_T
Definition: CMRVisualizer.h:81
mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > GRAPH_T
Definition: CMRVisualizer.h:49
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Struct to be used as the NODE_ANNOTATIONS template argument in CNetworkOfPoses class instances for us...
Wrapper class that provides visualization of a network of poses that have been registered by many gra...
Definition: CMRVisualizer.h:40
void drawNodePoints(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019