octomap
1.9.8
Toggle main menu visibility
Loading...
Searching...
No Matches
MapNode.h
Go to the documentation of this file.
1
/*
2
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
3
* https://octomap.github.io/
4
*
5
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
6
* All rights reserved.
7
* License: New BSD
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions are met:
11
*
12
* * Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* * Redistributions in binary form must reproduce the above copyright
15
* notice, this list of conditions and the following disclaimer in the
16
* documentation and/or other materials provided with the distribution.
17
* * Neither the name of the University of Freiburg nor the names of its
18
* contributors may be used to endorse or promote products derived from
19
* this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
#ifndef OCTOMAP_MAP_NODE_H
35
#define OCTOMAP_MAP_NODE_H
36
37
38
#include <string>
39
#include <
octomap/OcTree.h
>
40
41
namespace
octomap
{
42
43
template
<
class
TREETYPE>
44
class
MapNode
{
45
46
public
:
47
MapNode
();
48
MapNode
(TREETYPE*
node_map
,
pose6d
origin
);
49
MapNode
(std::string filename,
pose6d
origin
);
50
MapNode
(
const
Pointcloud
& cloud,
pose6d
origin
);
51
~MapNode
();
52
53
typedef
TREETYPE
TreeType
;
54
55
TREETYPE*
getMap
() {
return
node_map
; }
56
57
void
updateMap
(
const
Pointcloud
& cloud,
point3d
sensor_origin);
58
59
inline
std::string
getId
() {
return
id
; }
60
inline
void
setId
(std::string newid) {
id
= newid; }
61
62
inline
pose6d
getOrigin
() {
return
origin
; }
63
64
// returns cloud of voxel centers in global reference frame
65
Pointcloud
generatePointcloud
();
66
bool
writeMap
(std::string filename);
67
68
protected
:
69
TREETYPE*
node_map
;
// occupancy grid map
70
pose6d
origin
;
// origin and orientation relative to parent
71
std::string
id
;
72
73
void
clear
();
74
bool
readMap
(std::string filename);
75
76
};
77
78
}
// end namespace
79
80
#include "
octomap/MapNode.hxx
"
81
82
#endif
MapNode.hxx
OcTree.h
octomap::MapNode::setId
void setId(std::string newid)
Definition
MapNode.h:60
octomap::MapNode::id
std::string id
Definition
MapNode.h:71
octomap::MapNode::TreeType
TREETYPE TreeType
Definition
MapNode.h:53
octomap::MapNode::origin
pose6d origin
Definition
MapNode.h:70
octomap::MapNode::clear
void clear()
Definition
MapNode.hxx:78
octomap::MapNode::readMap
bool readMap(std::string filename)
Definition
MapNode.hxx:88
octomap::MapNode::getMap
TREETYPE * getMap()
Definition
MapNode.h:55
octomap::MapNode::node_map
TREETYPE * node_map
Definition
MapNode.h:69
octomap::MapNode::getOrigin
pose6d getOrigin()
Definition
MapNode.h:62
octomap::MapNode::generatePointcloud
Pointcloud generatePointcloud()
Definition
MapNode.hxx:67
octomap::MapNode::updateMap
void updateMap(const Pointcloud &cloud, point3d sensor_origin)
Definition
MapNode.hxx:63
octomap::MapNode::writeMap
bool writeMap(std::string filename)
Definition
MapNode.hxx:97
octomap::MapNode::getId
std::string getId()
Definition
MapNode.h:59
octomap::MapNode::MapNode
MapNode()
Definition
MapNode.hxx:37
octomap::Pointcloud
A collection of 3D coordinates (point3d), which are regarded as endpoints of a 3D laser scan.
Definition
Pointcloud.h:47
octomap
Namespace the OctoMap library and visualization tools.
octomap::pose6d
octomath::Pose6D pose6d
Use our Pose6D (float precision) as pose6d in octomap.
Definition
octomap_types.h:51
octomap::point3d
octomath::Vector3 point3d
Use Vector3 (float precision) as a point3d in octomap.
Definition
octomap_types.h:49
include
octomap
MapNode.h
Generated on
for octomap by
1.18.0