Skip to content

Commit

Permalink
Release 0.14.0 (#640)
Browse files Browse the repository at this point in the history
See CHANGELOG.rst for details!
  • Loading branch information
akatumalla-ouster authored Jan 17, 2025
1 parent 4591582 commit 69248b4
Show file tree
Hide file tree
Showing 367 changed files with 61,096 additions and 5,056 deletions.
59 changes: 59 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Checks: '*,
-llvmlibc-*, -altera-*, -fuchsia-*,
-modernize-use-trailing-return-type,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-readability-magic-numbers,
-misc-const-correctness,
-llvm-header-guard,
-hicpp-uppercase-literal-suffix,
-readability-uppercase-literal-suffix,
-readability-else-after-return,
-llvm-else-after-return,
-bugprone-easily-swappable-parameters,
-google-readability-todo,
-abseil-*,
-android-cloexec-open'
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-length.IgnoredVariableNames
value: 'i|j|k|w|h|x|y|z|it'
- key: readability-identifier-length.IgnoredLoopCounterNames
value: 'i|j|k|w|h|x|y|z|it'
- key: readability-identifier-length.IgnoredParameterNames
value: 'w|h|x|y|z'
- key: performance-unnecessary-value-param.AllowedTypes
value: 'Eigen::Ref|sync_ptr'
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.ProtectedMemberSuffix
value: _
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.ClassMethodCase
value: lower_case
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.FunctionCase
value: lower_case
18 changes: 9 additions & 9 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format
run: sudo apt install build-essential cmake libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libpng-dev libglfw3-dev libflatbuffers-dev libgtest-dev clang-format
- name: cpp-lint
run: ./clang-linting.sh
- name: install python
Expand All @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format
run: sudo apt install build-essential cmake libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libpng-dev libglfw3-dev libflatbuffers-dev libgtest-dev clang-format
- name: cmake configure
run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON
- name: cmake build
Expand All @@ -38,7 +38,7 @@ jobs:
- name: install python
run: sudo apt install python3 python3-pip
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev
run: sudo apt install build-essential cmake libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libpng-dev libglfw3-dev libflatbuffers-dev
- name: install python-deps
run: pip3 install pytest pytest-xdist
- name: build python
Expand All @@ -53,9 +53,9 @@ jobs:
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: jsoncpp eigen3 curl libtins glfw3 glew spdlog libpng flatbuffers gtest
pkgs: eigen3 curl libtins glfw3 libpng flatbuffers gtest
triplet: x64-windows
revision: 2024.04.26
revision: 2024.11.16
token: ${{ github.token }}
github-binarycache: true
- name: cmake configure
Expand All @@ -74,9 +74,9 @@ jobs:
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: jsoncpp eigen3 curl libtins glfw3 glew spdlog libpng flatbuffers gtest
pkgs: eigen3 curl libtins glfw3 libpng flatbuffers gtest
triplet: x64-windows
revision: 2024.04.26
revision: 2024.11.16
token: ${{ github.token }}
github-binarycache: true
- name: install python-deps
Expand All @@ -92,7 +92,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: install deps
run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers googletest
run: brew install cmake pkg-config eigen curl libtins glfw flatbuffers googletest
- name: cmake configure
run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON
- name: cmake build
Expand All @@ -104,7 +104,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: install deps
run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers
run: brew install cmake pkg-config eigen curl libtins glfw flatbuffers
- name: install python-deps
run: python3.12 -m pip install pytest pytest-xdist --break-system-packages
- name: build python
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ CTestTestfile.cmake
generated
rules.ninja
*.a
**/_build
**/_build
clang-tidy-output.{txt,json}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "sdk-extensions"]
path = sdk-extensions
url = ../sdk-extensions.git
branch = master
branch = master
79 changes: 74 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,77 @@
Changelog
=========

**Important: as of 0.13.0, the SDK is no longer compatible with firmware versions older than 2.1.0.**
Important announcements
-----------------------
* As of 0.13.0, the SDK is no longer compatible with firmware versions older than 2.1.0.
* Official SDK support for firmware versions 2.2 and 2.3 will end at the end of June, 2025.
* Update vcpkg ref of build to 2024.11.16

[20250117] [0.14.0]
======================

ouster_client/C++ SDK
---------------------

* Jsoncpp fully removed for jsoncons
* [BREAKING] All the HTTP endpoint methods in the ``SensorHttpImp`` class now return a ``std::string`` instead of a ``Json::Value`` object. The result can be parsed with any json parser.
* Add CMake logic for packaging c++ sdk in binary format when ``-DBUILD_SHARED_LIBRARY=ON`` is enabled.

ouster_client/Python SDK
------------------------
* Add a new command ``localize`` to perform localization and tracking within a SLAM-generated map of a given site.
* Add ``LidarScan.sensor_info`` to store the relevant ``SensorInfo`` for each scan
* [BREAKING] Deprecated ``ScanBatcher::operator()(const uint8_t*, uint64_t, LidarScan&)`` for ``ScanBatcher::operator()(const LidarPacket&, LidarScan&)``
* [BREAKING] Disabled ``OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32`` by default to help avoid ABI mismatches
* [BREAKING] Changed ``SensorClient`` ``get_packet`` API to return packet in the ``ClientEvent`` rather than through reference parameters
* Updated to Kiss ICP 1.1.0 version
* [BUGFIX] Fixed OSF failing to load scans saved in 4096 * 5 mode
* [BUGFIX] Fixed Python ``client.transform`` and ``client.dewarp`` methods returning incorrect results due to ignoring column layout of input data
* Refactored logging to remove spdlog API exposure
* Vendored spdlog in third party dependencies
* [BREAKING] Change ``sensor_info.sn`` type from string to uint64_t
* Support additional array types and formats for Cloud.set_xyz
* Added new ``mask``, ``reduce`` and ``clip`` ScanSource operations to the SDK CLI and API
* The ``clip`` command can now specify which fields to be applied to and accepts unit
* Add relevant methods from ``packet_format`` to ``LidarPacket`` and ``ImuPacket`` classes
* Add ``format`` to each ``Packet`` object with the relevant packet format
* Tolerate off-by-1-byte for bag files recorded using an older version of the ouster-ros driver
* Fix yaw axis to zero in the get_rot_matrix_to_align_to_gravity function
* [BUGFIX] Fix the ``-c`` option in ouster-cli ``config`` command to set config from file

ouster_cli
----------
* Add ``ouster-cli source SENSOR set_static_ip`` command to set sensor static IPs.
* Add ``ouster-cli source SENSOR diagnostics`` command to download sensor diagnostic dumps.
* [BREAKING] Merge the handling of ``--extrinsics-file`` ouster-cli option into ``--extrinsics`` option.
* [BREAKING] ouster-cli ``--extrinsics`` option requires adding double quotes for space separated values.
* ouster-cli ``--extrinsics`` option now accepts ``identity`` as a keyword for overrideng sensor extriniscs with identity.
* ouster-cli ``--extrinsics`` option now accepts the following additional formats besides the ``16`` numbers array format:
* ``--extrinsics X,Y,Z,R,PY`` for position + euler angles.
* ``--extrinsics X,Y,Z,QX,QY,QZ,QW`` for position + quaternion.
* Add cursor-driven AOI selection feature to 2d images in ouster-cli ``viz`` command.

ouster_osf
----------
* Introduce ``ouster::osf::AsyncWriter`` to offload saving ``LidarScan`` as OSF to a background thread, improving CLI performance when saving OSF files.
* Add the ``ouster::osf::Encoder`` type, which allows parameterizing the OSF compression level.
* Change the default OSF PNG encoder compression level to 1 from 4.
* [BREAKING] ``ouster.sdk.osf`` no longer exports lower-level OSF API classes (such as ``osf.Reader``.)
* ``ouster::osf::Writer::save`` now throws if the resolution of a ``LidarScan`` being saved doesn't match what is specified in sensor info/metadata.
* [BUGFIX] Fix incorrect ``OsfScanSource`` data when reading from an OSF file containing empty or missing streams.

ouster_viz
----------
* ``SimpleViz`` now drops frames when necessary to keep up with a live data source (i.e. sensor.)
* Add a map origin axis and label.
* Invoke frame buffer resize handlers added to ``PointViz`` when GLFW's window resize event fires.
* [BREAKING] Change ``PointViz::window_coordinates_to_image_pixel`` so that it always returns a pixel location (even outside the image), which can be useful in some situations.
* [BUGFIX] On screen display frame number starts at zero instead of one.
* [BUGFIX] ``LidarScanViz`` now only creates view modes for PIXEL fields.
* [BUGFIX] Use the last valid column pose as a ``LidarScan``'s origin, instead of the first.
* [BUGFIX] Limit number of keyboard shortcuts to toggle sensors from CTRL+1 to CTRL+9.
* [BUGFIX] Fix a key shortcut help rendering issue and improve consistency of key shortcut help.


[20241017] [0.13.1]
======================
Expand Down Expand Up @@ -101,7 +171,7 @@ ouster_viz
* [BREAKING] removed ``bool update_on_input()`` and ``update_on_input(bool)`` methods from ``PointViz``.
* [BUGFIX] SimpleViz throws a 'generator already executing' exception.

ouster_cli
ouster-cli
----------

* Add support for reading and writing ROS1 and ROS2 bag files.
Expand Down Expand Up @@ -449,9 +519,7 @@ ouster_client
-------------

* Add ``LidarScan.pose`` with poses per column
* Add ``_client.IndexedPcapReader`` and ``_client.PcapIndex`` to enable random
pcap file access by frame number

* Add ``_client.IndexedPcapReader`` and ``_client.PcapIndex`` to enable random pcap file access by frame number
* [BREAKING] remove ``ouster::Imu`` object
* [BREAKING] change the return type of ``ouster::packet_format::frame_id`` from ``uint16_t`` to ``uint32_t``
* [BREAKING] remove methods ``px_range``, ``px_reflectivity``, ``px_signal``, and ``px_ambient`` from ``ouster::packet_format``
Expand Down Expand Up @@ -1073,3 +1141,4 @@ Fixed
- fixed clipping issues with parallel projection
- fixed point coloring issues in z-color mode
- improved visualizer performance

74 changes: 54 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,28 @@ include(DefaultBuildType)
include(VcpkgEnv)

# ==== Project Name ====
project(ouster-sdk VERSION 0.13.1)
project(ouster-sdk VERSION 0.14.0)

# generate version header
set(OusterSDK_VERSION_STRING 0.13.1)
set(OusterSDK_VERSION_STRING 0.14.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." ON)
option(BUILD_OSF "Build Ouster OSF library." ON)
option(BUILD_VIZ "Build Ouster visualizer." ON)
option(BUILD_PYTHON_MODULE "Build python module (should not use this except in special instances)." OFF)
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_EXAMPLES "Build C++ examples" OFF)
option(OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." ON)
option(OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." OFF)
option(BUILD_SHARED_LIBRARY "Build shared Library." OFF)
option(BUILD_DEBIAN_FOR_GITHUB "Build debian for github ci" OFF)

# when building as a top-level project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(OUSTER_TOP_LEVEL ON)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -43,13 +45,15 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
endif()

if(MSVC)
add_compile_options(/W2)
add_compile_options(/W2 /bigobj /Zf)
add_compile_definitions(NOMINMAX _USE_MATH_DEFINES WIN32_LEAN_AND_MEAN)
else()
add_compile_options(-Wall -Wextra)
endif()

include(CTest)
else()
set(OUSTER_TOP_LEVEL OFF)
endif()

# === Subdirectories ===
Expand All @@ -69,16 +73,26 @@ endif()

if(BUILD_VIZ)
add_subdirectory(ouster_viz)
add_subdirectory(thirdparty/glad)
endif()

if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(BUILD_SHARED_LIBRARY)
add_subdirectory(ouster_library)
endif()

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests)
endif()

if(BUILD_PYTHON_MODULE)
set(OUSTER_SDK_PATH "${CMAKE_CURRENT_LIST_DIR}" CACHE STRING "SDK source directory")
add_subdirectory(python)
endif()

# ==== Packaging ====
set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_PACKAGE_VENDOR "Ouster")
Expand All @@ -88,18 +102,30 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.rst")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ouster")
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_PACKAGE_NAME ouster_sdk)
set(CPACK_GENERATOR "DEB;TGZ")

if(BUILD_DEBIAN_FOR_GITHUB)
set(CPACK_DEBIAN_PACKAGE_NAME ouster-sdk)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libeigen3-dev, libtins-dev, libglfw3-dev, libpng-dev, libflatbuffers-dev")
endif()

if(OUSTER_LIBRARY_NAME)
set(CPACK_PACKAGE_NAME "${OUSTER_LIBRARY_NAME}")
else()
set(CPACK_PACKAGE_NAME "ouster-sdk")
endif()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CMAKE_BUILD_TYPE}-${CPACK_PACKAGE_VERSION}-${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")

set(CPACK_GENERATOR "TGZ;ZIP")
if(BUILD_DEBIAN_FOR_GITHUB)
set(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}")
endif()

# source packages
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
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
"libjsoncpp-dev, libeigen3-dev, libtins-dev, libglfw3-dev, libglew-dev, libspdlog-dev, libpng-dev, libflatbuffers-dev")
include(CPack)

# ==== Install ====
Expand All @@ -117,14 +143,22 @@ install(EXPORT ouster-sdk-targets
configure_file(cmake/OusterSDKConfig.cmake.in OusterSDKConfig.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfigVersion.cmake"
"cmake/Coverage.cmake"
"cmake/VcpkgEnv.cmake"
DESTINATION lib/cmake/OusterSDK)
if(BUILD_PCAP)
# Install the findpcap cmake file for install targets.
# For some reason it only works if you rename it to PcapConfig.cmake
install(FILES "cmake/FindPcap.cmake"
DESTINATION lib/cmake/OusterSDK
RENAME PcapConfig.cmake)
endif()
install(FILES "cmake/FindEigen3.cmake"
DESTINATION lib/cmake/OusterSDK)
install(FILES "cmake/Findlibtins.cmake"
DESTINATION lib/cmake/OusterSDK)
install(FILES "cmake/FindCURL.cmake"
DESTINATION lib/cmake/OusterSDK)
install(FILES "cmake/Findglfw3.cmake"
DESTINATION lib/cmake/OusterSDK)
install(FILES "cmake/FindPcap.cmake"
DESTINATION lib/cmake/OusterSDK)
install(FILES "cmake/FindFlatbuffers.cmake"
DESTINATION lib/cmake/OusterSDK)


install(FILES LICENSE LICENSE-bin
DESTINATION share)
Loading

0 comments on commit 69248b4

Please sign in to comment.