Skip to content

Commit

Permalink
Update for FW 2.4. See changelog for details (ouster-lidar#420)
Browse files Browse the repository at this point in the history
* Drop support for Ubuntu 16.04, ROS kinetic
* Drop support for sensors on FW < 2.0
* Require C++ 14 for build
* Use sensor http interface for sensors on FW 2.1+
* Switch from nodes to nodelets in ouster_ros
* Separate ROS launch files for play, replay, and record
* Add new experimental ROS config services set_config and get_config
* Bugfixes. See Changelog
  • Loading branch information
kairenw authored Aug 23, 2022
1 parent b9bc5c3 commit fa045e5
Show file tree
Hide file tree
Showing 129 changed files with 5,677 additions and 2,480 deletions.
2 changes: 2 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CompileFlags:
Add: -ferror-limit=0
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ python/.tox/
python/**/*.egg-info/
python/**/*.so
python/**/*.dll
python/**/*.pyd

# visual studio
.vs/
out/
45 changes: 44 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@
Changelog
=========

[20220826]
==========

* drop support for buliding C++ libraries and Python bindings on Ubuntu 16.04
* drop support for buliding C++ libraries and Python bindings on Mac 10.13, Mac 10.14
* Python 3.6 wheels are no longer built and published
* drop support for sensors running FW < 2.0
* require C++ 14 to build

ouster_client
--------------
* add ```CUSTOM0-9`` ChanFields to LidarScan object
* fix parsing measurement status from packets: previously, with some UDP profiles, higher order bits
could be randomly set
* add option for EIGEN_MAX_ALIGN_BYTES, ON by default
* use of sensor http interface for comms with sensors for FW 2.1+
* propogate C++ 17 usage requirement in cmake for C++ libraries built as C++17
* allow vcpkg configuration via environment variables

ouster_pcap
-----------
* fix incorrect encapsulation protocol being reported in ``packet_info``

ouster_viz
----------
* clean up GL context logic to avoid errors on window/intel UHD graphics

python
------
* windows extension modules are now statically linked to avoid potential issues with vendored dlls

ouster_ros
----------
* drop ROS kinetic support
* switch from nodes to nodelets
* update topic names, group under single ros namespace
* separate launch files for play, replay, and recording
* drop FW 1.13 compatibility for sensors and recorded bags
* remove setting of EIGEN_MAX_ALIGN_BYTES
* add two new ros services /ouster/get_config and /ouster/set_config (experimental)


[20220608]
==========

Expand All @@ -13,6 +55,7 @@ python
------
* single return parsing for FW 2.3.1 reflects change from ouster_client


[20220504]
==========

Expand Down Expand Up @@ -55,7 +98,7 @@ ouster_ros
fields are filled with zeroes

[20220107]
============
==========

* add support for arm64 macos and linux. Releases are now built and tested on these platforms
* add support for Python 3.10
Expand Down
94 changes: 52 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,58 @@
cmake_minimum_required(VERSION 3.1.0)
cmake_minimum_required(VERSION 3.10...3.22)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(DefaultBuildType)

# configure vcpkg from environment variables, if present
include(VcpkgEnv)

# ==== Project Name ====
project(ouster_example VERSION 20220608)
project(ouster_example VERSION 20220826)

# generate version header
set(OusterSDK_VERSION_STRING 0.5.0)
include(VersionGen)

# ==== Options ====
option(CMAKE_POSITION_INDEPENDENT_CODE "Build position independent code." ON)
option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
option(BUILD_PCAP "Build pcap utils." OFF)
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_PCAP "Build pcap utils." ON)
option(BUILD_VIZ "Build Ouster visualizer." ON)
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_EXAMPLES "Build C++ examples" OFF)
option(USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." ON)
option(OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." ON)

# when building as a top-level project and not as conan library
# when building as a top-level project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
if(NOT "${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT "${CMAKE_CXX_EXTENSIONS}")
if(NOT DEFINED CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()

if(MSVC)
add_compile_options(/W3)
add_compile_options(/W2)
add_compile_definitions(NOMINMAX _USE_MATH_DEFINES WIN32_LEAN_AND_MEAN)
else()
add_compile_options(-Wall -Wextra -Werror -Wno-error=deprecated-declarations)
add_compile_options(-Wall -Wextra)
endif()

include(CTest)
endif()

# === Subdirectories ===
add_subdirectory(ouster_client)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32)
message(STATUS "Ouster SDK client: Using EIGEN_MAX_ALIGN_BYTES = 32")
target_compile_definitions(ouster_client PUBLIC EIGEN_MAX_ALIGN_BYTES=32)
endif()

if(BUILD_PCAP OR BUILD_EXAMPLES)
if(BUILD_PCAP)
add_subdirectory(ouster_pcap)
endif()

Expand All @@ -51,36 +64,12 @@ if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(USE_EIGEN_MAX_ALIGN_BYTES_32)
message(STATUS "Ouster SDK client: Using EIGEN_MAX_ALIGN_BYTES = 32")
target_compile_definitions(ouster_client PUBLIC EIGEN_MAX_ALIGN_BYTES=32)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests)
endif()

# ==== Install ====
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
OusterSDKConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion)

install(EXPORT ouster-sdk-targets
FILE OusterSDKTargets.cmake
NAMESPACE OusterSDK::
DESTINATION lib/cmake/OusterSDK)

configure_file(cmake/OusterSDKConfig.cmake.in OusterSDKConfig.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfigVersion.cmake"
DESTINATION lib/cmake/OusterSDK)

install(FILES LICENSE LICENSE-bin
DESTINATION share)

# ==== Packaging ====
set(CPACK_PACKAGE_CONTACT "support@ouster.io")
set(CPACK_PACKAGE_CONTACT "oss@ouster.io")
set(CPACK_PACKAGE_VENDOR "Ouster")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ouster sensor SDK")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
Expand All @@ -98,7 +87,28 @@ set(CPACK_SOURCE_IGNORE_FILES /.git /dist)
# deb options
set(CPACK_DEBIAN_PACKAGE_NAME ouster-sdk)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "cmake, libjsoncpp-dev, libtclap-dev, libeigen3-dev,
libglfw3-dev, libglew-dev")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libjsoncpp-dev, libeigen3-dev, libtins-dev, libglfw3-dev, libglew-dev")

include(CPack)

# ==== Install ====
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
OusterSDKConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion)

install(EXPORT ouster-sdk-targets
FILE OusterSDKTargets.cmake
NAMESPACE OusterSDK::
DESTINATION lib/cmake/OusterSDK)

configure_file(cmake/OusterSDKConfig.cmake.in OusterSDKConfig.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfigVersion.cmake"
DESTINATION lib/cmake/OusterSDK)

install(FILES LICENSE
DESTINATION share/doc/${CPACK_DEBIAN_PACKAGE_NAME}
RENAME copyright)
72 changes: 36 additions & 36 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"configurations": [
"configurations": [
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
},
"name": "BUILD_EXAMPLES",
"value": "True",
"type": "BOOL"
}
]
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name": "x64-RelWithDebInfo",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
"name": "BUILD_EXAMPLES",
"value": "True",
"type": "BOOL"
}
]
}
]
}
]
}
92 changes: 63 additions & 29 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,29 +1,63 @@
BSD 3-Clause License

Copyright (c) 2018, Ouster, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: OusterSDK
Upstream-Contact: Ouster Sensor SDK Developers <[email protected]>
Source: https://github.com/ouster-lidar/ouster_example

Files: *
Copyright: 2018-2022 Ouster, Inc
License: BSD-3-Clause

Files: include/optional-lite/*
Copyright: 2014-2021 Martin Moene
License: BSL-1.0

License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License: BSL-1.0
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit fa045e5

Please sign in to comment.