Main MRPT website > C++ reference for MRPT 1.4.0
MapNode.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 #ifndef OCTOMAP_MAP_NODE_H
10 #define OCTOMAP_MAP_NODE_H
11 
12 // $Id: MapNode.h 402 2012-08-06 13:39:42Z ahornung $
13 
14 /**
15  * OctoMap:
16  * A probabilistic, flexible, and compact 3D mapping library for robotic systems.
17  * @author K. M. Wurm, A. Hornung, University of Freiburg, Copyright (C) 2009-2011
18  * @see http://octomap.sourceforge.net/
19  * License: New BSD License
20  */
21 
22 /*
23  * Copyright (c) 2009-2011, K. M. Wurm, A. Hornung, University of Freiburg
24  * All rights reserved.
25  *
26  * Redistribution and use in source and binary forms, with or without
27  * modification, are permitted provided that the following conditions are met:
28  *
29  * * Redistributions of source code must retain the above copyright
30  * notice, this list of conditions and the following disclaimer.
31  * * Redistributions in binary form must reproduce the above copyright
32  * notice, this list of conditions and the following disclaimer in the
33  * documentation and/or other materials provided with the distribution.
34  * * Neither the name of the University of Freiburg nor the names of its
35  * contributors may be used to endorse or promote products derived from
36  * this software without specific prior written permission.
37  *
38  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
39  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
42  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48  * POSSIBILITY OF SUCH DAMAGE.
49  */
50 
51 #include <string>
53 
54 namespace octomap {
55 
56  template <class TREETYPE>
57  class MapNode {
58 
59  public:
60  MapNode();
61  MapNode(TREETYPE* node_map, pose6d origin);
62  MapNode(std::string filename, pose6d origin);
63  MapNode(const Pointcloud& cloud, pose6d origin);
64  ~MapNode();
65 
66  typedef TREETYPE TreeType;
67 
68  TREETYPE* getMap() { return node_map; }
69 
70  void updateMap(const Pointcloud& cloud, point3d sensor_origin);
71 
72  inline std::string getId() { return id; }
73  inline void setId(std::string newid) { id = newid; }
74 
75  inline pose6d getOrigin() { return origin; }
76 
77  // returns cloud of voxel centers in global reference frame
79  bool writeMap(std::string filename);
80 
81  protected:
82  TREETYPE* node_map; // occupancy grid map
83  pose6d origin; // origin and orientation relative to parent
84  std::string id;
85 
86  void clear();
87  bool readMap(std::string filename);
88 
89  };
90 
91 } // end namespace
92 
93 #include "mrpt/otherlibs/octomap/MapNode.hxx"
94 
95 #endif
std::string getId()
Definition: MapNode.h:72
pose6d getOrigin()
Definition: MapNode.h:75
std::string id
Definition: MapNode.h:84
This class represents a tree-dimensional pose of an object.
Definition: Pose6D.h:64
OctoMap: A probabilistic, flexible, and compact 3D mapping library for robotic systems.
bool readMap(std::string filename)
void updateMap(const Pointcloud &cloud, point3d sensor_origin)
A collection of 3D coordinates (point3d), which are regarded as endpoints of a 3D laser scan...
Definition: Pointcloud.h:63
bool writeMap(std::string filename)
pose6d origin
Definition: MapNode.h:83
void setId(std::string newid)
Definition: MapNode.h:73
Pointcloud generatePointcloud()
TREETYPE * node_map
Definition: MapNode.h:82
TREETYPE * getMap()
Definition: MapNode.h:68
TREETYPE TreeType
Definition: MapNode.h:66
This class represents a three-dimensional vector.
Definition: Vector3.h:65



Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN:Unversioned directory at Mon Jul 4 10:31:07 UTC 2016