Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7811ac6
Do not use std::random_shuffle with C++11 or above
May 30, 2019
a13407d
Merge pull request #233 from jamiesnape/std-shuffle
ahornung Jun 21, 2019
c921775
Fix issue with byte typedef when compiling using C++17 (#240)
jcarpent Aug 15, 2019
a95100f
Update package.xml to remove catkin dependency (#263)
wxmerkt Nov 23, 2019
046920a
Version 1.9.1 release
ahornung Nov 23, 2019
4e1e818
fix unused-parameter warning (#267)
rhaschke Nov 28, 2019
b67b2c5
[octovis] Fix dependency list for ROS in package.xml (#269)
wxmerkt Nov 28, 2019
77cc263
Version 1.9.2 release
ahornung Nov 28, 2019
31af07e
Removed problematic INSTALL_NAME_DIR (#262)
Bo98 Dec 8, 2019
985cdbe
Fix -Wpedantic warnings (#275)
RoboticsYY Dec 26, 2019
bfc4580
Version 1.9.3 release
ahornung Dec 26, 2019
a330c3c
Support configurable libdir
jnumm Jan 21, 2020
ff95658
Support QGLViewer-qt5 and enable Qt5 by default
jnumm Jan 21, 2020
c860efd
Travis: upgrade to Qt5 and Ubuntu 18.04 Bionic
jnumm Jan 21, 2020
ce998c7
Add option OCTOVIS_QT5 in octovis/CMakeFiles.txt
jnumm Jan 21, 2020
8a5aa0c
Merge pull request #280 from jnumm/qt5-and-travis
ahornung Jan 22, 2020
b300d38
Merge pull request #279 from jnumm/install-dirs
ahornung Jan 24, 2020
a722c51
Bump CMake version to avoid CMP0048
sloretz Mar 11, 2020
ea58697
Merge pull request #284 from sloretz/sloretz/cmp0048
ahornung Mar 12, 2020
812fb98
Version 1.9.4 release
ahornung Mar 15, 2020
6c7fb60
[octovis] Update dependencies to Qt5
wxmerkt Mar 15, 2020
959f235
[octovis] Update required dependencies for Qt5
wxmerkt Mar 20, 2020
1955d4a
Merge pull request #286 from wxmerkt/wxm-fix-qt5-package-dependencies
ahornung Mar 23, 2020
2b4bdce
Version 1.9.5 release
ahornung Mar 25, 2020
ea9d707
fix ifstream >> byte with c++17
gleichdick Apr 17, 2020
74c48ae
Merge pull request #293 from gleichdick/devel
ahornung Apr 26, 2020
845e79f
octovis: use -fPIC with all compilers
timonegk May 21, 2020
cae814e
Merge pull request #296 from timonegk/position_independent_code
ahornung May 24, 2020
43bcc2c
adapted code to be compatible with libQGLViewer >= 2.7.0
expeditioneer Jun 9, 2020
24cd6aa
Merge pull request #297 from expeditioneer/qglviewer
ahornung Jun 10, 2020
f053e03
fix qmake command to build libQGLViewer with Qt5.
hfinger Jun 18, 2020
a3f3809
Merge pull request #298 from hfinger/devel
ahornung Jun 19, 2020
09a90a7
Merge remote-tracking branch 'origin/devel' into ros2
ruffsl Jul 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: cpp
sudo: required
dist: trusty
dist: bionic
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libqt4-dev libqt4-opengl-dev libqglviewer-dev
- sudo apt-get install -qq libqglviewer-dev-qt5
before_script:
script: ./scripts/travis_build_jobs.sh $VARIANT
env:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # enables -fPIC in applicable compilers

option(BUILD_OCTOVIS_SUBPROJECT "Build targets from subproject octovis" ON)
option(BUILD_DYNAMICETD3D_SUBPROJECT "Build targets from subproject dynamicEDT3D" ON)
option(OCTOVIS_QT5 "Link Octovis against Qt5?" NO)
option(OCTOVIS_QT5 "Link Octovis against Qt5?" ON)

if(OCTOVIS_QT5)
# Compiling against QT5 requires C++11.
Expand Down
17 changes: 9 additions & 8 deletions dynamicEDT3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(dynamicEDT3D)

include(CTest)
include(GNUInstallDirs)

# version (e.g. for packaging)
set(DYNAMICEDT3D_MAJOR_VERSION 1)
set(DYNAMICEDT3D_MINOR_VERSION 9)
set(DYNAMICEDT3D_PATCH_VERSION 0)
set(DYNAMICEDT3D_PATCH_VERSION 5)
set(DYNAMICEDT3D_VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION})
set(DYNAMICEDT3D_SOVERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION})

Expand Down Expand Up @@ -63,10 +64,10 @@ ADD_SUBDIRECTORY(src)


file(GLOB dynamicEDT3D_HDRS ${PROJECT_SOURCE_DIR}/include/dynamicEDT3D/*.h ${PROJECT_SOURCE_DIR}/include/dynamicEDT3D/*.hxx)
install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D)
install(FILES ${dynamicEDT3D_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dynamicEDT3D")

# Install catkin package.xml, attention package.xml names the catkin package "dynamic_edt_3d", so this is also the location where it needs to be installed to (and not "dynamicEDT3D")
install(FILES package.xml DESTINATION share/dynamic_edt_3d)
install(FILES package.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/dynamic_edt_3d")

#TODO: this conflicts with the octomap uninstall
#it is not only a target name problem, also both will use the same manifest file
Expand Down Expand Up @@ -106,7 +107,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(
dynamicEDT3DConfig.cmake.in
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DConfig.cmake"
PATH_VARS DYNAMICEDT3D_INCLUDE_DIRS DYNAMICEDT3D_LIB_DIR
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dynamicEDT3D)
INSTALL_DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/dynamicEDT3D")

WRITE_BASIC_PACKAGE_VERSION_FILE(
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DConfig-version.cmake"
Expand All @@ -120,8 +121,8 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(

# Create a dynamicEDT3DConfig.cmake file for the use from the install tree
# and install it
set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(DYNAMICEDT3D_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
#set(DYNAMICEDT3D_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake")

set(DYNAMICEDT3D_INCLUDE_TARGETS
Expand All @@ -131,7 +132,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(
dynamicEDT3DConfig.cmake.in
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake"
PATH_VARS DYNAMICEDT3D_INCLUDE_DIRS DYNAMICEDT3D_LIB_DIR
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dynamicEDT3D)
INSTALL_DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/dynamicEDT3D")

WRITE_BASIC_PACKAGE_VERSION_FILE(
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake"
Expand All @@ -141,7 +142,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(
install(FILES
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake"
"${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake"
DESTINATION share/dynamicEDT3D/)
DESTINATION "${CMAKE_INSTALL_DATADIR}/dynamicEDT3D")

# Write pkgconfig-file:
include(InstallPkgConfigFile)
Expand Down
12 changes: 6 additions & 6 deletions dynamicEDT3D/CMakeModules/InstallPkgConfigFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# [LIBS <lflag> ...]
# [REQUIRES <required-package-name> ...])
#
# Create and install a pkg-config .pc file to CMAKE_INSTALL_PREFIX/lib/pkgconfig
# Create and install a pkg-config .pc file to CMAKE_INSTALL_LIBDIR/pkgconfig
# assuming the following install layout:
# libraries: CMAKE_INSTALL_PREFIX/lib
# headers : CMAKE_INSTALL_PREFIX/include
# libraries: CMAKE_INSTALL_LIBDIR
# headers : CMAKE_INSTALL_INCLUDEDIR
#
# example:
# add_library(mylib mylib.c)
Expand Down Expand Up @@ -63,8 +63,8 @@ function(install_pkg_config_file)
# write the .pc file out
file(WRITE ${pc_fname}
"prefix=${CMAKE_INSTALL_PREFIX}\n"
"libdir=\${prefix}/lib\n"
"includedir=\${prefix}/include\n"
"libdir=${CMAKE_INSTALL_FULL_LIBDIR}\n"
"includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}\n"
"\n"
"Name: ${pc_name}\n"
"Description: ${pc_description}\n"
Expand All @@ -74,5 +74,5 @@ function(install_pkg_config_file)
"Cflags: -I\${includedir} ${pc_cflags}\n")

# mark the .pc file for installation to the lib/pkgconfig directory
install(FILES ${pc_fname} DESTINATION lib/pkgconfig)
install(FILES ${pc_fname} DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endfunction(install_pkg_config_file)
3 changes: 2 additions & 1 deletion dynamicEDT3D/package.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<package format="3">
<name>dynamic_edt_3d</name>
<version>1.9.0</version>
<version>1.9.5</version>
<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>

<author email="sprunkc@informatik.uni-freiburg.de">Christoph Sprunk</author>
<maintainer email="sprunkc@informatik.uni-freiburg.de">Christoph Sprunk</maintainer>
<maintainer email="w.merkt+oss@gmail.com">Wolfgang Merkt</maintainer>
<license>BSD</license>

<url type="website">http://octomap.github.io</url>
Expand Down
4 changes: 2 additions & 2 deletions dynamicEDT3D/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ADD_SUBDIRECTORY(examples)

install(TARGETS dynamicedt3d dynamicedt3d-static
EXPORT dynamicEDT3DTargets
INCLUDES DESTINATION include
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
${INSTALL_TARGETS_DEFAULT_ARGS}
)
install(EXPORT dynamicEDT3DTargets DESTINATION share/dynamicEDT3D/)
install(EXPORT dynamicEDT3DTargets DESTINATION "${CMAKE_INSTALL_DATADIR}/dynamicEDT3D")
23 changes: 23 additions & 0 deletions octomap/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
v1.9.5: 2020-03-25
==================
- octovis: Update ROS dependencies to Qt5

v1.9.4: 2020-03-15
==================
- octovis: Enable Qt5 by default
- Support added for configurable libdir for packaging
- Increased minimum CMake version to 3.0.2

v1.9.3: 2019-12-26
==================
- Fixed Wpedantic warnings
- Removed problematic INSTALL_NAME_DIR (maxOS workaround)

v1.9.2: 2019-11-28
==================
- Fixed ROS buildfarm failures for octovis

v1.9.1: 2019-11-23
==================
- Improved compatibility with modern compilers and ROS2

v1.9.0: 2017-04-28
==================
- Fixed getUnknownLeafCenters to return true leaf centers (thx to A. Ecins)
Expand Down
25 changes: 13 additions & 12 deletions octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT( octomap )

include(CTest)
include(GNUInstallDirs)

# version (e.g. for packaging)
set(OCTOMAP_MAJOR_VERSION 1)
set(OCTOMAP_MINOR_VERSION 9)
set(OCTOMAP_PATCH_VERSION 0)
set(OCTOMAP_PATCH_VERSION 5)
set(OCTOMAP_VERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION}.${OCTOMAP_PATCH_VERSION})
set(OCTOMAP_SOVERSION ${OCTOMAP_MAJOR_VERSION}.${OCTOMAP_MINOR_VERSION})
if(COMMAND cmake_policy)
Expand Down Expand Up @@ -55,21 +56,21 @@ LINK_DIRECTORIES(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Installation

set(INSTALL_TARGETS_DEFAULT_ARGS
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)

ADD_SUBDIRECTORY( src/math )
ADD_SUBDIRECTORY( src )

file(GLOB octomap_HDRS ${PROJECT_SOURCE_DIR}/include/octomap/*.h ${PROJECT_SOURCE_DIR}/include/octomap/*.hxx)
install(FILES ${octomap_HDRS} DESTINATION include/octomap)
install(FILES ${octomap_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/octomap")
file(GLOB octomap_math_HDRS ${PROJECT_SOURCE_DIR}/include/octomap/math/*.h)
install(FILES ${octomap_math_HDRS} DESTINATION include/octomap/math)
install(FILES ${octomap_math_HDRS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/octomap/math")

# Install catkin package.xml
install(FILES package.xml DESTINATION share/octomap)
install(FILES package.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap")

# uninstall target
configure_file(
Expand Down Expand Up @@ -113,7 +114,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(
octomap-config.cmake.in
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config.cmake"
PATH_VARS OCTOMAP_INCLUDE_DIRS OCTOMAP_LIB_DIR
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/octomap)
INSTALL_DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/octomap")

WRITE_BASIC_PACKAGE_VERSION_FILE(
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-config-version.cmake"
Expand All @@ -122,8 +123,8 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(

# Create a octomap-config.cmake file for the use from the install tree
# and install it
set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
set(OCTOMAP_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(OCTOMAP_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
#set(OCTOMAP_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake")

set(OCTOMAP_INCLUDE_TARGETS
Expand All @@ -133,7 +134,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(
octomap-config.cmake.in
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake"
PATH_VARS OCTOMAP_INCLUDE_DIRS OCTOMAP_LIB_DIR
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/share/octomap)
INSTALL_DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/octomap")

WRITE_BASIC_PACKAGE_VERSION_FILE(
${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake
Expand All @@ -143,7 +144,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(
install(FILES
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake"
"${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake"
DESTINATION share/octomap/)
DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap")

# Write pkgconfig-file:
include(InstallPkgConfigFile)
Expand Down
12 changes: 6 additions & 6 deletions octomap/CMakeModules/InstallPkgConfigFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# [LIBS <lflag> ...]
# [REQUIRES <required-package-name> ...])
#
# Create and install a pkg-config .pc file to CMAKE_INSTALL_PREFIX/lib/pkgconfig
# Create and install a pkg-config .pc file to CMAKE_INSTALL_LIBDIR/pkgconfig
# assuming the following install layout:
# libraries: CMAKE_INSTALL_PREFIX/lib
# headers : CMAKE_INSTALL_PREFIX/include
# libraries: CMAKE_INSTALL_LIBDIR
# headers : CMAKE_INSTALL_INCLUDEDIR
#
# example:
# add_library(mylib mylib.c)
Expand Down Expand Up @@ -63,8 +63,8 @@ function(install_pkg_config_file)
# write the .pc file out
file(WRITE ${pc_fname}
"prefix=${CMAKE_INSTALL_PREFIX}\n"
"libdir=\${prefix}/lib\n"
"includedir=\${prefix}/include\n"
"libdir=${CMAKE_INSTALL_FULL_LIBDIR}\n"
"includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}\n"
"\n"
"Name: ${pc_name}\n"
"Description: ${pc_description}\n"
Expand All @@ -74,5 +74,5 @@ function(install_pkg_config_file)
"Cflags: -I\${includedir} ${pc_cflags}\n")

# mark the .pc file for installation to the lib/pkgconfig directory
install(FILES ${pc_fname} DESTINATION lib/pkgconfig)
install(FILES ${pc_fname} DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endfunction(install_pkg_config_file)
2 changes: 1 addition & 1 deletion octomap/include/octomap/AbstractOccupancyOcTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ namespace octomap {
static const std::string binaryFileHeader;
};

}; // end namespace
} // end namespace


#endif
2 changes: 1 addition & 1 deletion octomap/include/octomap/OcTreeKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <tr1/unordered_map>
namespace octomap {
namespace unordered_ns = std::tr1;
};
}
#else
#include <unordered_set>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion octomap/include/octomap/OccupancyOcTreeBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace octomap {


template <class NODE>
void OccupancyOcTreeBase<NODE>::insertPointCloudRays(const Pointcloud& pc, const point3d& origin, double maxrange, bool lazy_eval) {
void OccupancyOcTreeBase<NODE>::insertPointCloudRays(const Pointcloud& pc, const point3d& origin, double /* maxrange */, bool lazy_eval) {
if (pc.size() < 1)
return;

Expand Down
3 changes: 2 additions & 1 deletion octomap/package.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<package format="3">
<name>octomap</name>
<version>1.9.0</version>
<version>1.9.5</version>
<description>The OctoMap library implements a 3D occupancy grid mapping approach, providing data structures and mapping algorithms in C++. The map implementation is based on an octree. See
http://octomap.github.io for details.</description>

<author email="wurm@informatik.uni-freiburg.de">Kai M. Wurm</author>
<author email="armin@hornung.io">Armin Hornung</author>
<maintainer email="armin@hornung.io">Armin Hornung</maintainer>
<maintainer email="w.merkt+oss@gmail.com">Wolfgang Merkt</maintainer>
<license>BSD</license>

<url type="website">http://octomap.github.io</url>
Expand Down
4 changes: 2 additions & 2 deletions octomap/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ TARGET_LINK_LIBRARIES(octree2pointcloud octomap)

install(TARGETS octomap octomap-static
EXPORT octomap-targets
INCLUDES DESTINATION include
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
${INSTALL_TARGETS_DEFAULT_ARGS}
)
install(EXPORT octomap-targets DESTINATION share/octomap/)
install(EXPORT octomap-targets DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap")

install(TARGETS
graph2tree
Expand Down
11 changes: 10 additions & 1 deletion octomap/src/Pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@

#if defined(_MSC_VER) || defined(_LIBCPP_VERSION)
#include <algorithm>
#if __cplusplus > 199711L
#include <random>
#endif
#else
#include <ext/algorithm>
#endif
Expand Down Expand Up @@ -210,7 +213,13 @@ namespace octomap {
#if defined(_MSC_VER) || defined(_LIBCPP_VERSION)
samples.reserve(this->size());
samples.insert(samples.end(), this->begin(), this->end());
std::random_shuffle(samples.begin(), samples.end());
#if __cplusplus > 199711L
std::random_device r;
std::mt19937 urbg(r());
std::shuffle(samples.begin(), samples.end(), urbg);
#else
std::random_shuffle(samples.begin(), samples.end());
#endif
samples.resize(num_samples);
#else
random_sample_n(begin(), end(), std::back_insert_iterator<point3d_collection>(samples), num_samples);
Expand Down
8 changes: 5 additions & 3 deletions octomap/src/binvox2bt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
using namespace std;
using namespace octomap;

typedef unsigned char byte;
namespace octomap {
typedef unsigned char byte;
}

int main(int argc, char **argv)
{
Expand Down Expand Up @@ -227,8 +229,8 @@ int main(int argc, char **argv)
cout.flush();

// read voxel data
byte value;
byte count;
octomap::byte value;
octomap::byte count;
int index = 0;
int end_index = 0;
unsigned nr_voxels = 0;
Expand Down
1 change: 0 additions & 1 deletion octomap/src/edit_octree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
using namespace std;
using namespace octomap;

typedef unsigned char byte;

int main(int argc, char **argv)
{
Expand Down
Loading