Skip to content

Commit 7815f42

Browse files
authored
Release 0.12.0 (#600)
See CHANGELOG.rst for details!
1 parent 483206f commit 7815f42

File tree

206 files changed

+15141
-5757
lines changed

Some content is hidden

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

206 files changed

+15141
-5757
lines changed

CHANGELOG.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,84 @@
22
Changelog
33
=========
44

5+
[20240702] [0.12.0]
6+
===================
7+
8+
**Important: ouster-sdk installed from pypi now requires glibc >= 2.28.**
9+
10+
ouster_client/Python SDK
11+
------------------------
12+
13+
* Add support for adding custom fields to ``LidarScan`` s with ``add_field`` and ``del_field``
14+
* Added per-request timeout arguments to ``SensorHttp``
15+
* Added sensor user_data to ``sensor_info/SensorInfo`` and metadata files
16+
* Removed ``updated_metadata_string()`` and ``original_string()`` from ``sensor_info``
17+
* Added ``to_json_string()`` to ``sensor_info`` to convert a ``sensor_info`` to a non-legacy
18+
metadata JSON string
19+
* Unified Python and C++ ``Packet`` and ``PacketFormat`` classes
20+
* Added ``validate`` function to ``LidarPacket`` and ``ImuPacket`` to check for ID and size mismatches
21+
* [BREAKING] LidarScan's width and height have been switched to size_t from ptrdiff_t in C++
22+
* Refactor metadata parsing
23+
* Add ``get_version`` to ``sensor_info/SensorInfo`` to retrieve parsed version information
24+
* Add ``get_product_info`` to ``sensor_info/SensorInfo`` to retrieve parsed lidar model information
25+
* Raise an exception rather than throw an unrelated error when multiple viable metadata files are found for a given PCAP
26+
* Add ability to slice a scan source, returning a new sliced ScanSource
27+
28+
* [BREAKING] Removed ``hostname`` in Python ``SensorInfo`` and ``name`` from C++ ``sensor_info``
29+
* [BREAKING] Removed ``udp_port_lidar``, ``udp_port_imu`` and ``mode`` from C++ ``sensor_info``
30+
* [BREAKING] Deprecated ``udp_port_lidar``, ``udp_port_imu`` and ``mode`` in Python ``SensorInfo``.
31+
These fields now point to the equivalent fields inside of ``SensorInfo::config``.
32+
* [BREAKING] Removed ``cols`` and ``frequency`` from ``LidarMode`` in Python
33+
* [BREAKING] Deprecated ```data``` and ``capture_timestamp`` from Python ``Packet``
34+
* [BREAKING] Removed methods from Python ``ImuPacket`` and ``LidarPacket`` classes that simply wrapped ``PacketFormat``
35+
* [BREAKING] Removed ``begin()`` and ``end()`` iterators of ``LidarScan`` in C++
36+
* [BREAKING] Remove deprecated package stubs added in previous 0.11 release.
37+
* [BREAKING] Replaced integer backed ``ChanField`` enumerations with strings.
38+
* [BREAKING] Removed ``CUSTOM0`` through ``CUSTOM9`` ChanField enumerations.
39+
* [BREAKING] Extra fields in sensor metadata are now ignored and discarded if saved from the resulting ``sensor_info/SensorInfo``
40+
41+
* [BUGFIX] Prevent last scan from being emitted twice for PCAP
42+
* [BUGFIX] Fix corrupted packets due to poor handling of fragmented packet drop in PCAPs
43+
* [BUGFIX] Fix possible crash when working with custom UDPProfileLidars
44+
45+
ouster_viz
46+
----------
47+
* Support viewing custom ``LidarScan`` fields in viz
48+
* Support viewing custom ``LidarScan`` 3 channel fields in viz as RGB
49+
50+
* [BUGFIX] Prevent OpenBLAS from using high amounts of CPU spin waiting
51+
52+
ouster_osf
53+
----------
54+
55+
* Support saving custom ``LidarScan`` fields to OSF files
56+
57+
* [BREAKING] OsfWriter now takes in an optional list of fields to save rather than a list of fields and ChanFieldTypes to cast to
58+
59+
ouster-cli
60+
----------
61+
62+
* Added support for slicing using time to ``ouster-cli source ... slice``
63+
* Add sensor ``ouster-cli source ... userdata`` command to set and retrieve userdata on a sensor
64+
* Add chainable ``ouster-cli source ... stats`` command
65+
* Add chainable ``ouster-cli source ... clip`` command to discard points outside a provided range
66+
* Add ``--rate max`` option to ``ouster-cli source ... viz```
67+
* Improve argument naming and descriptions for ``ouster-cli source ... viz`` map and accum options
68+
69+
* [BUGFIX] Prevent dropped frames from live sensors by consuming scans as fast as they come in rather than sleeping
70+
71+
mapping
72+
-------
73+
74+
* Move mapping into the sdk as ``ouster.sdk.mapping``
75+
* Better handle looping while mapping
76+
* Improve automatic downsample voxel size calculation
77+
78+
other
79+
-----
80+
81+
* Updated VCPKG libraries to 2024.04.26
82+
583
[20240510] [0.11.1]
684
===================
785

@@ -15,6 +93,10 @@ Python SDK
1593

1694
* Updated the ``open_source`` documentation.
1795
* Fixed an issue that caused the viz to redraw when the mouse cursor is moved.
96+
* [BREAKING] The python slice ``[::]`` operator now returns a ``MultiScanSource`` / ``ScanSource``
97+
instead of a ``List``. Thus, invoking a ``scan_source[x:x+n]`` yields a fully functional scan source
98+
that is scoped to the range ``[x, x+n]``.
99+
* [BREAKING] The python slice ``[::]`` operator no longer support negative step
18100

19101
ouster_client
20102
-------------

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include(VcpkgEnv)
1616
project(ouster_example VERSION 20231031)
1717

1818
# generate version header
19-
set(OusterSDK_VERSION_STRING 0.11.1)
19+
set(OusterSDK_VERSION_STRING 0.12.0)
2020
include(VersionGen)
2121

2222
# ==== Options ====

cmake/FindCURL.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Define forwards-compatible imported target for old platforms (Ubuntu 18.04)
1+
# Define forwards-compatible imported target for old platforms
22
# Note: curl from VCPKG appears to completely ignore curl find modules despite
33
# CMAKE_MODULE_PATH settings
44

cmake/Findglfw3.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include(FindPackageHandleStandardArgs)
55

66
find_package(glfw3 CONFIG REQUIRED)
77

8-
# Package on >=18.04 sets a target
8+
# Package on >=20.04 sets a target
99
if(TARGET glfw)
1010
get_target_property(GLFW3_LIBRARIES glfw LOCATION)
1111
get_target_property(GLFW3_INCLUDE_DIRS glfw INTERFACE_INCLUDE_DIRECTORIES)

conanfile.py

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import os
22
import re
3-
from conans import ConanFile, CMake, tools
3+
from conan import ConanFile
4+
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
5+
from conan.tools.files import collect_libs, load
6+
from conan.tools.scm import Git
47

5-
from pprint import pformat
68

7-
8-
class OusterSDKConan(ConanFile):
9+
class ousterSdkRecipe(ConanFile):
910
name = "ouster_sdk"
11+
package_type = "library"
1012
license = "BSD 3-Clause License"
1113
author = "Ouster, Inc."
1214
url = "https://github.com/ouster-lidar/ouster_example"
@@ -33,7 +35,6 @@ class OusterSDKConan(ConanFile):
3335
"eigen_max_align_bytes": False,
3436
}
3537

36-
generators = "cmake_paths", "cmake_find_package"
3738
exports_sources = [
3839
"cmake/*",
3940
"conan/*",
@@ -49,27 +50,34 @@ class OusterSDKConan(ConanFile):
4950
"README.rst"
5051
]
5152

52-
# https://docs.conan.io/en/1.51/howtos/capture_version.html#how-to-capture-package-version-from-text-or-build-files
53+
# https://docs.conan.io/2/reference/conanfile/methods/set_version.html
5354
def set_version(self):
54-
content = tools.load(os.path.join(self.recipe_folder, "CMakeLists.txt"))
55-
version = re.search(r"set\(OusterSDK_VERSION_STRING (.*)\)", content).group(1)
55+
content = load(self, os.path.join(self.recipe_folder, "CMakeLists.txt"))
56+
version = re.search("set\(OusterSDK_VERSION_STRING (.*)\)", content).group(1)
5657
self.version = version.strip()
5758

5859
def config_options(self):
5960
if self.settings.os == "Windows":
60-
del self.options.fPIC
61+
self.options.rm_safe("fPIC")
62+
63+
def configure(self):
64+
if self.options.shared:
65+
self.options.rm_safe("fPIC")
6166

6267
def requirements(self):
63-
# not required directly here but because boost and openssl pulling
64-
# slightly different versions of zlib we need to set it
65-
# here explicitly
68+
# not required directly here but because boost and openssl pulling
69+
# slightly different versions of zlib we need to set it
70+
# here explicitly
6671
self.requires("zlib/1.3")
6772

68-
self.requires("eigen/3.4.0")
73+
# Since Eigen is a header only library, and the SDK includes Eigen
74+
# headers in its headers, we must set transitive_headers=True so that
75+
# packages consuming the SDK will also have access to the Eigen headers.
76+
self.requires("eigen/3.4.0", transitive_headers=True)
6977
self.requires("jsoncpp/1.9.5")
70-
self.requires("spdlog/1.11.0")
71-
self.requires("fmt/9.1.0")
72-
self.requires("libcurl/7.84.0")
78+
self.requires("spdlog/1.12.0")
79+
self.requires("fmt/9.1.0", override=True)
80+
self.requires("libcurl/7.86.0")
7381

7482
if self.options.build_pcap:
7583
self.requires("libtins/4.3")
@@ -86,41 +94,45 @@ def requirements(self):
8694
# maybe needed for cpp examples, but not for the lib
8795
# self.requires("tclap/1.2.4")
8896

89-
def configure_cmake(self):
90-
cmake = CMake(self)
91-
cmake.definitions["BUILD_VIZ"] = self.options.build_viz
92-
cmake.definitions["BUILD_PCAP"] = self.options.build_pcap
93-
cmake.definitions["BUILD_OSF"] = self.options.build_osf
94-
cmake.definitions["OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32"] = self.options.eigen_max_align_bytes
95-
# alt way, but we use CMAKE_TOOLCHAIN_FILE in other pipeline so avoid overwrite
96-
# cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = os.path.join(self.build_folder, "conan_paths.cmake")
97-
cmake.definitions[
98-
"CMAKE_PROJECT_ouster_example_INCLUDE"] = os.path.join(
99-
self.build_folder, "conan_paths.cmake")
100-
cmake.definitions["BUILD_SHARED_LIBS"] = True if self.options.shared else False
101-
cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = (
97+
def build_requirements(self):
98+
if self.options.build_osf:
99+
self.build_requires("flatbuffers/<host_version>")
100+
101+
def layout(self):
102+
cmake_layout(self)
103+
104+
def generate(self):
105+
deps = CMakeDeps(self)
106+
deps.generate()
107+
tc = CMakeToolchain(self)
108+
tc.variables["BUILD_VIZ"] = self.options.build_viz
109+
tc.variables["BUILD_PCAP"] = self.options.build_pcap
110+
tc.variables["BUILD_OSF"] = self.options.build_osf
111+
tc.variables[
112+
"OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32"
113+
] = self.options.eigen_max_align_bytes
114+
tc.variables["BUILD_SHARED_LIBS"] = True if self.options.shared else False
115+
tc.variables["CMAKE_POSITION_INDEPENDENT_CODE"] = (
102116
True if "fPIC" in self.options and self.options.fPIC else False
103117
)
104118

105119
# we use this option until we remove nonstd::optional from SDK codebase (soon)
106120
if self.options.ensure_cpp17:
107-
cmake.definitions["CMAKE_CXX_STANDARD"] = 17
121+
tc.variables["CMAKE_CXX_STANDARD"] = 17
108122

109-
self.output.info("Cmake definitions: ")
110-
self.output.info(pformat(cmake.definitions))
111-
cmake.configure()
112-
return cmake
123+
tc.generate()
113124

114125
def build(self):
115-
cmake = self.configure_cmake()
126+
cmake = CMake(self)
127+
cmake.configure()
116128
cmake.build()
117129

118130
def package(self):
119-
cmake = self.configure_cmake()
131+
cmake = CMake(self)
120132
cmake.install()
121133

122134
def package_info(self):
123-
self.cpp_info.libs = tools.collect_libs(self)
135+
self.cpp_info.libs = collect_libs(self)
124136
self.cpp_info.includedirs = [
125137
"include",
126138
"include/optional-lite"
@@ -129,8 +141,14 @@ def package_info(self):
129141
"lib/cmake/OusterSDK/OusterSDKConfig.cmake"
130142
)
131143

144+
self.cpp_info.set_property(
145+
"cmake_build_modules",
146+
[os.path.join("lib", "cmake", "OusterSDK", "OusterSDKConfig.cmake")],
147+
)
132148
self.cpp_info.set_property("cmake_file_name", "OusterSDK")
149+
self.cpp_info.set_property("cmake_target_name", "OusterSDK")
133150

151+
# TODO: to remove in conan v2 once cmake_find_package* generators removed
134152
self.cpp_info.filenames["cmake_find_package"] = "OusterSDK"
135153
self.cpp_info.filenames["cmake_find_package_multi"] = "OusterSDK"
136154
self.cpp_info.names["cmake_find_package"] = "OusterSDK"

docs/Doxyfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,9 @@ RECURSIVE = YES
934934
# Note that relative paths are relative to the directory from which doxygen is
935935
# run.
936936

937-
EXCLUDE = ../ouster_client/include/optional-lite
937+
EXCLUDE = ../ouster_client/include/optional-lite \
938+
../ouster_pcap/src/ip_reassembler.h \
939+
../ouster_pcap/src/ip_reassembler.cpp
938940

939941
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
940942
# directories that are symbolic links (a Unix file system feature) are excluded

docs/cli/clip-sessions.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Clip PointCloud in the Ouster-CLI
2+
=================================
3+
4+
.. _ouster-cli-clip:
5+
6+
7+
Clip Command
8+
------------
9+
10+
The clip command clips the lidar scan by the given range and streams down the modified lidar
11+
scan to the subsequent commands (like slam, viz, save, etc.). The position of the clip command
12+
in the ouster-cli command chain makes a difference as it only affects the commands that follow it.
13+
14+
To explore the parameters you can use with the clip command, you can use the --help flag:
15+
16+
.. code:: bash
17+
18+
ouster-cli source <SENSOR_HOSTNAME> / <FILENAME> clip --help
19+
20+
21+
Example Usage
22+
-------------
23+
24+
To keep the points within the 20 m to 50 m range and save the modified lidar scan into a PCAP file
25+
with the visualizer on, run the following command:
26+
27+
.. code:: bash
28+
29+
ouster-cli source <SENSOR_HOSTNAME> / <FILENAME> clip --min-range 20 --max-range 50 viz save clipped.pcap
30+
31+
32+
Remember, the clip command only affects the commands after it. In the following example, the
33+
viz command runs before the clip command, which means the point cloud modification won't be reflected
34+
in the visualizer but will affect the subsequent save command and the saved PCAP file:
35+
36+
.. code:: bash
37+
38+
ouster-cli source <SENSOR_HOSTNAME> / <FILENAME> viz clip --min-range 20 --max-range 50 save clipped_2.pcap
39+
40+
In addition to the ``min-range`` and ``max-range`` parameters, the ``clip`` command also includes the
41+
``percent-range`` parameter. This parameter discards points with ranges greater than a specified percentile
42+
in each lidar scan, helping to filter out noise points.
43+
44+
.. code:: bash
45+
46+
ouster-cli source <SENSOR_HOSTNAME> / <FILENAME> clip --percent-range 99 viz
47+
48+
Combined with SLAM Command
49+
--------------------------
50+
51+
The ``slam`` command also has ``min-range`` and ``max-range`` parameters. When the clip command is
52+
used after the ``slam`` command, the ``clip`` command will, by default, use the range settings specified
53+
in the slam command. However, you can explicitly pass in the range settings to the ``clip`` command to
54+
apply different ranges to the clip operation.
55+
56+
Note that the range settings in the ``slam`` command only affect the point cloud within the SLAM algorithm.
57+
The slam range settings will not modify the lidarscan and will not affect the other following commands.
58+
59+
60+
Example Usage
61+
-------------
62+
63+
Experiment with the following commands using a pre-recorded PCAP or OSF file:
64+
65+
.. code:: bash
66+
67+
ouster-cli source <FILENAME> slam clip --min-range 20 --max-range 50 viz save clipped_3.ply
68+
ouster-cli source <FILENAME> slam --min-range 10 --max-range 100 clip --min-range 20 --max-range 50 viz save clipped_4.ply
69+
70+
You can view the output PLY files using the open source software `CloudCompare`_
71+
For more details about the slam command, refer to the :ref:`SLAM Command <ouster-cli-mapping>`
72+
73+
74+
.. _CloudCompare: https://www.cloudcompare.org/

0 commit comments

Comments
 (0)