Main MRPT website > C++ reference for MRPT 1.4.0
octomap_types.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 // $Id: octomap_types.h 436 2012-10-15 10:18:16Z ahornung $
10 
11 /**
12 * OctoMap:
13 * A probabilistic, flexible, and compact 3D mapping library for robotic systems.
14 * @author K. M. Wurm, A. Hornung, University of Freiburg, Copyright (C) 2009.
15 * @see http://octomap.sourceforge.net/
16 * License: New BSD License
17 */
18 
19 /*
20  * Copyright (c) 2009, K. M. Wurm, A. Hornung, University of Freiburg
21  * All rights reserved.
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions are met:
25  *
26  * * Redistributions of source code must retain the above copyright
27  * notice, this list of conditions and the following disclaimer.
28  * * Redistributions in binary form must reproduce the above copyright
29  * notice, this list of conditions and the following disclaimer in the
30  * documentation and/or other materials provided with the distribution.
31  * * Neither the name of the University of Freiburg nor the names of its
32  * contributors may be used to endorse or promote products derived from
33  * this software without specific prior written permission.
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
39  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
42  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45  * POSSIBILITY OF SUCH DAMAGE.
46  */
47 
48 #ifndef OCTOMAP_TYPES_H
49 #define OCTOMAP_TYPES_H
50 
51 #include <vector>
52 #include <list>
53 
54 #include <mrpt/utils/mrpt_stdint.h> // compiler-independent version of "stdint.h"
55 
59 
60 namespace octomap {
61 
62  ///Use Vector3 (float precision) as a point3d in octomap
64  /// Use our Pose6D (float precision) as pose6d in octomap
66 
67  typedef std::vector<octomath::Vector3> point3d_collection;
68  typedef std::list<octomath::Vector3> point3d_list;
69 
70  /// A voxel defined by its center point3d and its side length
71  typedef std::pair<point3d, double> OcTreeVolume;
72 
73 }
74 
75  //Macros for compiling with an without ROS (for output logging)
76  #ifdef OCTOMAP_ROS
77  #include <ros/ros.h>
78 
79  #define OCTOMAP_DEBUG ROS_DEBUG
80  #define OCTOMAP_DEBUG_STR ROS_DEBUG_STREAM
81  #define OCTOMAP_WARNING ROS_WARN
82  #define OCTOMAP_WARNING_STR ROS_WARN_STREAM
83  #define OCTOMAP_ERROR ROS_ERROR
84  #define OCTOMAP_ERROR_STR ROS_ERROR_STREAM
85 
86  #else
87  // no debug output if not in debug mode:
88  #ifdef NDEBUG
89  #ifndef OCTOMAP_NODEBUGOUT
90  #define OCTOMAP_NODEBUGOUT
91  #endif
92  #endif
93 
94  #ifdef OCTOMAP_NODEBUGOUT
95  #define OCTOMAP_DEBUG(...) (void)0
96  #define OCTOMAP_DEBUG_STR(...) (void)0
97  #else
98  #define OCTOMAP_DEBUG(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
99  #define OCTOMAP_DEBUG_STR(args) std::cerr << args << std::endl
100  #endif
101 
102  #define OCTOMAP_WARNING(...) fprintf(stderr, "WARNING: "), fprintf(stderr, __VA_ARGS__), fflush(stderr)
103  #define OCTOMAP_WARNING_STR(args) std::cerr << "WARNING: " << args << std::endl
104  #define OCTOMAP_ERROR(...) fprintf(stderr, "ERROR: "), fprintf(stderr, __VA_ARGS__), fflush(stderr)
105  #define OCTOMAP_ERROR_STR(args) std::cerr << "ERROR: " << args << std::endl
106  #endif
107 
108 
109 #endif
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.
std::pair< point3d, double > OcTreeVolume
A voxel defined by its center point3d and its side length.
Definition: octomap_types.h:71
std::vector< octomath::Vector3 > point3d_collection
Definition: octomap_types.h:67
std::list< octomath::Vector3 > point3d_list
Definition: octomap_types.h:68
octomath::Vector3 point3d
Use Vector3 (float precision) as a point3d in octomap.
Definition: octomap_types.h:63
octomath::Pose6D pose6d
Use our Pose6D (float precision) as pose6d in octomap.
Definition: octomap_types.h:65
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 Sun Jul 10 11:38:36 UTC 2016