Skip to content

Commit 12fe991

Browse files
committed
Merge branch 'devel' for 1.8.0 release
2 parents 54c3137 + 0d174e9 commit 12fe991

File tree

101 files changed

+10221
-12161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+10221
-12161
lines changed

dynamicEDT3D/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ENABLE_TESTING()
55

66
# version (e.g. for packaging)
77
set(DYNAMICEDT3D_MAJOR_VERSION 1)
8-
set(DYNAMICEDT3D_MINOR_VERSION 7)
9-
set(DYNAMICEDT3D_PATCH_VERSION 2)
8+
set(DYNAMICEDT3D_MINOR_VERSION 8)
9+
set(DYNAMICEDT3D_PATCH_VERSION 0)
1010
set(DYNAMICEDT3D_VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION})
1111
set(DYNAMICEDT3D_SOVERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION})
1212

@@ -50,6 +50,9 @@ find_package(octomap REQUIRED
5050
HINTS ${CMAKE_SOURCE_DIR}/lib/cmake/octomap
5151
${CMAKE_SOURCE_DIR}/../octomap/lib/cmake/octomap
5252
)
53+
MESSAGE(STATUS "Found octomap version: " ${octomap_VERSION})
54+
MESSAGE(STATUS "octomap libraries: ${OCTOMAP_LIBRARIES}")
55+
5356
INCLUDE_DIRECTORIES(${OCTOMAP_INCLUDE_DIRS})
5457

5558
ADD_SUBDIRECTORY(src)

dynamicEDT3D/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<package>
22
<name>dynamic_edt_3d</name>
3-
<version>1.7.2</version>
3+
<version>1.8.0</version>
44
<description> The dynamicEDT3D library implements an inrementally updatable Euclidean distance transform (EDT) in 3D. It comes with a wrapper to use the OctoMap 3D representation and hooks into the change detection of the OctoMap library to propagate changes to the EDT.</description>
55

66
<author email="[email protected]">Christoph Sprunk</author>

increase_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
print "Finished writing package.xml and CMakeLists.txt files.\n"
104104
print "Now check the output, adjust CHANGELOG, and \"git commit\".\nFinally, run:"
105105
print " git checkout master && git merge --no-ff devel && git tag v%s" % new_version_str
106-
print " git push && git push --tags"
106+
print " git push origin master devel && git push --tags"
107+
print "\n(adjust when not on the \"devel\" branch)\n"
107108

108109

109110

octomap/AUTHORS.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ Further contributors:
99
* R. Bogdan Rusu, Willow Garage Inc.
1010
* C. Dornhege, University of Freiburg
1111
* F-M. de Rainville, Universite Laval Quebec
12-
* B. Jensen, TU Munich
12+
* B. Jensen, TU Munich
13+
* A. Ecins, University of Maryland
14+
* C. Brew
15+
* F. Boniardi, University of Freiburg

octomap/CHANGELOG.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
v1.8.0: 2016-04-20
2+
==================
3+
- Fixed #98: The tree structure in memory is now maintained in OcTreeBaseImpl to
4+
enable safely deriving custom node classes. The following functions were
5+
moved from OcTreeDataNode into OcTreeBaseImpl:
6+
createChild(...) -> OcTreeBaseImpl::createNodeChild(...)
7+
getChild(...) -> OcTreeBaseImpl::getNodeChild(...)
8+
expandNode() -> OcTreeBaseImpl::expandNode(...)
9+
pruneNode() -> OcTreeBaseImpl::pruneNode(...)
10+
hasChildren() -> OcTreeBaseImpl::nodeHasChildren(...)
11+
childExists(...) -> OcTreeBaseImpl::nodeChildExist(...)
12+
collapsible() -> OcTreeBaseImpl::isNodeCollapsible(...)
13+
If you use custom derived node classes, you need to adjust your code to the
14+
new API (have a look at ColorOcTree.h as an example). In particular, you
15+
should no longer use the above node member functions in your nodes.
16+
- Extended unit tests for the new memory management
17+
- Added valgrind memcheck suppression file with known ("wanted") leaks due to
18+
StaticMemberInitializer.
19+
- Replaced `unsigned short int` for key values with octomap::key_type
20+
(=uint16_t) and unsigned char with uint8_t in API.
21+
- Cleaned up OcTreeKey and KeyRay API (used internally)
22+
- Reduced unneeded memory for StaticMemberInitializer
23+
- Cleaned up const refs to primitive types in ColorOcTree interface
24+
- Removed deprecated insertScan functions (replaced by insertPointCloud)
25+
- Removed no longer used ROS logging macros and unmaintained OcTreeLUT,
26+
OcTreeBaseSE classes
27+
- octovis: Internal version of libQGLViewer updated to 2.6.3
28+
129
v1.7.2: 2016-03-26
230
==================
331
- BBX iterators fixed for empty trees (point3d version)

octomap/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ENABLE_TESTING()
55

66
# version (e.g. for packaging)
77
set(OCTOMAP_MAJOR_VERSION 1)
8-
set(OCTOMAP_MINOR_VERSION 7)
9-
set(OCTOMAP_PATCH_VERSION 2)
8+
set(OCTOMAP_MINOR_VERSION 8)
9+
set(OCTOMAP_PATCH_VERSION 0)
1010
set(OCTOMAP_VERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION}.${OCTOMAP_PATCH_VERSION})
1111
set(OCTOMAP_SOVERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION})
1212
if(COMMAND cmake_policy)

octomap/include/octomap/ColorOcTree.h

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,26 @@
4141

4242
namespace octomap {
4343

44+
// forward declaraton for "friend"
45+
class ColorOcTree;
46+
4447
// node definition
4548
class ColorOcTreeNode : public OcTreeNode {
4649
public:
50+
friend class ColorOcTree; // needs access to node children (inherited)
4751

4852
class Color {
4953
public:
5054
Color() : r(255), g(255), b(255) {}
51-
Color(unsigned char _r, unsigned char _g, unsigned char _b)
55+
Color(uint8_t _r, uint8_t _g, uint8_t _b)
5256
: r(_r), g(_g), b(_b) {}
5357
inline bool operator== (const Color &other) const {
5458
return (r==other.r && g==other.g && b==other.b);
5559
}
5660
inline bool operator!= (const Color &other) const {
5761
return (r!=other.r || g!=other.g || b!=other.b);
5862
}
59-
unsigned char r, g, b;
63+
uint8_t r, g, b;
6064
};
6165

6266
public:
@@ -68,26 +72,14 @@ namespace octomap {
6872
return (rhs.value == value && rhs.color == color);
6973
}
7074

71-
// children
72-
inline ColorOcTreeNode* getChild(unsigned int i) {
73-
return static_cast<ColorOcTreeNode*> (OcTreeNode::getChild(i));
74-
}
75-
inline const ColorOcTreeNode* getChild(unsigned int i) const {
76-
return static_cast<const ColorOcTreeNode*> (OcTreeNode::getChild(i));
75+
void copyData(const ColorOcTreeNode& from){
76+
OcTreeNode::copyData(from);
77+
this->color = from.getColor();
7778
}
78-
79-
bool createChild(unsigned int i) {
80-
if (children == NULL) allocChildren();
81-
children[i] = new ColorOcTreeNode();
82-
return true;
83-
}
84-
85-
bool pruneNode();
86-
void expandNode();
87-
79+
8880
inline Color getColor() const { return color; }
8981
inline void setColor(Color c) {this->color = c; }
90-
inline void setColor(unsigned char r, unsigned char g, unsigned char b) {
82+
inline void setColor(uint8_t r, uint8_t g, uint8_t b) {
9183
this->color = Color(r,g,b);
9284
}
9385

@@ -104,8 +96,8 @@ namespace octomap {
10496
ColorOcTreeNode::Color getAverageChildColor() const;
10597

10698
// file I/O
107-
std::istream& readValue (std::istream &s);
108-
std::ostream& writeValue(std::ostream &s) const;
99+
std::istream& readData(std::istream &s);
100+
std::ostream& writeData(std::ostream &s) const;
109101

110102
protected:
111103
Color color;
@@ -124,38 +116,48 @@ namespace octomap {
124116
ColorOcTree* create() const {return new ColorOcTree(resolution); }
125117

126118
std::string getTreeType() const {return "ColorOcTree";}
127-
119+
120+
/**
121+
* Prunes a node when it is collapsible. This overloaded
122+
* version only considers the node occupancy for pruning,
123+
* different colors of child nodes are ignored.
124+
* @return true if pruning was successful
125+
*/
126+
virtual bool pruneNode(ColorOcTreeNode* node);
127+
128+
virtual bool isNodeCollapsible(const ColorOcTreeNode* node) const;
129+
128130
// set node color at given key or coordinate. Replaces previous color.
129-
ColorOcTreeNode* setNodeColor(const OcTreeKey& key, const unsigned char& r,
130-
const unsigned char& g, const unsigned char& b);
131+
ColorOcTreeNode* setNodeColor(const OcTreeKey& key, uint8_t r,
132+
uint8_t g, uint8_t b);
131133

132-
ColorOcTreeNode* setNodeColor(const float& x, const float& y,
133-
const float& z, const unsigned char& r,
134-
const unsigned char& g, const unsigned char& b) {
134+
ColorOcTreeNode* setNodeColor(float x, float y,
135+
float z, uint8_t r,
136+
uint8_t g, uint8_t b) {
135137
OcTreeKey key;
136138
if (!this->coordToKeyChecked(point3d(x,y,z), key)) return NULL;
137139
return setNodeColor(key,r,g,b);
138140
}
139141

140142
// integrate color measurement at given key or coordinate. Average with previous color
141-
ColorOcTreeNode* averageNodeColor(const OcTreeKey& key, const unsigned char& r,
142-
const unsigned char& g, const unsigned char& b);
143+
ColorOcTreeNode* averageNodeColor(const OcTreeKey& key, uint8_t r,
144+
uint8_t g, uint8_t b);
143145

144-
ColorOcTreeNode* averageNodeColor(const float& x, const float& y,
145-
const float& z, const unsigned char& r,
146-
const unsigned char& g, const unsigned char& b) {
146+
ColorOcTreeNode* averageNodeColor(float x, float y,
147+
float z, uint8_t r,
148+
uint8_t g, uint8_t b) {
147149
OcTreeKey key;
148150
if (!this->coordToKeyChecked(point3d(x,y,z), key)) return NULL;
149151
return averageNodeColor(key,r,g,b);
150152
}
151153

152154
// integrate color measurement at given key or coordinate. Average with previous color
153-
ColorOcTreeNode* integrateNodeColor(const OcTreeKey& key, const unsigned char& r,
154-
const unsigned char& g, const unsigned char& b);
155+
ColorOcTreeNode* integrateNodeColor(const OcTreeKey& key, uint8_t r,
156+
uint8_t g, uint8_t b);
155157

156-
ColorOcTreeNode* integrateNodeColor(const float& x, const float& y,
157-
const float& z, const unsigned char& r,
158-
const unsigned char& g, const unsigned char& b) {
158+
ColorOcTreeNode* integrateNodeColor(float x, float y,
159+
float z, uint8_t r,
160+
uint8_t g, uint8_t b) {
159161
OcTreeKey key;
160162
if (!this->coordToKeyChecked(point3d(x,y,z), key)) return NULL;
161163
return integrateNodeColor(key,r,g,b);
@@ -181,6 +183,7 @@ namespace octomap {
181183
public:
182184
StaticMemberInitializer() {
183185
ColorOcTree* tree = new ColorOcTree(0.1);
186+
tree->clearKeyRays();
184187
AbstractOcTree::registerTreeType(tree);
185188
}
186189

octomap/include/octomap/CountingOcTree.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,11 @@ namespace octomap {
5656

5757
CountingOcTreeNode();
5858
~CountingOcTreeNode();
59-
bool createChild(unsigned int i);
60-
61-
inline CountingOcTreeNode* getChild(unsigned int i) {
62-
return static_cast<CountingOcTreeNode*> (OcTreeDataNode<unsigned int>::getChild(i));
63-
}
64-
65-
inline const CountingOcTreeNode* getChild(unsigned int i) const {
66-
return static_cast<const CountingOcTreeNode*> (OcTreeDataNode<unsigned int>::getChild(i));
67-
}
68-
59+
6960
inline unsigned int getCount() const { return getValue(); }
7061
inline void increaseCount() { value++; }
7162
inline void setCount(unsigned c) {this->setValue(c); }
7263

73-
// overloaded:
74-
void expandNode();
7564
};
7665

7766

@@ -82,8 +71,7 @@ namespace octomap {
8271
* Count is recursive, parent nodes have the summed count of their
8372
* children.
8473
*
85-
* \note In our mapping system this data structure is used in
86-
* the sensor model only. Do not use, e.g., insertScan.
74+
* \note Was only used internally, not used anymore
8775
*/
8876
class CountingOcTree : public OcTreeBase <CountingOcTreeNode> {
8977

@@ -113,6 +101,7 @@ namespace octomap {
113101
public:
114102
StaticMemberInitializer() {
115103
CountingOcTree* tree = new CountingOcTree(0.1);
104+
tree->clearKeyRays();
116105
AbstractOcTree::registerTreeType(tree);
117106
}
118107

octomap/include/octomap/OcTree.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ namespace octomap {
8080
public:
8181
StaticMemberInitializer() {
8282
OcTree* tree = new OcTree(0.1);
83+
tree->clearKeyRays();
8384
AbstractOcTree::registerTreeType(tree);
8485
}
8586

0 commit comments

Comments
 (0)