Skip to content

Commit 03da11e

Browse files
committed
Merge branch 'devel' for 1.7.1 release
2 parents 57eaec9 + a4ecae2 commit 03da11e

Some content is hidden

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

42 files changed

+444
-158
lines changed

dynamicEDT3D/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENABLE_TESTING()
66
# version (e.g. for packaging)
77
set(DYNAMICEDT3D_MAJOR_VERSION 1)
88
set(DYNAMICEDT3D_MINOR_VERSION 7)
9-
set(DYNAMICEDT3D_PATCH_VERSION 0)
9+
set(DYNAMICEDT3D_PATCH_VERSION 1)
1010
set(DYNAMICEDT3D_VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION})
1111
set(DYNAMICEDT3D_SOVERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION})
1212

@@ -25,6 +25,13 @@ SET( BASE_DIR ${CMAKE_SOURCE_DIR} )
2525
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
2626
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
2727
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BASE_DIR}/bin )
28+
# output dirs for multi-config builds (MSVC)
29+
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
30+
STRING( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
31+
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/lib )
32+
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/lib )
33+
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/bin )
34+
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
2835

2936
set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include")
3037
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
@@ -73,6 +80,17 @@ export(PACKAGE dynamicEDT3D)
7380
# Create a dynamicEDT3DConfig.cmake file for the use from the build tree
7481
set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}")
7582
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
83+
# Set library names as absolute paths
84+
# Windows, spec. MSVC requires the .lib suffix for imported libs
85+
IF(WIN32)
86+
set(DYNAMICEDT3D_LIBRARY
87+
"${DYNAMICEDT3D_LIB_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}dynamicedt3d${CMAKE_IMPORT_LIBRARY_SUFFIX}"
88+
)
89+
ELSE()
90+
set(DYNAMICEDT3D_LIBRARY
91+
"${DYNAMICEDT3D_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dynamicedt3d${CMAKE_SHARED_LIBRARY_SUFFIX}"
92+
)
93+
ENDIF()
7694
# not used right now (export depends?)
7795
#set(DYNEDT3D_CMAKE_DIR "${PROJECT_BINARY_DIR}")
7896
configure_file(dynamicEDT3DConfig.cmake.in

dynamicEDT3D/dynamicEDT3DConfig.cmake.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ set(DYNAMICEDT3D_LIBRARY_DIRS "@DYNAMICEDT3D_LIB_DIR@")
2020
# Our library dependencies (contains definitions for IMPORTED targets)
2121
# include("@FOOBAR_CMAKE_DIR@/FooBarLibraryDepends.cmake")
2222

23-
set(DYNAMICEDT3D_LIBRARIES
24-
"@DYNAMICEDT3D_LIB_DIR@/libdynamicedt3d@CMAKE_SHARED_LIBRARY_SUFFIX@"
25-
)
23+
set(DYNAMICEDT3D_LIBRARIES "@DYNAMICEDT3D_LIBRARY@")

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.0</version>
3+
<version>1.7.1</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>

octomap/CHANGELOG.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
v1.7.1: 2016-01-31
2+
==================
3+
- Fixed #82: Enable uninstall target for complete project
4+
- Fixed #47: Exported CMake library paths for Windows no longer
5+
have the Release/Debug prefix and correctly contain the .lib file
6+
- Fixed #51: IO factory class registry with MSVC. Calling a dummy
7+
function from an OcTree class c'tor enables reading general .ot files
8+
when compiling with MSVC
9+
- Fixed #100: Explicit casts to avoid warnings with MSVC
10+
111
v1.7.0: 2015-11-27
212
==================
313
- BBX iterators fixed for empty trees (thx to F. Boniardi)
@@ -8,6 +18,12 @@ v1.7.0: 2015-11-27
818
A. Ecins)
919
- Fixed hashing overflow with clang (thx to L. Riano)
1020

21+
22+
v1.6.9: 2016-01-13
23+
==================
24+
- Maintenance release for ROS:
25+
Added function to determine state of change detection
26+
1127
v1.6.7: 2014-08-31
1228
==================
1329
- FSF address in octovis license header for OctoMap package in Fedora

octomap/CMakeLists.txt

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENABLE_TESTING()
66
# version (e.g. for packaging)
77
set(OCTOMAP_MAJOR_VERSION 1)
88
set(OCTOMAP_MINOR_VERSION 7)
9-
set(OCTOMAP_PATCH_VERSION 0)
9+
set(OCTOMAP_PATCH_VERSION 1)
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)
@@ -35,6 +35,13 @@ SET( BASE_DIR ${CMAKE_SOURCE_DIR} )
3535
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
3636
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BASE_DIR}/lib )
3737
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BASE_DIR}/bin )
38+
# output dirs for multi-config builds (MSVC)
39+
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
40+
STRING( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
41+
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/lib )
42+
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/lib )
43+
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${BASE_DIR}/bin )
44+
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
3845

3946
set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include")
4047
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
@@ -69,26 +76,39 @@ configure_file(
6976
add_custom_target(uninstall
7077
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
7178

72-
7379
# Export the package for use from the build-tree
7480
# (this registers the build-tree with a global CMake-registry)
7581
export(PACKAGE octomap)
7682

7783
# Create a octomap-config.cmake file for the use from the build tree
7884
set(OCTOMAP_INCLUDE_DIRS "${INCLUDE_DIRS}")
7985
set(OCTOMAP_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
86+
# Set library names as absolute paths
87+
# Windows, spec. MSVC requires the .lib suffix for imported libs
88+
IF(WIN32)
89+
set(OCTOMAP_LIBRARY
90+
"${OCTOMAP_LIB_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}octomap${CMAKE_IMPORT_LIBRARY_SUFFIX}"
91+
)
92+
set(OCTOMATH_LIBRARY
93+
"${OCTOMAP_LIB_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}octomath${CMAKE_IMPORT_LIBRARY_SUFFIX}"
94+
)
95+
ELSE()
96+
set(OCTOMAP_LIBRARY
97+
"${OCTOMAP_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}octomap${CMAKE_SHARED_LIBRARY_SUFFIX}"
98+
)
99+
set(OCTOMATH_LIBRARY
100+
"${OCTOMAP_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}octomath${CMAKE_SHARED_LIBRARY_SUFFIX}"
101+
)
102+
ENDIF()
103+
80104
# not used right now (export depends?)
81105
#set(OCTOMAP_CMAKE_DIR "${PROJECT_BINARY_DIR}")
82106
configure_file(octomap-config.cmake.in
83107
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config.cmake" @ONLY)
84108
configure_file(octomap-config-version.cmake.in
85109
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config-version.cmake" @ONLY)
86110

87-
# Install the export set for use with the install-tree
88-
#install(EXPORT FooBarLibraryDepends DESTINATION
89-
# "${INSTALL_DATA_DIR}/FooBar/CMake"
90-
# COMPONENT dev)
91-
111+
92112
# Create a octomap-config.cmake file for the use from the install tree
93113
# and install it
94114
set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")

octomap/CMakeModules/CMakeUninstall.cmake.in

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2-
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3-
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
1+
# Ignore empty list items.
2+
cmake_policy(SET CMP0007 OLD)
43

5-
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
4+
if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
5+
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
6+
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
7+
8+
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
69
string(REGEX REPLACE "\n" ";" files "${files}")
710
list(REVERSE files)
811
foreach (file ${files})

octomap/README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,38 +121,48 @@ The octomap library and tools can be compiled and used
121121
under Windows although this has not been tested in-depth.
122122
Feedback is welcome.
123123

124-
To compile the library you need cmake (http://www.cmake.org).
124+
To compile the library you need cmake (http://www.cmake.org)
125+
and either MinGW or Visual Studio.
125126

126127
### MinGW ###
127128

128129
1. Download the MinGW distribution (http://www.mingw.org)
129130
2. Install C++ compiler and add MingGW/bin to your system PATH
130131
3. Start the cmake-gui and set the code directory to the
131132
library root (e.g. `/octomap`)
132-
4. Set the build directory to, e.g., `/octomap/build`.
133-
5. Press "Generate", select the appropriate generator, "MinGW Makefiles".
133+
4. Create and set the build directory to, e.g., `/octomap/build`.
134+
5. Press "Configure" then "Generate", select the appropriate generator, "MinGW Makefiles".
134135
6. Start a command shell and "make" the project:
135136

136137
octomap> cd build
137138
octomap/build> mingw32-make.exe
138139

139140

140-
You can run the unit tests using ctest on the command prompt:
141+
As verification, you can run the unit tests using ctest on the
142+
command prompt:
141143

142144
octomap/build> ctest.exe
143145

144146

145-
### Microsoft Visual Studio 2010 ###
147+
### Microsoft Visual Studio (2013 or later recommended) ###
146148

147-
1. Start the cmake-gui and set the code directory to the
148-
library root (e.g. `/octomap`)
149-
2. Set the build directory to, e.g., /octomap/build.
150-
3. Press "Generate", select the appropriate generator, e.g. "Visual Studio 10".
151-
This generates a solution file octomap.sln
152-
4. Load this file and build the project
149+
Last tested with MSVC 2013 and 2015 (Community Edition).
150+
151+
1. Start the cmake-gui and set the source code directory to the
152+
library root (e.g. `\octomap`)
153+
2. Create a build directory and set it in CMake ("Where to build the
154+
binaries"), e.g. `\octomap\build`.
155+
3. Press "Configure" then "Generate", select the appropriate generator, e.g. "Visual Studio 2015".
156+
This generates a solution file `octomap.sln` in the build directory.
157+
4. Load this file and build the project `ALL_BUILD` in Visual Studio.
153158

159+
Instead of building the complete distribution (octomap, octovis, and dynamicEDT3D)
160+
you can only build octomap by proceeding as described above but in the `octomap`
161+
subdirectory. This can help you getting started when there are problems with
162+
octovis and Qt4.
154163

155-
You can run the unit tests using ctest on the command prompt:
164+
As verification, you can run the unit tests in Visual Studio by building the
165+
`RUN_TESTS` project or by using ctest on the command prompt:
156166

157167
octomap/build> ctest.exe -C Release
158168

octomap/include/octomap/ColorOcTree.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ namespace octomap {
117117

118118
public:
119119
/// Default constructor, sets resolution of leafs
120-
ColorOcTree(double resolution) : OccupancyOcTreeBase<ColorOcTreeNode>(resolution) {};
120+
ColorOcTree(double resolution);
121121

122122
/// virtual constructor: creates a new object of same type
123123
/// (Covariant return type requires an up-to-date compiler)
@@ -172,14 +172,24 @@ namespace octomap {
172172

173173
/**
174174
* Static member object which ensures that this OcTree's prototype
175-
* ends up in the classIDMapping only once
175+
* ends up in the classIDMapping only once. You need this as a
176+
* static member in any derived octree class in order to read .ot
177+
* files through the AbstractOcTree factory. You should also call
178+
* ensureLinking() once from the constructor.
176179
*/
177180
class StaticMemberInitializer{
178181
public:
179182
StaticMemberInitializer() {
180183
ColorOcTree* tree = new ColorOcTree(0.1);
181184
AbstractOcTree::registerTreeType(tree);
182185
}
186+
187+
/**
188+
* Dummy function to ensure that MSVC does not drop the
189+
* StaticMemberInitializer, causing this tree failing to register.
190+
* Needs to be called from the constructor of this octree.
191+
*/
192+
void ensureLinking() {};
183193
};
184194
/// static member to ensure static initialization (only once)
185195
static StaticMemberInitializer colorOcTreeMemberInit;

octomap/include/octomap/CountingOcTree.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace octomap {
8989

9090
public:
9191
/// Default constructor, sets resolution of leafs
92-
CountingOcTree(double resolution) : OcTreeBase<CountingOcTreeNode>(resolution) {};
92+
CountingOcTree(double resolution);
9393
virtual CountingOcTreeNode* updateNode(const point3d& value);
9494
CountingOcTreeNode* updateNode(const OcTreeKey& k);
9595
void getCentersMinHits(point3d_list& node_centers, unsigned int min_hits) const;
@@ -104,14 +104,24 @@ namespace octomap {
104104

105105
/**
106106
* Static member object which ensures that this OcTree's prototype
107-
* ends up in the classIDMapping only once
107+
* ends up in the classIDMapping only once. You need this as a
108+
* static member in any derived octree class in order to read .ot
109+
* files through the AbstractOcTree factory. You should also call
110+
* ensureLinking() once from the constructor.
108111
*/
109112
class StaticMemberInitializer{
110113
public:
111114
StaticMemberInitializer() {
112115
CountingOcTree* tree = new CountingOcTree(0.1);
113116
AbstractOcTree::registerTreeType(tree);
114117
}
118+
119+
/**
120+
* Dummy function to ensure that MSVC does not drop the
121+
* StaticMemberInitializer, causing this tree failing to register.
122+
* Needs to be called from the constructor of this octree.
123+
*/
124+
void ensureLinking() {};
115125
};
116126
/// static member to ensure static initialization (only once)
117127
static StaticMemberInitializer countingOcTreeMemberInit;

octomap/include/octomap/MapCollection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace octomap {
5656
bool isOccupied(const point3d& p) const;
5757
bool isOccupied(float x, float y, float z) const;
5858

59-
float getOccupancy(const point3d& p);
59+
double getOccupancy(const point3d& p);
6060

6161
bool castRay(const point3d& origin, const point3d& direction, point3d& end,
6262
bool ignoreUnknownCells=false, double maxRange=-1.0) const;

0 commit comments

Comments
 (0)