├── .gitignore ├── CHANGES.md ├── CMakeLists.txt ├── LICENSE ├── README.md ├── VERSION ├── bin ├── linux-aarch64 │ └── CeptonViewer ├── linux-i386 │ └── CeptonViewer ├── linux-x86_64 │ ├── CeptonViewer │ └── cepton_device_config ├── osx │ └── CeptonViewer.app │ │ └── Contents │ │ ├── Info.plist │ │ ├── MacOS │ │ └── CeptonViewer │ │ ├── Resources │ │ └── CeptonViewer.icns │ │ └── _CodeSignature │ │ └── CodeResources └── win64 │ ├── CeptonViewer.exe │ ├── cepton_sdk.dll │ ├── cepton_sdk.imp.lib │ ├── concrt140.dll │ ├── msvcp140.dll │ ├── msvcp140_1.dll │ ├── msvcp140_2.dll │ ├── msvcp140_codecvt_ids.dll │ ├── vccorlib140.dll │ ├── vcruntime140.dll │ └── vcruntime140_1.dll ├── cmake ├── CeptonCommon.cmake ├── CeptonVersion.cmake └── subdirectory │ └── CMakeLists.txt ├── csharp ├── LICENSE ├── VERSION ├── cepton_cs_sample │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── cepton_cs_sample.csproj ├── cepton_cs_sdk │ ├── AsyncQueue.cs │ ├── CaptureReplay.cs │ ├── CeptonSDK.cs │ ├── CeptonSDKException.cs │ ├── FrameCache.cs │ ├── Sensor.cs │ ├── cepton_cs_sdk.csproj │ └── cepton_sdk.dll └── cepton_sdk_csharp.sln ├── docs ├── .buildinfo ├── .nojekyll ├── _sources │ ├── building.rst.txt │ ├── c++.rst.txt │ ├── capture_replay.rst.txt │ ├── cepton_export.md.txt │ ├── cepton_player.md.txt │ ├── cepton_viewer.md.txt │ ├── errors.rst.txt │ ├── index.rst.txt │ ├── internal.rst.txt │ ├── legal.md.txt │ ├── networking.rst.txt │ ├── overview.rst.txt │ ├── points.rst.txt │ ├── samples.rst.txt │ ├── samples │ │ ├── basic.rst.txt │ │ ├── c_basic.rst.txt │ │ ├── callback.rst.txt │ │ ├── cmake.rst.txt │ │ ├── error.rst.txt │ │ ├── frame_accumulator.rst.txt │ │ ├── frame_detector.rst.txt │ │ ├── network.rst.txt │ │ ├── organize_points.rst.txt │ │ ├── process_multi.rst.txt │ │ ├── process_single.rst.txt │ │ └── replay.rst.txt │ ├── sensors.rst.txt │ ├── serial.rst.txt │ ├── setup.rst.txt │ └── utilities.rst.txt ├── _static │ ├── basic.css │ ├── css │ │ ├── badge_only.css │ │ ├── fonts │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── lato-bold-italic.woff │ │ │ ├── lato-bold-italic.woff2 │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-normal-italic.woff │ │ │ ├── lato-normal-italic.woff2 │ │ │ ├── lato-normal.woff │ │ │ └── lato-normal.woff2 │ │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── Lato │ │ │ ├── lato-bold.eot │ │ │ ├── lato-bold.ttf │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-bolditalic.eot │ │ │ ├── lato-bolditalic.ttf │ │ │ ├── lato-bolditalic.woff │ │ │ ├── lato-bolditalic.woff2 │ │ │ ├── lato-italic.eot │ │ │ ├── lato-italic.ttf │ │ │ ├── lato-italic.woff │ │ │ ├── lato-italic.woff2 │ │ │ ├── lato-regular.eot │ │ │ ├── lato-regular.ttf │ │ │ ├── lato-regular.woff │ │ │ └── lato-regular.woff2 │ │ ├── Roboto-Slab-Bold.woff │ │ ├── Roboto-Slab-Bold.woff2 │ │ ├── Roboto-Slab-Light.woff │ │ ├── Roboto-Slab-Light.woff2 │ │ ├── Roboto-Slab-Regular.woff │ │ ├── Roboto-Slab-Regular.woff2 │ │ ├── Roboto-Slab-Thin.woff │ │ ├── Roboto-Slab-Thin.woff2 │ │ ├── RobotoSlab │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ └── roboto-slab-v7-regular.woff2 │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── lato-bold-italic.woff │ │ ├── lato-bold-italic.woff2 │ │ ├── lato-bold.woff │ │ ├── lato-bold.woff2 │ │ ├── lato-normal-italic.woff │ │ ├── lato-normal-italic.woff2 │ │ ├── lato-normal.woff │ │ └── lato-normal.woff2 │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ ├── badge_only.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ ├── modernizr.min.js │ │ └── theme.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.3.1.js │ └── underscore.js ├── building.html ├── c++.html ├── capture_replay.html ├── cepton_export.html ├── cepton_player.html ├── cepton_sdk.pdf ├── cepton_viewer.html ├── errors.html ├── genindex.html ├── index.html ├── internal.html ├── legal.html ├── networking.html ├── objects.inv ├── overview.html ├── points.html ├── samples.html ├── samples │ ├── basic.html │ ├── c_basic.html │ ├── callback.html │ ├── cmake.html │ ├── error.html │ ├── frame_accumulator.html │ ├── frame_detector.html │ ├── network.html │ ├── organize_points.html │ ├── process_multi.html │ ├── process_single.html │ └── replay.html ├── search.html ├── searchindex.js ├── sensors.html ├── serial.html ├── setup.html └── utilities.html ├── driveworks ├── CMakeLists.txt ├── README.md ├── cepton_driveworks.c └── cepton_driveworks.h ├── include ├── cepton_sdk.h ├── cepton_sdk.hpp ├── cepton_sdk_api.hpp ├── cepton_sdk_impl │ ├── cepton_sdk.inc │ └── cepton_sdk_util.inc └── cepton_sdk_util.hpp ├── lib ├── linux-aarch64 │ ├── libcepton_sdk.a │ └── libcepton_sdk.so ├── linux-arm │ ├── libcepton_sdk.a │ └── libcepton_sdk.so ├── linux-i386 │ ├── libcepton_sdk.a │ └── libcepton_sdk.so ├── linux-x86_64 │ ├── libcepton_sdk.a │ └── libcepton_sdk.so ├── osx │ ├── libcepton_sdk.a │ └── libcepton_sdk.dylib └── win64 │ ├── cepton_sdk.dll │ ├── cepton_sdk.imp.exp │ ├── cepton_sdk.imp.lib │ └── cepton_sdk.lib ├── licenses ├── asio.txt ├── cxxopts.txt ├── fmt.txt ├── json.txt ├── nativefiledialog.txt ├── pystring.txt └── spdlog.txt ├── matlab ├── +cepton_sdk │ ├── +c │ │ ├── C_Error.m │ │ ├── call.m │ │ ├── call_and_check.m │ │ ├── check_error.m │ │ ├── convert_sensor_information.m │ │ ├── get_error.m │ │ ├── get_error_code_name.m │ │ ├── get_version_string.m │ │ ├── is_error_code.m │ │ ├── is_fault_code.m │ │ ├── list_functions.m │ │ ├── load.m │ │ ├── log_error.m │ │ └── unload.m │ ├── +capture_replay │ │ ├── close.m │ │ ├── get_enable_loop.m │ │ ├── get_filename.m │ │ ├── get_length.m │ │ ├── get_position.m │ │ ├── get_speed.m │ │ ├── get_start_time.m │ │ ├── get_time.m │ │ ├── is_end.m │ │ ├── is_open.m │ │ ├── is_running.m │ │ ├── open.m │ │ ├── pause.m │ │ ├── resume.m │ │ ├── resume_blocking.m │ │ ├── seek.m │ │ ├── set_enable_loop.m │ │ └── set_speed.m │ ├── +common │ │ ├── None.m │ │ ├── filled_cell.m │ │ ├── is_none.m │ │ ├── parse_args.m │ │ └── unpack_bits.m │ ├── +internal │ │ ├── ErrorsListener.m │ │ ├── FramesCallback.m │ │ ├── clear_cache.m │ │ ├── convert_image_points_to_points.m │ │ ├── errors_listener.m │ │ ├── frames_callback.m │ │ ├── update.m │ │ └── wait_on_func.m │ ├── ControlFlag.m │ ├── FramesListener.m │ ├── Points.m │ ├── Sensor.m │ ├── SensorFramesListener.m │ ├── SensorModel.m │ ├── combine_points.m │ ├── deinitialize.m │ ├── get_control_flags.m │ ├── get_n_sensors.m │ ├── get_sensor_handle.m │ ├── get_sensor_information.m │ ├── get_sensor_information_by_handle.m │ ├── get_sensor_information_by_index.m │ ├── get_sensors.m │ ├── get_time.m │ ├── get_timestamp.m │ ├── has_control_flag.m │ ├── has_sensor.m │ ├── initialize.m │ ├── is_end.m │ ├── is_initialized.m │ ├── is_live.m │ ├── is_realtime.m │ ├── listen_frames.m │ ├── open_replay.m │ ├── plot_points.m │ ├── set_control_flags.m │ ├── unlisten_frames.m │ └── wait.m ├── LICENSE ├── README.md ├── VERSION ├── include │ ├── cepton_sdk.h │ ├── cepton_sdk.hpp │ ├── cepton_sdk_api.hpp │ ├── cepton_sdk_impl │ │ ├── cepton_sdk.inc │ │ └── cepton_sdk_util.inc │ └── cepton_sdk_util.hpp ├── lib │ ├── linux-aarch64 │ │ └── libcepton_sdk_matlab.so │ ├── linux-arm │ │ └── libcepton_sdk_matlab.so │ ├── linux-i386 │ │ └── libcepton_sdk_matlab.so │ ├── linux-x86_64 │ │ └── libcepton_sdk_matlab.so │ ├── osx │ │ └── libcepton_sdk_matlab.dylib │ └── win64 │ │ ├── cepton_sdk_matlab.dll │ │ └── cepton_sdk_matlab.imp.lib ├── samples │ ├── +common │ │ └── get_sample_capture_path.m │ ├── 1.pcap │ ├── 1.pcap.cep0 │ ├── capture_replay.m │ ├── multiple_sensors.m │ ├── single_live_sensor.m │ └── single_sensor.m └── source │ ├── c_matlab.cpp │ ├── cepton_sdk_matlab.h │ ├── matlab.cpp │ └── matlab.hpp ├── python ├── LICENSE ├── MANIFEST.in ├── README.md ├── cepton_sdk │ ├── __init__.py │ ├── api.py │ ├── c.py │ ├── capture_replay.py │ ├── common │ │ ├── __init__.py │ │ ├── c.py │ │ ├── general.py │ │ └── transform.py │ ├── core.py │ ├── export.py │ ├── lib │ │ ├── linux-aarch64 │ │ │ └── libcepton_sdk.so │ │ ├── linux-arm │ │ │ └── libcepton_sdk.so │ │ ├── linux-i386 │ │ │ └── libcepton_sdk.so │ │ ├── linux-x86_64 │ │ │ └── libcepton_sdk.so │ │ ├── osx │ │ │ └── libcepton_sdk.dylib │ │ └── win64 │ │ │ ├── cepton_sdk.dll │ │ │ └── cepton_sdk.imp.lib │ ├── load.py │ ├── plot.py │ ├── point.py │ ├── sensor.py │ └── settings.py ├── cepton_util │ ├── VERSION │ ├── __init__.py │ ├── capture.py │ ├── common.py │ └── gui.py ├── samples │ ├── 1.pcap │ ├── 1.pcap.cep0 │ ├── advanced │ │ ├── listen.py │ │ └── render.py │ ├── common.py │ ├── multiple_sensors.py │ └── single_sensor.py ├── setup.cfg ├── setup.py └── tools │ ├── cepton_capture.py │ ├── cepton_capture_gui.py │ ├── cepton_clip.py │ ├── cepton_export.py │ ├── cepton_export_serial.py │ ├── cepton_georeference.py │ └── cepton_list_sensors.py ├── ros ├── CMakeLists.txt ├── LICENSE ├── README.md ├── VERSION ├── include │ └── cepton_ros │ │ ├── common.hpp │ │ └── point.hpp ├── launch │ ├── convert_capture.launch │ ├── demo.launch │ ├── driver.launch │ ├── manager.launch │ ├── rviz.launch │ ├── settings │ │ └── rviz_config.rviz │ └── subscriber.launch ├── msg │ └── SensorInformation.msg ├── nodelets.xml ├── package.xml ├── src │ ├── common.cpp │ ├── driver_nodelet.cpp │ ├── driver_nodelet.hpp │ ├── subscriber_nodelet.cpp │ └── subscriber_nodelet.hpp ├── tests │ ├── 1 │ │ ├── cepton_transforms.json │ │ ├── lidar.cep0 │ │ ├── lidar.pcap │ │ └── lidar.pcap.cep0 │ ├── test_multi.launch │ └── test_single.launch └── third_party │ └── cepton_sdk │ ├── CMakeLists.txt │ ├── LICENSE │ ├── VERSION │ ├── cmake │ ├── CeptonCommon.cmake │ ├── CeptonVersion.cmake │ └── subdirectory │ │ └── CMakeLists.txt │ ├── include │ ├── cepton_sdk.h │ ├── cepton_sdk.hpp │ ├── cepton_sdk_api.hpp │ ├── cepton_sdk_impl │ │ ├── cepton_sdk.inc │ │ └── cepton_sdk_util.inc │ └── cepton_sdk_util.hpp │ └── lib │ ├── linux-aarch64 │ └── libcepton_sdk.so │ ├── linux-arm │ └── libcepton_sdk.so │ ├── linux-i386 │ └── libcepton_sdk.so │ ├── linux-x86_64 │ └── libcepton_sdk.so │ ├── osx │ └── libcepton_sdk.dylib │ └── win64 │ ├── cepton_sdk.dll │ └── cepton_sdk.imp.lib ├── samples ├── CMakeLists.txt ├── README.md ├── advanced │ ├── frame_accumulator.cpp │ ├── frame_detector.cpp │ ├── network.cpp │ ├── organize_points.cpp │ ├── process_multi.cpp │ ├── process_single.cpp │ ├── replay.cpp │ └── simple.cpp ├── basic.cpp ├── c_basic.c ├── callback.cpp ├── common.hpp ├── error.cpp ├── exporter │ ├── CMakeLists.txt │ ├── csv_exporter.cpp │ ├── cxxopts.hpp │ ├── exporter.cpp │ ├── exporter.h │ └── filesystem │ │ └── include │ │ └── ghc │ │ ├── filesystem.hpp │ │ ├── fs_fwd.hpp │ │ ├── fs_impl.hpp │ │ ├── fs_std.hpp │ │ ├── fs_std_fwd.hpp │ │ └── fs_std_impl.hpp └── posix │ └── direct_networking.c └── setup ├── cepton_sdk-linux-aarch64.deb ├── cepton_sdk-linux-arm.deb ├── cepton_sdk-linux-i386.deb ├── cepton_sdk-linux-x86_64.deb ├── cepton_sdk-osx.dmg └── cepton_sdk-win64.exe /.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | # -- 3 | .DS_Store 4 | 5 | # Build 6 | # ----- 7 | build*/ 8 | dist*/ 9 | install*/ 10 | 11 | # Visual Studio 12 | # ------------- 13 | .vscode 14 | *.VC.db 15 | *.VC.VC.opendb 16 | .vs 17 | Debug 18 | Release 19 | ipch 20 | 21 | # CLion 22 | # ----- 23 | .idea/ 24 | cmake-build-debug 25 | 26 | # Python 27 | # ------ 28 | __pycache__/ 29 | *.py[cod] 30 | .pytest_cache/ 31 | .benchmarks/ 32 | *.egg-info/ 33 | 34 | !\lib 35 | !*.a 36 | !*.so 37 | !*.lib 38 | !*.dll 39 | !*.dylib 40 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | CMake file for including cepton_sdk in a CMake project. 3 | 4 | See `samples/CMakeLists.txt` for example usage. 5 | ]] 6 | set(CEPTON_SDK_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}") 7 | list(APPEND CMAKE_MODULE_PATH "${CEPTON_SDK_SOURCE_DIR}/cmake") 8 | 9 | include("CeptonVersion") 10 | 11 | cmake_minimum_required(VERSION 3.1) 12 | project( 13 | cepton_sdk 14 | VERSION ${CEPTON_VERSION} 15 | LANGUAGES C CXX) 16 | 17 | include("CeptonCommon") 18 | 19 | create_option(BOOL CEPTON_SDK_USE_STATIC FALSE 20 | "Use static cepton sdk libraries.") 21 | 22 | if(NOT TARGET cepton_sdk::cepton_sdk) 23 | if(CEPTON_SDK_USE_STATIC) 24 | add_library(cepton_sdk::cepton_sdk STATIC IMPORTED GLOBAL) 25 | cepton_import_static_library(cepton_sdk::cepton_sdk 26 | "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk") 27 | set_target_properties( 28 | cepton_sdk::cepton_sdk PROPERTIES INTERFACE_COMPILE_DEFINITIONS 29 | CEPTON_SDK_STATIC) 30 | else() 31 | add_library(cepton_sdk::cepton_sdk SHARED IMPORTED GLOBAL) 32 | cepton_import_shared_library(cepton_sdk::cepton_sdk 33 | "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk") 34 | endif() 35 | set_target_properties( 36 | cepton_sdk::cepton_sdk PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 37 | "${CMAKE_CURRENT_SOURCE_DIR}/include") 38 | endif() 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cepton SDK 2 | 3 | ## Overview 4 | 5 | The Cepton SDK provides the following features 6 | 7 | - **Networking**: Listen for sensor packets. 8 | - **Capture Replay**: Read sensor packets from a PCAP file. 9 | - **Parsing**: Parse sensor packets. 10 | - **Calibration**: Apply sensor calibration. 11 | - **Frame Accumulation**: Accumulate sensor points and detect frames. 12 | 13 | Currently, the Cepton LiDAR packet formats are under active development, and are not publicly available. The SDK is required for **Parsing** and **Calibration**. All other SDK features are optional, and can be done manually by the user. 14 | 15 | ## Installation 16 | 17 | First, install [CeptonViewer](https://ceptontech.github.io/cepton_sdk_redist/cepton_viewer.html). 18 | 19 | To clone the repository, run 20 | 21 | ```sh 22 | git clone https://github.com/ceptontech/cepton_sdk_redist.git 23 | ``` 24 | 25 | ## Documentation 26 | 27 | 28 | 29 | ## Getting Started 30 | 31 | See `samples`. 32 | 33 | ## Directories 34 | 35 | - **bin**: Executable binaries. 36 | - **cmake**: Extra CMake files. 37 | - **csharp**: C# SDK. 38 | - **docs**: Documentation. 39 | - **driveworks**: NVIDIA DriveWorks SDK. 40 | - **include**: C/C++ Headers. 41 | - **lib**: Library binaries. 42 | - **licenses**: Third party licenses. 43 | - **matlab**: MATLAB SDK. 44 | - **python**: Python SDK. 45 | - **ros**: ROS SDK. 46 | - **samples**: Sample C/C++ code. 47 | - **setup**: Installers. 48 | 49 | ## Compatibility 50 | 51 | The library requires C++11 support. 52 | 53 | | OS | Minimum Version | 54 | | --------------------------- | --------------- | 55 | | `osx` | `OSX 10.15` | 56 | | `win64` | `Windows Vista` | 57 | | `linux-x86_64` | `Ubuntu 16.04` | 58 | | `linux-aarch64` | `Ubuntu 16.04` | 59 | | `linux-i386` (experimental) | `Ubuntu 16.04` | 60 | | `linux-arm` (experimental) | `Ubuntu 16.04` | 61 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.18.3 2 | -------------------------------------------------------------------------------- /bin/linux-aarch64/CeptonViewer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/linux-aarch64/CeptonViewer -------------------------------------------------------------------------------- /bin/linux-i386/CeptonViewer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/linux-i386/CeptonViewer -------------------------------------------------------------------------------- /bin/linux-x86_64/CeptonViewer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/linux-x86_64/CeptonViewer -------------------------------------------------------------------------------- /bin/linux-x86_64/cepton_device_config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/linux-x86_64/cepton_device_config -------------------------------------------------------------------------------- /bin/osx/CeptonViewer.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | CeptonViewer 9 | CFBundleGetInfoString 10 | 11 | CFBundleIconFile 12 | CeptonViewer.icns 13 | CFBundleIdentifier 14 | 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | 19 | CFBundleName 20 | 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | 29 | CSResourcesFileMapped 30 | 31 | NSHumanReadableCopyright 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /bin/osx/CeptonViewer.app/Contents/MacOS/CeptonViewer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/osx/CeptonViewer.app/Contents/MacOS/CeptonViewer -------------------------------------------------------------------------------- /bin/osx/CeptonViewer.app/Contents/Resources/CeptonViewer.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/osx/CeptonViewer.app/Contents/Resources/CeptonViewer.icns -------------------------------------------------------------------------------- /bin/win64/CeptonViewer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/CeptonViewer.exe -------------------------------------------------------------------------------- /bin/win64/cepton_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/cepton_sdk.dll -------------------------------------------------------------------------------- /bin/win64/cepton_sdk.imp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/cepton_sdk.imp.lib -------------------------------------------------------------------------------- /bin/win64/concrt140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/concrt140.dll -------------------------------------------------------------------------------- /bin/win64/msvcp140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/msvcp140.dll -------------------------------------------------------------------------------- /bin/win64/msvcp140_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/msvcp140_1.dll -------------------------------------------------------------------------------- /bin/win64/msvcp140_2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/msvcp140_2.dll -------------------------------------------------------------------------------- /bin/win64/msvcp140_codecvt_ids.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/msvcp140_codecvt_ids.dll -------------------------------------------------------------------------------- /bin/win64/vccorlib140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/vccorlib140.dll -------------------------------------------------------------------------------- /bin/win64/vcruntime140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/vcruntime140.dll -------------------------------------------------------------------------------- /bin/win64/vcruntime140_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/bin/win64/vcruntime140_1.dll -------------------------------------------------------------------------------- /cmake/CeptonVersion.cmake: -------------------------------------------------------------------------------- 1 | macro(PARSE_VERSION_STRING PREFIX) 2 | string(REPLACE "." ";" ${PREFIX}_VERSION_LIST "${${PREFIX}_VERSION}") 3 | list(LENGTH ${PREFIX}_VERSION_LIST ${PREFIX}_VERSION_LIST_SIZE) 4 | set(${PREFIX}_VERSION_MAJOR 0) 5 | set(${PREFIX}_VERSION_MINOR 0) 6 | set(${PREFIX}_VERSION_PATCH 0) 7 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 0) 8 | list(GET ${PREFIX}_VERSION_LIST 0 ${PREFIX}_VERSION_MAJOR) 9 | endif() 10 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 1) 11 | list(GET ${PREFIX}_VERSION_LIST 1 ${PREFIX}_VERSION_MINOR) 12 | endif() 13 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 2) 14 | list(GET ${PREFIX}_VERSION_LIST 2 ${PREFIX}_VERSION_PATCH) 15 | endif() 16 | endmacro() 17 | 18 | macro(PARSE_VERSION_FILE VERSION_PATH PREFIX) 19 | file(READ "${VERSION_PATH}" ${PREFIX}_VERSION) 20 | string(STRIP "${${PREFIX}_VERSION}" ${PREFIX}_VERSION) 21 | parse_version_string(${PREFIX}) 22 | endmacro() 23 | 24 | parse_version_file("${CMAKE_CURRENT_LIST_DIR}/../VERSION" CEPTON) 25 | -------------------------------------------------------------------------------- /cmake/subdirectory/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | CMake scoping project for setting subdirectory options without changing parent. 3 | ]] 4 | project(cepton_subdirectory_${add_external_subdirectory_name}) 5 | 6 | set(CMAKE_BUILD_TYPE "Release") 7 | 8 | # Disable all warnings 9 | if(GCC) 10 | add_flags("-w") 11 | elseif(CLANG) 12 | add_flags("-Wno-everything") 13 | elseif(MSVC) 14 | add_flags("/W0") 15 | endif() 16 | 17 | add_subdirectory(${add_external_subdirectory_args}) 18 | -------------------------------------------------------------------------------- /csharp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /csharp/VERSION: -------------------------------------------------------------------------------- 1 | 1.18.2 2 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sample/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("cepton_cs_sample")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Cepton Technologies")] 12 | [assembly: AssemblyProduct("cepton_cs_sample")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ca459679-6b35-49cf-a484-4149de3798f3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sdk/AsyncQueue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Cepton.SDK 6 | { 7 | class AsyncQueue 8 | { 9 | private readonly ConcurrentQueue queue; 10 | private readonly ConcurrentQueue> promise_queue; 11 | private readonly object locker = new object(); 12 | 13 | public AsyncQueue() 14 | { 15 | queue = new ConcurrentQueue(); 16 | promise_queue = new ConcurrentQueue>(); 17 | } 18 | 19 | private bool TryFulfillPromise(T item) 20 | { 21 | TaskCompletionSource promise; 22 | do 23 | { 24 | if (promise_queue.TryDequeue(out promise) && 25 | promise.TrySetResult(item)) 26 | { 27 | return true; 28 | } 29 | } 30 | while (promise != null); 31 | return false; 32 | } 33 | 34 | public void Enqueue(T item) 35 | { 36 | if (TryFulfillPromise(item)) 37 | return; 38 | 39 | lock (locker) 40 | { 41 | if (TryFulfillPromise(item)) 42 | return; 43 | 44 | queue.Enqueue(item); 45 | if (queue.Count > 10000) 46 | queue.TryDequeue(out _); // Fifo Discard 47 | } 48 | } 49 | 50 | public void Clear() 51 | { 52 | lock(locker) 53 | { 54 | while (queue.TryDequeue(out _)) ; 55 | } 56 | } 57 | 58 | public bool TryDequeue(out T item) 59 | { 60 | return queue.TryDequeue(out item); 61 | } 62 | 63 | public Task DequeueAsync(CancellationToken cancellationToken) 64 | { 65 | if (!queue.TryDequeue(out T item)) 66 | { 67 | lock (locker) 68 | { 69 | if (!queue.TryDequeue(out item)) 70 | { 71 | var promise = new TaskCompletionSource(); 72 | cancellationToken.Register(() => promise.TrySetCanceled()); 73 | 74 | promise_queue.Enqueue(promise); 75 | return promise.Task; 76 | } 77 | } 78 | } 79 | 80 | return Task.FromResult(item); 81 | } 82 | 83 | public int Count => queue.Count; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sdk/CeptonSDKException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Cepton.SDK 5 | { 6 | public enum SensorErrorCode : int 7 | { 8 | SUCCESS = 0, 9 | ERROR_GENERIC = -1, 10 | ERROR_OUT_OF_MEMORY = -2, 11 | ERROR_SENSOR_NOT_FOUND = -4, 12 | ERROR_SDK_VERSION_MISMATCH = -5, 13 | ERROR_COMMUNICATION = -6, ///< Networking error 14 | ERROR_TOO_MANY_CALLBACKS = -7, 15 | // Invalid value or uninitialized struct 16 | ERROR_INVALID_ARGUMENTS = -8, 17 | ERROR_ALREADY_INITIALIZED = -9, 18 | ERROR_NOT_INITIALIZED = -10, 19 | ERROR_INVALID_FILE_TYPE = -11, 20 | ERROR_FILE_IO = -12, 21 | ERROR_CORRUPT_FILE = -13, 22 | ERROR_NOT_OPEN = -14, 23 | ERROR_EOF = -15, 24 | 25 | FAULT_INTERNAL = -1000, ///< Internal parameter out of range 26 | FAULT_EXTREME_TEMPERATURE = -1001, ///< Reading exceed spec 27 | FAULT_EXTREME_HUMIDITY = -1002, ///< Reading exceeds spec 28 | FAULT_EXTREME_ACCELERATION = -1003, 29 | FAULT_ABNORMAL_FOV = -1004, 30 | FAULT_ABNORMAL_FRAME_RATE = -1005, 31 | FAULT_MOTOR_MALFUNCTION = -1006, 32 | FAULT_LASER_MALFUNCTION = -1007, 33 | FAULT_DETECTOR_MALFUNCTION = -1008, 34 | }; 35 | 36 | public class CeptonSDKException : Exception 37 | { 38 | public CeptonSDKException(SensorErrorCode ec) 39 | { 40 | ErrorCode = ec; 41 | } 42 | 43 | public SensorErrorCode ErrorCode { get; private set; } 44 | 45 | [DllImport("cepton_sdk.dll", EntryPoint = "cepton_is_error_code")] 46 | private static extern int _isError(int ec); 47 | 48 | [DllImport("cepton_sdk.dll", EntryPoint = "cepton_is_fault_code")] 49 | private static extern int _isFault(int ec); 50 | 51 | [DllImport("cepton_sdk.dll", EntryPoint = "cepton_get_error_code_name")] 52 | private static extern string _getName(int ec); 53 | 54 | public bool IsError { get { return _isError((int)ErrorCode) != 0; } } 55 | public bool IsFault { get { return _isFault((int)ErrorCode) != 0; } } 56 | public string Name { get { return _getName((int)ErrorCode); } } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sdk/FrameCache.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace Cepton.SDK 5 | { 6 | public class FrameCache 7 | { 8 | private readonly AsyncQueue cache = new AsyncQueue(); 9 | private readonly int max_frames; 10 | private readonly object locker = new object(); 11 | 12 | public ulong LastTimestamp { get; set; } 13 | 14 | public FrameCache(int max_frames) 15 | { 16 | this.max_frames = max_frames; 17 | } 18 | 19 | public void Clear() => cache.Clear(); 20 | 21 | public void Add(PointType[] points) 22 | { 23 | if (points.Length == 0) 24 | return; 25 | cache.Enqueue(points); 26 | if (cache.Count > max_frames) 27 | { 28 | lock (locker) 29 | { 30 | if (cache.Count > max_frames) 31 | cache.TryDequeue(out var discarded); 32 | } 33 | } 34 | } 35 | 36 | public PointType[] GetAnyPoints() 37 | { 38 | cache.TryDequeue(out var points); 39 | return points; 40 | } 41 | 42 | public async Task GetPointsAsync(CancellationToken token) 43 | { 44 | return await cache.DequeueAsync(token); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /csharp/cepton_cs_sdk/cepton_cs_sdk.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard1.1 5 | Cepton.SDK 6 | Cepton SDK for .NET 7 | 1.6.0.0 8 | Copyright © Cepton Technologies 2018 9 | AnyCPU;x64 10 | 11 | 12 | 13 | x64 14 | 15 | 16 | 17 | x64 18 | 19 | 20 | 21 | x64 22 | 23 | 24 | 25 | x64 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | PreserveNewest 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /csharp/cepton_cs_sdk/cepton_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/csharp/cepton_cs_sdk/cepton_sdk.dll -------------------------------------------------------------------------------- /csharp/cepton_sdk_csharp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.168 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cepton_cs_sdk", "cepton_cs_sdk\cepton_cs_sdk.csproj", "{A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cepton_cs_sample", "cepton_cs_sample\cepton_cs_sample.csproj", "{CA459679-6B35-49CF-A484-4149DE3798F3}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|x64 = Debug|x64 14 | Release|Any CPU = Release|Any CPU 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Debug|x64.ActiveCfg = Debug|x64 21 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Debug|x64.Build.0 = Debug|x64 22 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Release|x64.ActiveCfg = Release|x64 25 | {A4482FE6-2AED-4EB8-8D9C-68119FEB7DED}.Release|x64.Build.0 = Release|x64 26 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Debug|x64.ActiveCfg = Debug|x64 29 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Debug|x64.Build.0 = Debug|x64 30 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Release|x64.ActiveCfg = Release|x64 33 | {CA459679-6B35-49CF-A484-4149DE3798F3}.Release|x64.Build.0 = Release|x64 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {ECF3A7D2-ED06-4CDC-BB1E-C76D2B97063A} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 8efc745e95941602ae0af2ff1abc4de0 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_sources/building.rst.txt: -------------------------------------------------------------------------------- 1 | Building 2 | ======== 3 | 4 | CMake 5 | ----- 6 | 7 | The simplest way to include the SDK is as a CMake subdirectory: 8 | 9 | .. code:: cmake 10 | 11 | add_subdirectory() 12 | 13 | ... 14 | 15 | target_link_libraries( cepton_sdk::cepton_sdk) 16 | 17 | See :doc:`samples/cmake`. 18 | 19 | Manually 20 | -------- 21 | 22 | It is also possible to manually link to the SDK as follows: 23 | 24 | 1. Add the ``cepton_sdk_redist/include`` path. 25 | 2. Link to the correct library binary in ``cepton_sdk_redist/lib`` or ``cepton_sdk_redist/bin``. 26 | 3. If statically linking, define ``CEPTON_SDK_STATIC``. 27 | 28 | Windows 29 | ------- 30 | 31 | .. note:: 32 | 33 | It is not possible to statically link in debug mode, since the library does not ship with debug symbols. -------------------------------------------------------------------------------- /docs/_sources/c++.rst.txt: -------------------------------------------------------------------------------- 1 | C++ 2 | === 3 | 4 | High level C++ API for prototyping (``cepton_sdk.hpp``, ``cepton_sdk_api.hpp``). Methods are agnostic to live/replay mode. 5 | 6 | .. doxygenfunction:: cepton_sdk::api::is_live 7 | .. doxygenfunction:: cepton_sdk::api::is_end 8 | .. doxygenfunction:: cepton_sdk::api::get_time 9 | .. doxygenfunction:: cepton_sdk::api::wait 10 | 11 | Errors 12 | ------ 13 | 14 | .. doxygendefine:: CEPTON_PROCESS_ERROR 15 | .. doxygendefine:: CEPTON_CHECK_ERROR 16 | .. doxygendefine:: CEPTON_LOG_ERROR 17 | .. doxygendefine:: CEPTON_RETURN_ERROR 18 | 19 | Setup 20 | ----- 21 | 22 | .. doxygenfunction:: cepton_sdk::api::initialize 23 | .. doxygenfunction:: cepton_sdk::api::open_replay 24 | .. doxygenfunction:: cepton_sdk::api::has_control_flags 25 | .. doxygenfunction:: cepton_sdk::api::enable_control_flags 26 | .. doxygenclass:: cepton_sdk::api::SensorErrorCallback 27 | :members: 28 | :undoc-members: 29 | .. doxygenclass:: cepton_sdk::api::SensorImageFrameCallback 30 | :members: 31 | :undoc-members: 32 | 33 | Sensors 34 | ------- 35 | 36 | .. doxygenfunction:: cepton_sdk::api::has_sensor_by_serial_number 37 | .. doxygenfunction:: cepton_sdk::api::get_sensor_information_by_serial_number 38 | .. doxygenfunction:: cepton_sdk::api::get_sensor_serial_numbers -------------------------------------------------------------------------------- /docs/_sources/capture_replay.rst.txt: -------------------------------------------------------------------------------- 1 | Capture Replay 2 | ============== 3 | 4 | PCAP capture file replay. Functions are not thread safe, and should only be called from the main thread. 5 | 6 | .. doxygenfunction:: cepton_sdk_capture_replay_is_open 7 | .. doxygenfunction:: cepton_sdk_capture_replay_open 8 | .. doxygenfunction:: cepton_sdk_capture_replay_close 9 | .. doxygenfunction:: cepton_sdk_capture_replay_get_filename 10 | 11 | .. doxygenfunction:: cepton_sdk_capture_replay_get_start_time 12 | .. doxygenfunction:: cepton_sdk_capture_replay_get_position 13 | .. doxygenfunction:: cepton_sdk_capture_replay_get_length 14 | .. doxygenfunction:: cepton_sdk_capture_replay_is_end 15 | .. doxygenfunction:: cepton_sdk_capture_replay_seek 16 | 17 | .. doxygenfunction:: cepton_sdk_capture_replay_set_enable_loop 18 | .. doxygenfunction:: cepton_sdk_capture_replay_get_enable_loop 19 | 20 | .. doxygenfunction:: cepton_sdk_capture_replay_set_speed 21 | .. doxygenfunction:: cepton_sdk_capture_replay_get_speed 22 | 23 | .. doxygenfunction:: cepton_sdk_capture_replay_resume_blocking_once 24 | .. doxygenfunction:: cepton_sdk_capture_replay_resume_blocking 25 | .. doxygenfunction:: cepton_sdk_capture_replay_is_running 26 | .. doxygenfunction:: cepton_sdk_capture_replay_resume 27 | .. doxygenfunction:: cepton_sdk_capture_replay_pause 28 | -------------------------------------------------------------------------------- /docs/_sources/cepton_export.md.txt: -------------------------------------------------------------------------------- 1 | # Cepton Export 2 | 3 | The Cepton Export tool allows exporting LiDAR points in various file formats. 4 | 5 | ### Install 6 | 7 | Requirements: 8 | 9 | - Python 3 10 | 11 | Install the Cepton Python SDK 12 | 13 | ```sh 14 | pip3 install --user -U cepton_sdk[samples] 15 | ``` 16 | 17 | For usage, run 18 | 19 | ```sh 20 | cepton_export.py -h 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/_sources/cepton_player.md.txt: -------------------------------------------------------------------------------- 1 | # Cepton Player 2 | 3 | The Cepton Player tool allows creating/viewing data captures. 4 | 5 | - View live/replay data. 6 | - Capture data. 7 | - Clip/filter data. 8 | - Measure LiDAR points. 9 | - Export LiDAR points. 10 | 11 | ### Install 12 | 13 | Requirements: 14 | 15 | - Python 3 16 | 17 | Install `cepton_alg` 18 | 19 | ```sh 20 | pip3 install --user -U cepton_alg 21 | ``` 22 | 23 | To launch, run 24 | 25 | ```sh 26 | cepton_player.py 27 | ``` 28 | 29 | ### Workflows 30 | 31 | #### Open Capture 32 | 33 | - Drag and drop capture file/folder onto the main window. 34 | 35 | `OR` 36 | 37 | - Select `File` -> `Open Replay`. 38 | 39 | ### Camera Controls 40 | 41 | | Command | Mouse | 42 | | -------------- | --------- | 43 | | Rotate View | `LButton` | 44 | | Translate View | `RButton` | 45 | | Zoom View | `Scroll` | 46 | 47 | ### Cursors 48 | 49 | Interactive cursors use a combination of `CTRL` + `LButton`/`RButton`. 50 | 51 | #### Distance Ruler 52 | 53 | | Command | Key | 54 | | -------------- | ------------------ | 55 | | Enable/Disable | `D` | 56 | | Measure | `CTRL` + `LButton` | 57 | 58 | #### Angle Ruler 59 | 60 | | Command | Key | 61 | | -------------- | ------------------ | 62 | | Enable/Disable | `A` | 63 | | Measure | `CTRL` + `LButton` | 64 | | Set Center | `CTRL` + `RButton` | 65 | 66 | #### Point Selection 67 | 68 | | Command | Key | 69 | | -------------- | ------------------ | 70 | | Enable/Disable | `S` | 71 | | Select | `CTRL` + `LButton` | 72 | 73 | ### Keyboard Shortcuts 74 | 75 | #### Replay 76 | 77 | | Command | Key | 78 | | ------------ | ------- | 79 | | Pause/Resume | `SPACE` | 80 | | Next Frame | `N` | 81 | 82 | #### View 83 | 84 | | Command | Key | 85 | | ----------------- | --- | 86 | | Reset View Origin | `O` | 87 | | Front View | `1` | 88 | | Top View | `2` | 89 | | Side View | `3` | 90 | -------------------------------------------------------------------------------- /docs/_sources/errors.rst.txt: -------------------------------------------------------------------------------- 1 | Errors 2 | ====== 3 | 4 | Types 5 | ----- 6 | 7 | .. doxygenclass:: cepton_sdk::SensorError 8 | :members: 9 | :undoc-members: 10 | .. doxygentypedef:: CeptonSensorErrorCode 11 | .. doxygenenum:: _CeptonSensorErrorCode 12 | 13 | Methods 14 | ------- 15 | 16 | .. doxygenfunction:: cepton_get_error_code_name 17 | .. doxygenfunction:: cepton_is_error_code 18 | .. doxygenfunction:: cepton_is_fault_code 19 | 20 | .. doxygenfunction:: cepton_sdk_get_error -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | Cepton SDK 2 | ========== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | overview 8 | building 9 | samples 10 | internal 11 | legal 12 | 13 | Tools 14 | ----- 15 | 16 | .. toctree:: 17 | :maxdepth: 1 18 | 19 | cepton_viewer 20 | cepton_player 21 | cepton_export 22 | 23 | 24 | API Reference 25 | ------------- 26 | 27 | .. toctree:: 28 | :maxdepth: 1 29 | 30 | errors 31 | setup 32 | sensors 33 | points 34 | capture_replay 35 | networking 36 | serial 37 | c++ 38 | utilities -------------------------------------------------------------------------------- /docs/_sources/internal.rst.txt: -------------------------------------------------------------------------------- 1 | Internal 2 | ======== 3 | 4 | This page provides a brief description of what goes on inside the SDK. 5 | 6 | Packet Received 7 | --------------- 8 | 9 | Occurs when :any:`cepton_sdk_mock_network_receive` is called. 10 | 11 | 1. If the packet is a sensor information packet: 12 | - Update the internal stored sensor state. This information can be queried with :any:`cepton_sdk_get_sensor_information`. 13 | 2. If the packet is a data packet: 14 | - If no corresponding sensor information packet has been received, ignore the data packet. 15 | - Compute points from packet. 16 | - Apply sensor calibration. 17 | - Add points to frame accumulator. If frame is complete, emit image frame callback. 18 | 19 | Threads 20 | ------- 21 | 22 | Networking Thread 0 23 | ~~~~~~~~~~~~~~~~~~~ 24 | 25 | Created if :any:`CEPTON_SDK_CONTROL_DISABLE_NETWORK` is not set. 26 | 27 | - Start listening on the UDP port (default: ``8808``). 28 | - Push received packets on a queue for ``Thread 1``. 29 | 30 | Networking Thread 1 31 | ~~~~~~~~~~~~~~~~~~~ 32 | 33 | Created if :any:`CEPTON_SDK_CONTROL_DISABLE_NETWORK` is not set. 34 | 35 | - Pop packets from queue. 36 | - Call internal version of :any:`cepton_sdk_mock_network_receive`. See ``Packet Received``. 37 | 38 | Capture Replay Thread 0 39 | ~~~~~~~~~~~~~~~~~~~~~~~ 40 | 41 | Created by :any:`cepton_sdk_capture_replay_resume`. 42 | 43 | - While running 44 | - Read next packet from PCAP file. 45 | - Sleep to simulate realtime delays. 46 | - Call :any:`cepton_sdk_mock_network_receive`. 47 | 48 | Concurrency 49 | ----------- 50 | 51 | All SDK getter functions are thread safe, and can be called from callbacks. Other SDK functions are not guaranteed to be thread safe, and can cause deadlock if called from callbacks. 52 | 53 | Minimal SDK 54 | ----------- 55 | 56 | If desired, the following SDK features can be disabled in the SDK and performed manually by the user: 57 | 58 | - Capture Replay: :doc:`samples/replay`. 59 | - Frame Accumulation: :doc:`samples/frame_accumulator`. 60 | - Networking: :doc:`samples/network`. -------------------------------------------------------------------------------- /docs/_sources/legal.md.txt: -------------------------------------------------------------------------------- 1 | # Legal 2 | 3 | "Cepton", "MMT", "Vista", "Vista-Edge" and "Helius" are all registered trademarks of Cepton Technologies, Inc., and may not be used without express permission from Cepton. 4 | 5 | Your use of the Cepton products is subject to the Terms of Sale signed between you and Cepton or authorized distributor/integrator. It is prohibited by the terms to remove or open the product housing, inspect the internal of the product, reverse-engineer any part of the product, or permit any third party to do any of the foregoing. Please contact if you have any questions. -------------------------------------------------------------------------------- /docs/_sources/networking.rst.txt: -------------------------------------------------------------------------------- 1 | Networking 2 | ========== 3 | 4 | Network callback for debugging. 5 | 6 | Types 7 | ----- 8 | 9 | .. doxygentypedef:: FpCeptonNetworkReceiveCallback 10 | 11 | Methods 12 | ------- 13 | 14 | .. doxygenfunction:: cepton_sdk_listen_network_packet 15 | .. doxygenfunction:: cepton_sdk_unlisten_network_packet 16 | -------------------------------------------------------------------------------- /docs/_sources/points.rst.txt: -------------------------------------------------------------------------------- 1 | Points 2 | ====== 3 | 4 | Types 5 | ----- 6 | 7 | .. doxygenstruct:: CeptonSensorImagePoint 8 | :members: 9 | :undoc-members: 10 | 11 | Methods 12 | ------- 13 | 14 | .. doxygentypedef:: FpCeptonSensorImageDataCallback 15 | .. doxygenfunction:: cepton_sdk_listen_image_frames 16 | .. doxygenfunction:: cepton_sdk_unlisten_image_frames 17 | -------------------------------------------------------------------------------- /docs/_sources/samples.rst.txt: -------------------------------------------------------------------------------- 1 | Samples 2 | ======= 3 | 4 | .. mdinclude:: ../../samples/README.md 5 | 6 | 7 | Basic 8 | ----- 9 | 10 | Start with :doc:`samples/basic` or :doc:`samples/c_basic`. 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | samples/cmake 16 | samples/basic 17 | samples/c_basic 18 | samples/callback 19 | samples/error 20 | 21 | Advanced 22 | -------- 23 | 24 | .. toctree:: 25 | :maxdepth: 1 26 | 27 | samples/frame_accumulator 28 | samples/frame_detector 29 | samples/network 30 | samples/organize_points 31 | samples/process_multi 32 | samples/process_single 33 | samples/replay 34 | -------------------------------------------------------------------------------- /docs/_sources/samples/basic.rst.txt: -------------------------------------------------------------------------------- 1 | Basic 2 | ===== 3 | 4 | .. literalinclude:: ../../../samples/basic.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/basic.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/c_basic.rst.txt: -------------------------------------------------------------------------------- 1 | C Basic 2 | ======= 3 | 4 | .. literalinclude:: ../../../samples/c_basic.c 5 | :language: c 6 | :linenos: 7 | :caption: samples/c_basic.c 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/callback.rst.txt: -------------------------------------------------------------------------------- 1 | Callback 2 | ======== 3 | 4 | .. literalinclude:: ../../../samples/callback.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/callback.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/cmake.rst.txt: -------------------------------------------------------------------------------- 1 | CMake 2 | ===== 3 | 4 | .. literalinclude:: ../../../samples/CMakeLists.txt 5 | :linenos: 6 | :caption: samples/CMakeLists.txt 7 | -------------------------------------------------------------------------------- /docs/_sources/samples/error.rst.txt: -------------------------------------------------------------------------------- 1 | Error 2 | ===== 3 | 4 | .. literalinclude:: ../../../samples/error.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/error.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/frame_accumulator.rst.txt: -------------------------------------------------------------------------------- 1 | Frame Detector 2 | ============== 3 | 4 | .. literalinclude:: ../../../samples/advanced/frame_detector.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/frame_detector.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/frame_detector.rst.txt: -------------------------------------------------------------------------------- 1 | Frame Accumulator 2 | ================= 3 | 4 | .. literalinclude:: ../../../samples/advanced/frame_accumulator.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/frame_accumulator.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/network.rst.txt: -------------------------------------------------------------------------------- 1 | Network 2 | ======= 3 | 4 | .. literalinclude:: ../../../samples/advanced/network.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/network.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/organize_points.rst.txt: -------------------------------------------------------------------------------- 1 | Organize Points 2 | =============== 3 | 4 | .. literalinclude:: ../../../samples/advanced/organize_points.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/organize_points.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/process_multi.rst.txt: -------------------------------------------------------------------------------- 1 | Process Multi 2 | ============= 3 | 4 | .. literalinclude:: ../../../samples/advanced/process_multi.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/process_multi.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/process_single.rst.txt: -------------------------------------------------------------------------------- 1 | Process Single 2 | ============== 3 | 4 | .. literalinclude:: ../../../samples/advanced/process_single.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/process_single.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/samples/replay.rst.txt: -------------------------------------------------------------------------------- 1 | Replay 2 | ====== 3 | 4 | .. literalinclude:: ../../../samples/advanced/replay.cpp 5 | :language: c 6 | :linenos: 7 | :caption: samples/advanced/replay.cpp 8 | -------------------------------------------------------------------------------- /docs/_sources/sensors.rst.txt: -------------------------------------------------------------------------------- 1 | Sensors 2 | ======= 3 | 4 | Types 5 | ----- 6 | 7 | .. doxygentypedef:: CeptonSensorHandle 8 | 9 | .. doxygentypedef:: CeptonSensorModel 10 | .. doxygenenum:: _CeptonSensorModel 11 | 12 | .. doxygenstruct:: CeptonSensorInformation 13 | :members: 14 | :undoc-members: 15 | 16 | Methods 17 | ------- 18 | 19 | .. doxygenfunction:: cepton_is_sora 20 | .. doxygenfunction:: cepton_is_hr80 21 | .. doxygenfunction:: cepton_is_vista 22 | 23 | .. doxygenfunction:: cepton_sdk_get_n_sensors 24 | .. doxygenfunction:: cepton_sdk_get_sensor_handle_by_serial_number 25 | .. doxygenfunction:: cepton_sdk_get_sensor_information_by_index 26 | .. doxygenfunction:: cepton_sdk_get_sensor_information 27 | -------------------------------------------------------------------------------- /docs/_sources/serial.rst.txt: -------------------------------------------------------------------------------- 1 | Serial 2 | ====== 3 | 4 | Serial callback. Primarily used for receiving data from GPS/INS attached to sensor. 5 | 6 | Types 7 | ----- 8 | 9 | .. doxygentypedef:: FpCeptonSerialReceiveCallback 10 | 11 | Methods 12 | ------- 13 | 14 | .. doxygenfunction:: cepton_sdk_listen_serial_lines 15 | .. doxygenfunction:: cepton_sdk_unlisten_serial_lines -------------------------------------------------------------------------------- /docs/_sources/setup.rst.txt: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | 4 | Types 5 | ----- 6 | 7 | .. doxygentypedef:: CeptonSDKControl 8 | .. doxygenenum:: _CeptonSDKControl 9 | 10 | .. doxygentypedef:: CeptonSDKFrameMode 11 | .. doxygenenum:: _CeptonSDKFrameMode 12 | 13 | .. doxygenstruct:: CeptonSDKFrameOptions 14 | :members: 15 | :undoc-members: 16 | .. doxygenfunction:: cepton_sdk_create_frame_options 17 | 18 | .. doxygenstruct:: CeptonSDKOptions 19 | :members: 20 | :undoc-members: 21 | .. doxygenfunction:: cepton_sdk_create_options 22 | 23 | .. doxygentypedef:: FpSensorErrorCallback 24 | 25 | Methods 26 | ------- 27 | 28 | .. doxygendefine CEPTON_SDK_VERSION 29 | 30 | .. doxygenfunction:: cepton_sdk_get_version_string 31 | .. doxygenfunction:: cepton_sdk_get_version_major 32 | .. doxygenfunction:: cepton_sdk_get_version_minor 33 | .. doxygenfunction:: cepton_sdk_get_version_patch 34 | 35 | .. doxygenfunction:: cepton_sdk_initialize 36 | .. doxygenfunction:: cepton_sdk_deinitialize 37 | .. doxygenfunction:: cepton_sdk_clear 38 | 39 | .. doxygenfunction:: cepton_sdk_set_control_flags 40 | .. doxygenfunction:: cepton_sdk_get_control_flags 41 | .. doxygenfunction:: cepton_sdk_has_control_flag 42 | 43 | .. doxygenfunction:: cepton_sdk_get_port 44 | .. doxygenfunction:: cepton_sdk_set_port 45 | 46 | .. doxygenfunction:: cepton_sdk_set_frame_options 47 | .. doxygenfunction:: cepton_sdk_get_frame_mode 48 | .. doxygenfunction:: cepton_sdk_get_frame_length 49 | -------------------------------------------------------------------------------- /docs/_sources/utilities.rst.txt: -------------------------------------------------------------------------------- 1 | Utilities 2 | ========= 3 | 4 | Utility functions and classes for prototyping (`cepton_sdk_util.hpp`). 5 | 6 | Common 7 | ------ 8 | 9 | .. doxygenfunction:: cepton_sdk::util::get_timestamp_usec 10 | 11 | Points 12 | ------ 13 | 14 | .. doxygenstruct:: cepton_sdk::util::SensorPoint 15 | :members: 16 | :undoc-members: 17 | 18 | .. doxygenfunction:: cepton_sdk::util::convert_sensor_image_point_to_point 19 | 20 | Callbacks 21 | --------- 22 | 23 | .. See :doc:`samples/callback`. 24 | 25 | .. doxygenclass:: cepton_sdk::util::Callback 26 | :members: 27 | 28 | Frames 29 | ------ 30 | 31 | .. See :doc:`samples/frame`. 32 | 33 | .. doxygenclass:: cepton_sdk::util::FrameDetector 34 | :members: 35 | :undoc-members: 36 | 37 | .. doxygenclass:: cepton_sdk::util::FrameAccumulator 38 | :members: 39 | :undoc-members: 40 | 41 | Organizer 42 | --------- 43 | 44 | .. See :doc: `samples/organize`. 45 | 46 | .. doxygenstruct:: cepton_sdk::util::OrganizedCloud 47 | :members: 48 | 49 | .. doxygenclass:: cepton_sdk::util::Organizer 50 | :members: 51 | :undoc-members: 52 | 53 | 54 | -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Light.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Light.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Thin.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Roboto-Slab-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/Roboto-Slab-Thin.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/cepton_sdk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/cepton_sdk.pdf -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/docs/objects.inv -------------------------------------------------------------------------------- /driveworks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(cepton_driveworks) 3 | 4 | # Setup cross compilation from x86_64 to aarch64 5 | set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) 6 | set(CMAKE_CXX_COMPILER aarch64-linux-gnu-gcc) 7 | 8 | file(GLOB SOURCES ${PROJECT_SOURCE_DIR}/*.c) 9 | 10 | include_directories(SYSTEM ${Driveworks_INCLUDE_DIRS} "/usr/local/cuda/include" 11 | ${PROJECT_SOURCE_DIR}/../include/) 12 | 13 | add_library(${PROJECT_NAME} SHARED ${SOURCES}) 14 | 15 | # This is a hack to make AARCH64 lib available for cross build. 16 | target_link_libraries(cepton_driveworks ${PROJECT_SOURCE_DIR}/libcepton_sdk.a) 17 | 18 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) 19 | -------------------------------------------------------------------------------- /driveworks/README.md: -------------------------------------------------------------------------------- 1 | # Cepton Driveworks 2 | 3 | This driver is meant as reference code only. It is completely untested, and is not guaranteed to work. 4 | 5 | ## Getting started 6 | 7 | Run `sample_lidar_replay` 8 | 9 | ```sh 10 | cd /usr/local/driveworks/bin 11 | sudo ifconfig br0 192.168.0.11 netmask 255.255.0.0 12 | sudo ./sample_lidar_replay --protocol=lidar.socket --params=device=CUSTOM,ip=,port=8808,decoder=/home/nvidia/tmp/libcepton_driveworks.so,scan-frequency=10,protocol=udp 13 | ``` -------------------------------------------------------------------------------- /driveworks/cepton_driveworks.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include "cepton_sdk.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_initialize( 12 | const float32_t spinFrequency); 13 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_release(); 14 | 15 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_getConstants( 16 | _dwLidarDecoder_constants *constants); 17 | 18 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_decodePacket( 19 | dwLidarDecodedPacket *output, const uint8_t *buffer, const size_t length); 20 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_synchronize( 21 | const uint8_t *buffer, const size_t length, size_t *remaining); 22 | __attribute__((visibility("default"))) dwStatus _dwLidarDecoder_validatePacket( 23 | const uint8_t *buffer, const size_t length); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /lib/linux-aarch64/libcepton_sdk.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-aarch64/libcepton_sdk.a -------------------------------------------------------------------------------- /lib/linux-aarch64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-aarch64/libcepton_sdk.so -------------------------------------------------------------------------------- /lib/linux-arm/libcepton_sdk.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-arm/libcepton_sdk.a -------------------------------------------------------------------------------- /lib/linux-arm/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-arm/libcepton_sdk.so -------------------------------------------------------------------------------- /lib/linux-i386/libcepton_sdk.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-i386/libcepton_sdk.a -------------------------------------------------------------------------------- /lib/linux-i386/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-i386/libcepton_sdk.so -------------------------------------------------------------------------------- /lib/linux-x86_64/libcepton_sdk.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-x86_64/libcepton_sdk.a -------------------------------------------------------------------------------- /lib/linux-x86_64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/linux-x86_64/libcepton_sdk.so -------------------------------------------------------------------------------- /lib/osx/libcepton_sdk.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/osx/libcepton_sdk.a -------------------------------------------------------------------------------- /lib/osx/libcepton_sdk.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/osx/libcepton_sdk.dylib -------------------------------------------------------------------------------- /lib/win64/cepton_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/win64/cepton_sdk.dll -------------------------------------------------------------------------------- /lib/win64/cepton_sdk.imp.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/win64/cepton_sdk.imp.exp -------------------------------------------------------------------------------- /lib/win64/cepton_sdk.imp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/win64/cepton_sdk.imp.lib -------------------------------------------------------------------------------- /lib/win64/cepton_sdk.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/lib/win64/cepton_sdk.lib -------------------------------------------------------------------------------- /licenses/asio.txt: -------------------------------------------------------------------------------- 1 | 2 | Boost Software License - Version 1.0 - August 17th, 2003 3 | 4 | Permission is hereby granted, free of charge, to any person or organization 5 | obtaining a copy of the software and accompanying documentation covered by 6 | this license (the "Software") to use, reproduce, display, distribute, 7 | execute, and transmit the Software, and to prepare derivative works of the 8 | Software, and to permit third-parties to whom the Software is furnished to 9 | do so, all subject to the following: 10 | 11 | The copyright notices in the Software and this entire statement, including 12 | the above license grant, this restriction and the following disclaimer, 13 | must be included in all copies of the Software, in whole or in part, and 14 | all derivative works of the Software, unless such copies or derivative 15 | works are solely in the form of machine-executable object code generated by 16 | a source language processor. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /licenses/cxxopts.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Jarryd Beck 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /licenses/fmt.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - 2016, Victor Zverovich 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /licenses/json.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-2017 Niels Lohmann 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /licenses/nativefiledialog.txt: -------------------------------------------------------------------------------- 1 | This software is provided 'as-is', without any express or implied 2 | warranty. In no event will the authors be held liable for any damages 3 | arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, 6 | including commercial applications, and to alter it and redistribute it 7 | freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not 10 | claim that you wrote the original software. If you use this software 11 | in a product, an acknowledgment in the product documentation would be 12 | appreciated but is not required. 13 | 2. Altered source versions must be plainly marked as such, and must not be 14 | misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | 17 | -------------------------------------------------------------------------------- /licenses/pystring.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2010, Sony Pictures Imageworks Inc 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | Neither the name of the organization Sony Pictures Imageworks nor the 14 | names of its contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS 19 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER 23 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /licenses/spdlog.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Gabi Melman. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/C_Error.m: -------------------------------------------------------------------------------- 1 | classdef C_Error < handle 2 | 3 | properties (SetAccess = protected) 4 | code = 0; 5 | msg = ''; 6 | end 7 | 8 | methods 9 | function self = C_Error(code, msg) 10 | if nargin >= 1 11 | self.code = code; 12 | end 13 | if nargin >= 2 14 | self.msg = msg; 15 | else 16 | 17 | end 18 | end 19 | 20 | function result = logical(self) 21 | result = (self.code ~= 0); 22 | end 23 | 24 | function result = not(self) 25 | result = (self.code == 0); 26 | end 27 | 28 | function result = MException(self) 29 | id = sprintf('cepton_sdk_SensorError:%s', self.name); 30 | result = MException(id, self.msg); 31 | end 32 | 33 | function result = name(self) 34 | result = cepton_sdk.c.get_error_code_name(self.code); 35 | end 36 | 37 | function result = is_error(self) 38 | result = cepton_sdk.c.is_error_code(self.code); 39 | end 40 | 41 | function result = is_fault(self) 42 | result = cepton_sdk.c.is_fault_code(self.code); 43 | end 44 | end 45 | 46 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/call.m: -------------------------------------------------------------------------------- 1 | function varargout = call(varargin) 2 | cepton_sdk.c.load(); 3 | [varargout{1:nargout}] = calllib('cepton_sdk', varargin{:}); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/call_and_check.m: -------------------------------------------------------------------------------- 1 | function varargout = call_and_check(varargin) 2 | cepton_sdk.c.load(); 3 | [error_code, varargout{1:nargout}] = calllib('cepton_sdk', varargin{:}); 4 | cepton_sdk.c.check_error(cepton_sdk.c.get_error()); 5 | end 6 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/check_error.m: -------------------------------------------------------------------------------- 1 | function err = check_error(err) 2 | if ~err 3 | return; 4 | end 5 | 6 | exception = MException(err); 7 | if err.is_error() 8 | throwAsCaller(exception); 9 | else 10 | warning(exception.msgID, exception.msgtext); 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/convert_sensor_information.m: -------------------------------------------------------------------------------- 1 | function sensor_info = convert_sensor_information(c_sensor_info) 2 | sensor_info.handle = uint64(c_sensor_info.handle); 3 | sensor_info.serial_number = uint64(c_sensor_info.serial_number); 4 | sensor_info.model_name = fix_c_string(c_sensor_info.model_name); 5 | sensor_info.model = cepton_sdk.SensorModel(c_sensor_info.model); 6 | sensor_info.firmware_version = ... 7 | fix_c_string(c_sensor_info.firmware_version); 8 | 9 | sensor_info.measurement_period = double(c_sensor_info.measurement_period); 10 | 11 | sensor_info.ptp_ts = uint64(c_sensor_info.ptp_ts); 12 | 13 | sensor_info.gps_ts_year = uint8(c_sensor_info.gps_ts_year); 14 | sensor_info.gps_ts_month = uint8(c_sensor_info.gps_ts_month); 15 | sensor_info.gps_ts_day = uint8(c_sensor_info.gps_ts_day); 16 | sensor_info.gps_ts_hour = uint8(c_sensor_info.gps_ts_hour); 17 | sensor_info.gps_ts_min = uint8(c_sensor_info.gps_ts_min); 18 | sensor_info.gps_ts_sec = uint8(c_sensor_info.gps_ts_sec); 19 | 20 | sensor_info.return_count = uint8(c_sensor_info.return_count); 21 | sensor_info.segment_count = uint8(c_sensor_info.segment_count); 22 | 23 | flags = cepton_sdk.common.unpack_bits(c_sensor_info.flags, 32); 24 | sensor_info.is_mocked = flags(1); 25 | sensor_info.is_pps_connected = flags(2); 26 | sensor_info.is_nmea_connected = flags(3); 27 | sensor_info.is_ptp_connected = flags(4); 28 | sensor_info.is_calibrated = flags(5); 29 | sensor_info.is_over_heated = flags(6); 30 | sensor_info.is_sync_firing_enabled = flags(7); 31 | end 32 | 33 | function str = fix_c_string(c_str) 34 | str = native2unicode(c_str); 35 | str = strrep(str, char(0), ' '); 36 | str = strip(str, 'right'); 37 | end 38 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/get_error.m: -------------------------------------------------------------------------------- 1 | function result = get_error() 2 | error_msg = libpointer('stringPtrPtr', {''}); 3 | error_code = cepton_sdk.c.call('cepton_sdk_get_error', error_msg); 4 | result = cepton_sdk.c.C_Error(error_code, error_msg.value{1}); 5 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/get_error_code_name.m: -------------------------------------------------------------------------------- 1 | function result = get_error_code_name(error_code) 2 | result = cepton_sdk.c.call('cepton_get_error_code_name', error_code); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/get_version_string.m: -------------------------------------------------------------------------------- 1 | function result = get_version_string() 2 | result = cepton_sdk.c.call('cepton_sdk_get_version_string'); 3 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/is_error_code.m: -------------------------------------------------------------------------------- 1 | function result = is_error_code(error_code) 2 | result = cepton_sdk.c.call('cepton_is_error_code', error_code); 3 | result = logical(result); 4 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/is_fault_code.m: -------------------------------------------------------------------------------- 1 | function result = is_fault_code(error_code) 2 | result = cepton_sdk.c.call('cepton_is_fault_code', error_code); 3 | result = logical(result); 4 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/list_functions.m: -------------------------------------------------------------------------------- 1 | function list_functions() 2 | cepton_sdk.c.load(); 3 | libfunctions('cepton_sdk', '-full'); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/load.m: -------------------------------------------------------------------------------- 1 | function load() 2 | if libisloaded('cepton_sdk') 3 | return; 4 | end 5 | 6 | if ispc() 7 | os_name = 'win64'; 8 | lib_name = 'cepton_sdk_matlab'; 9 | elseif isunix() 10 | if ismac() 11 | os_name = 'osx'; 12 | else 13 | os_name = 'linux-x86_64'; 14 | end 15 | lib_name = 'libcepton_sdk_matlab'; 16 | else 17 | error('Platform not supported!'); 18 | end 19 | 20 | package = what('cepton_sdk'); 21 | package = package(1); 22 | package_dir = strrep(package.path, '+cepton_sdk', ''); 23 | include_dir = fullfile(package_dir, 'include'); 24 | lib_dir = fullfile(package_dir, 'lib', os_name); 25 | 26 | warning('off'); 27 | loadlibrary(fullfile(lib_dir, lib_name), ... 28 | fullfile(include_dir, 'cepton_sdk_matlab.h'), ... 29 | 'alias', 'cepton_sdk', ... 30 | 'includepath', include_dir, ... 31 | 'addheader', 'cepton_sdk.h'); 32 | warning('on'); 33 | end 34 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/log_error.m: -------------------------------------------------------------------------------- 1 | function err = check_error(err) 2 | if ~err 3 | return; 4 | end 5 | 6 | exception = MException(err); 7 | warning(exception.msgID, exception.msgtext); 8 | end 9 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+c/unload.m: -------------------------------------------------------------------------------- 1 | function unload() 2 | if ~libisloaded('cepton_sdk') 3 | return; 4 | end 5 | 6 | unloadlibrary('cepton_sdk'); 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/close.m: -------------------------------------------------------------------------------- 1 | function close() 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_close'); 3 | cepton_sdk.internal.clear_cache(); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_enable_loop.m: -------------------------------------------------------------------------------- 1 | function result = get_enable_loop() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_enable_loop'); 3 | result = logical(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_filename.m: -------------------------------------------------------------------------------- 1 | function result = get_filename() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_filename'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_length.m: -------------------------------------------------------------------------------- 1 | function result = get_length() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_length'); 3 | result = double(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_position.m: -------------------------------------------------------------------------------- 1 | function result = get_position() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_position'); 3 | result = double(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_speed.m: -------------------------------------------------------------------------------- 1 | function result = get_speed() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_speed'); 3 | result = double(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_start_time.m: -------------------------------------------------------------------------------- 1 | function result = get_start_time() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_get_start_time'); 3 | result = 1e-6 * double(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/get_time.m: -------------------------------------------------------------------------------- 1 | function result = get_time() 2 | result = cepton_sdk.capture_replay.get_start_time() + cepton_sdk.capture_replay.get_position(); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/is_end.m: -------------------------------------------------------------------------------- 1 | function result = is_end() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_is_end'); 3 | result = logical(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/is_open.m: -------------------------------------------------------------------------------- 1 | function result = is_open() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_is_open'); 3 | result = logical(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/is_running.m: -------------------------------------------------------------------------------- 1 | function result = is_running() 2 | result = cepton_sdk.c.call('cepton_sdk_capture_replay_is_running'); 3 | result = logical(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/open.m: -------------------------------------------------------------------------------- 1 | function open(path) 2 | cepton_sdk.capture_replay.close() 3 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_open', path); 4 | cepton_sdk.internal.clear_cache(); 5 | end 6 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/pause.m: -------------------------------------------------------------------------------- 1 | function pause() 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_pause'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/resume.m: -------------------------------------------------------------------------------- 1 | function resume() 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_resume'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/resume_blocking.m: -------------------------------------------------------------------------------- 1 | function resume_blocking(t_length) 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_resume_blocking', t_length); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/seek.m: -------------------------------------------------------------------------------- 1 | function seek(position) 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_seek', position); 3 | cepton_sdk.internal.clear_cache(); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/set_enable_loop.m: -------------------------------------------------------------------------------- 1 | function set_enable_loop(enable_loop) 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_set_enable_loop', enable_loop); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+capture_replay/set_speed.m: -------------------------------------------------------------------------------- 1 | function set_speed(speed) 2 | cepton_sdk.c.call_and_check('cepton_sdk_capture_replay_set_speed', speed); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+common/None.m: -------------------------------------------------------------------------------- 1 | classdef None 2 | end 3 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+common/filled_cell.m: -------------------------------------------------------------------------------- 1 | function c = filled_cell(sz, value) 2 | c = cell(sz); 3 | if isa(value, 'function_handle') 4 | for i_cell = 1:numel(c) 5 | c{i_cell} = value(); 6 | end 7 | else 8 | c(:) = {value}; 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+common/is_none.m: -------------------------------------------------------------------------------- 1 | function tf = is_none(obj) 2 | tf = isa(obj, 'cepton_sdk.common.None'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+common/parse_args.m: -------------------------------------------------------------------------------- 1 | function args = parse_args(default_args, varargin) 2 | try 3 | args = struct(varargin{:}); 4 | catch 5 | error_id = 'parse_args:ArgumentError'; 6 | error_msg = sprintf('invalid arguments'); 7 | error = MException(error_id, error_msg); 8 | throwAsCaller(error); 9 | end 10 | 11 | error = check_args(args, default_args); 12 | if ~isempty(error) 13 | throwAsCaller(error); 14 | end 15 | 16 | args = update_args(args, default_args); 17 | end 18 | 19 | function error = check_args(args, default_args) 20 | error = []; 21 | 22 | names = fieldnames(args); 23 | for i_field = 1:numel(names) 24 | name_tmp = names{i_field}; 25 | if ~has_field(default_args, name_tmp) 26 | error_id = 'parse_args:ArgumentError'; 27 | error_msg = sprintf('invalid argument: %s', name_tmp); 28 | error = MException(error_id, error_msg); 29 | return; 30 | end 31 | end 32 | end 33 | 34 | function args = update_args(args, default_args) 35 | names = fieldnames(default_args); 36 | for i_field = 1:numel(names) 37 | name_tmp = names{i_field}; 38 | if ~has_field(args, name_tmp) 39 | args.(name_tmp) = default_args.(name_tmp); 40 | end 41 | end 42 | end 43 | 44 | function tf = has_field(s, name) 45 | tf = any(ismember(name, fieldnames(s))); 46 | end 47 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+common/unpack_bits.m: -------------------------------------------------------------------------------- 1 | function result = unpack_bits(a, n) 2 | result = fliplr(dec2bin(a, n) == '1'); 3 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/ErrorsListener.m: -------------------------------------------------------------------------------- 1 | classdef ErrorsListener 2 | 3 | methods 4 | function update(self) 5 | while cepton_sdk.c.call('cepton_sdk_matlab_has_error') 6 | [handle, error_code, error_msg_size] = ... 7 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_get_error', 0, 0, 0); 8 | 9 | options = struct(); 10 | options.warning = true; 11 | cepton_sdk.c.check_error_code(error_code, options); 12 | end 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/FramesCallback.m: -------------------------------------------------------------------------------- 1 | classdef FramesCallback < handle 2 | 3 | properties (Access = private) 4 | i_callback = uint64(0); 5 | callbacks = containers.Map('KeyType', 'uint64', 'ValueType', 'any'); 6 | end 7 | 8 | methods 9 | function callback_id = listen(self, callback, callback_id_tmp) 10 | if nargin >= 3 11 | callback_id = callback_id_tmp; 12 | else 13 | callback_id = self.i_callback; 14 | self.i_callback = self.i_callback + 1; 15 | end 16 | assert(~isKey(self.callbacks, callback_id)); 17 | self.callbacks(callback_id) = callback; 18 | end 19 | 20 | function unlisten(self, callback_id) 21 | assert(isKey(self.callbacks, callback_id)); 22 | remove(self.callbacks, callback_id); 23 | end 24 | 25 | function update(self) 26 | while cepton_sdk.c.call('cepton_sdk_matlab_has_image_points') 27 | [sensor_handle, n_points] = ... 28 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_get_image_points', 0, 0); 29 | 30 | sensor_info = ... 31 | cepton_sdk.get_sensor_information_by_handle(sensor_handle); 32 | 33 | a = zeros([n_points, 1]); 34 | [timestamps_usec, image_x, distances, image_z, intensities, return_types, flags_tmp] = ... 35 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_get_image_points_data', a, a, a, a, a, a, a); 36 | flags = cepton_sdk.common.unpack_bits(flags_tmp, 8); 37 | 38 | points = cepton_sdk.Points(n_points); 39 | points.timestamps_usec(:) = timestamps_usec; 40 | points.distances(:) = distances; 41 | points.image_positions(:, 1) = image_x; 42 | points.image_positions(:, 2) = image_z; 43 | points.intensities(:) = intensities; 44 | points.return_types(:) = return_types; 45 | points.valid(:) = flags(:, 1); 46 | points.saturated(:) = flags(:, 2); 47 | 48 | points.positions = cepton_sdk.internal.convert_image_points_to_points(points.image_positions, points.distances); 49 | 50 | for key = keys(self.callbacks) 51 | callback = self.callbacks(key{1}); 52 | callback(sensor_info, points); 53 | end 54 | end 55 | end 56 | end 57 | 58 | end 59 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/clear_cache.m: -------------------------------------------------------------------------------- 1 | function clear_cache() 2 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_clear_cache'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/convert_image_points_to_points.m: -------------------------------------------------------------------------------- 1 | function positions = convert_image_points_to_points(image_positions, distances) 2 | focal_length_squared = 1; 3 | hypotenuse_small = sqrt(sum(image_positions.^2, 2) + focal_length_squared); 4 | ratio = distances ./ hypotenuse_small; 5 | n = size(image_positions, 1); 6 | positions = zeros([n, 3]); 7 | positions(:, 1) = -image_positions(:, 1) .* ratio; 8 | positions(:, 2) = ratio; 9 | positions(:, 3) = -image_positions(:, 2) .* ratio; 10 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/errors_listener.m: -------------------------------------------------------------------------------- 1 | function result = errors_listener() 2 | persistent obj 3 | if isempty(obj) 4 | obj = cepton_sdk.internal.ErrorsListener(); 5 | end 6 | result = obj; 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/frames_callback.m: -------------------------------------------------------------------------------- 1 | function result = frames_callback() 2 | persistent obj 3 | if isempty(obj) 4 | obj = cepton_sdk.internal.FramesCallback(); 5 | end 6 | result = obj; 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/update.m: -------------------------------------------------------------------------------- 1 | function update() 2 | cepton_sdk.internal.errors_listener().update(); 3 | cepton_sdk.internal.frames_callback().update(); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/+internal/wait_on_func.m: -------------------------------------------------------------------------------- 1 | function wait_on_func(func, varargin) 2 | default_args = struct(); 3 | default_args.timeout = cepton_sdk.common.None; 4 | args = cepton_sdk.common.parse_args(default_args, varargin{:}); 5 | 6 | if ~cepton_sdk.common.is_none(args.timeout) 7 | t_start = cepton_sdk.get_timestamp(); 8 | end 9 | 10 | while ~func() 11 | cepton_sdk.wait(); 12 | if ~cepton_sdk.common.is_none(args.timeout) 13 | if (cepton_sdk.get_timestamp() - t_start) > args.timeout 14 | error('Timed out!'); 15 | end 16 | end 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/ControlFlag.m: -------------------------------------------------------------------------------- 1 | classdef ControlFlag < uint32 2 | enumeration 3 | DISABLE_NETWORK (2) 4 | ENABLE_MULTIPLE_RETURNS (16) 5 | HOST_TIMESTAMPS (64) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/FramesListener.m: -------------------------------------------------------------------------------- 1 | classdef FramesListener < handle 2 | 3 | properties (Access = private) 4 | callback_id; 5 | points_dict; 6 | end 7 | 8 | methods 9 | function self = FramesListener() 10 | self.points_dict = containers.Map('KeyType', 'uint64', 'ValueType', 'any'); 11 | self.callback_id = cepton_sdk.internal.frames_callback().listen(@self.on_points); 12 | end 13 | 14 | function delete(self) 15 | try 16 | cepton_sdk.internal.frames_callback().unlisten(self.callback_id); 17 | catch 18 | end 19 | end 20 | 21 | function reset(self) 22 | self.points_dict = containers.Map('KeyType', 'uint64', 'ValueType', 'any'); 23 | end 24 | 25 | function result = has_points(self) 26 | result = ~isempty(self.points_dict); 27 | end 28 | 29 | function points_dict = get_points(self, varargin) 30 | cepton_sdk.internal.wait_on_func(@self.has_points, varargin{:}); 31 | points_dict = self.get_points_impl(); 32 | end 33 | end 34 | 35 | methods (Access = private) 36 | function on_points(self, sensor_info, points) 37 | points_list = {}; 38 | if isKey(self.points_dict, sensor_info.serial_number) 39 | points_list = self.points_dict(sensor_info.serial_number); 40 | end 41 | points_list{end + 1} = points; 42 | self.points_dict(sensor_info.serial_number) = points_list; 43 | end 44 | 45 | function points_dict = get_points_impl(self) 46 | points_dict = self.points_dict; 47 | self.reset(); 48 | end 49 | end 50 | 51 | end 52 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/Sensor.m: -------------------------------------------------------------------------------- 1 | classdef Sensor < handle 2 | 3 | properties (SetAccess = protected) 4 | information 5 | end 6 | 7 | methods 8 | function self = Sensor(sensor_info) 9 | self.information = sensor_info; 10 | end 11 | 12 | function result = handle(self) 13 | result = self.information.handle; 14 | end 15 | 16 | function result = serial_number(self) 17 | result = self.information.serial_number; 18 | end 19 | 20 | function update(self) 21 | self.sensor_info = ... 22 | cepton_sdk.get_sensor_information_by_handle(self.handle); 23 | end 24 | 25 | function image_points = get_image_points(self, frame_length) 26 | image_points = ... 27 | cepton_sdk.api.get_sensor_image_points( ... 28 | self.serial_number, t_length); 29 | end 30 | end 31 | 32 | methods (Static) 33 | function obj = create(sensor_serial_number) 34 | sensor_info = cepton_sdk.get_sensor_information(sensor_serial_number); 35 | obj = cepton_sdk.Sensor(sensor_info); 36 | end 37 | 38 | function obj = create_by_index(sensor_index) 39 | sensor_info = ... 40 | cepton_sdk.get_sensor_information_by_index(sensor_index); 41 | obj = cepton_sdk.Sensor(sensor_info); 42 | end 43 | 44 | function obj = create_by_handle(sensor_handle) 45 | sensor_info = ... 46 | cepton_sdk.get_sensor_information_by_handle(sensor_handle); 47 | obj = cepton_sdk.Sensor(sensor_info); 48 | end 49 | end 50 | 51 | end 52 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/SensorFramesListener.m: -------------------------------------------------------------------------------- 1 | classdef SensorFramesListener < handle 2 | 3 | properties (SetAccess = private) 4 | serial_number; 5 | end 6 | 7 | properties (Access = private) 8 | callback_id; 9 | points_list; 10 | 11 | end 12 | 13 | methods 14 | function self = SensorFramesListener(serial_number) 15 | self.serial_number = serial_number; 16 | self.points_list = {}; 17 | self.callback_id = cepton_sdk.internal.frames_callback().listen(@self.on_points); 18 | end 19 | 20 | function delete(self) 21 | try 22 | cepton_sdk.internal.frames_callback().unlisten(self.callback_id); 23 | catch 24 | end 25 | end 26 | 27 | function reset(self) 28 | self.points_list = {}; 29 | end 30 | 31 | function result = has_points(self) 32 | result = ~isempty(self.points_list); 33 | end 34 | 35 | function points_list = get_points(self, varargin) 36 | cepton_sdk.internal.wait_on_func(@self.has_points, varargin{:}); 37 | points_list = self.get_points_impl(); 38 | end 39 | end 40 | 41 | methods (Access = private) 42 | function on_points(self, sensor_info, points) 43 | if sensor_info.serial_number ~= self.serial_number 44 | return; 45 | end 46 | self.points_list{end + 1} = points; 47 | end 48 | 49 | function points_list = get_points_impl(self) 50 | points_list = self.points_list; 51 | self.reset(); 52 | end 53 | end 54 | 55 | end 56 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/SensorModel.m: -------------------------------------------------------------------------------- 1 | classdef SensorModel < int16 2 | enumeration 3 | HR80T (1) 4 | HR80M (2) 5 | HR80W (3) 6 | SORA_200 (4) 7 | VISTA_860 (5) 8 | HR80T_R2 (6) 9 | VISTA_860_GEN2 (7) 10 | FUSION_790 (8) 11 | VISTA_M (9) 12 | VISTA_X (10) 13 | SORA_P60 (11) 14 | VISTA_P60 (12) 15 | VISTA_X15 (13) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/combine_points.m: -------------------------------------------------------------------------------- 1 | function result = combine_points(points_list) 2 | result = points_list{1}.combine(points_list); 3 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/deinitialize.m: -------------------------------------------------------------------------------- 1 | function deinitialize() 2 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_deinitialize'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_control_flags.m: -------------------------------------------------------------------------------- 1 | function result = get_control_flags() 2 | result = cepton_sdk.c.call('cepton_sdk_get_control_flags'); 3 | result = uint32(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_n_sensors.m: -------------------------------------------------------------------------------- 1 | function result = get_n_sensors() 2 | result = cepton_sdk.c.call('cepton_sdk_get_n_sensors'); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_sensor_handle.m: -------------------------------------------------------------------------------- 1 | function result = get_sensor_handle(sensor_serial_number) 2 | result = cepton_sdk.c.call_and_check('cepton_sdk_get_sensor_handle_by_serial_number', sensor_serial_number, 0); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_sensor_information.m: -------------------------------------------------------------------------------- 1 | function sensor_info = get_sensor_information(serial_number) 2 | sensor_handle = cepton_sdk.get_sensor_handle(serial_number); 3 | sensor_info = cepton_sdk.get_sensor_information_by_handle(sensor_handle); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_sensor_information_by_handle.m: -------------------------------------------------------------------------------- 1 | function sensor_info = get_sensor_information_by_handle(sensor_handle) 2 | sensor_info = cepton_sdk.c.call_and_check('cepton_sdk_matlab_get_sensor_information', sensor_handle, struct()); 3 | sensor_info = cepton_sdk.c.convert_sensor_information(sensor_info); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_sensor_information_by_index.m: -------------------------------------------------------------------------------- 1 | function sensor_info = get_sensor_information_by_index(sensor_index) 2 | sensor_info = cepton_sdk.c.call_and_check('cepton_sdk_matlab_get_sensor_information_by_index', sensor_index - 1, struct()); 3 | sensor_info = cepton_sdk.c.convert_sensor_information(sensor_info); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_sensors.m: -------------------------------------------------------------------------------- 1 | function sensors_dict = get_sensors() 2 | %sensors_dict = GET_SENSORS() 3 | % 4 | % Returns attached sensors. 5 | % 6 | % Returns: 7 | % Dictionary of sensors, indexed by serial number. 8 | n_sensors = cepton_sdk.get_n_sensors(); 9 | 10 | sensors_dict = containers.Map('KeyType', 'uint64', 'ValueType', 'any'); 11 | for i_sensor = 1:n_sensors 12 | sensor = cepton_sdk.Sensor.create_by_index(i_sensor); 13 | sensors_dict(sensor.serial_number) = sensor; 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_time.m: -------------------------------------------------------------------------------- 1 | function result = get_time() 2 | if cepton_sdk.is_live() 3 | result = cepton_sdk.get_timestamp(); 4 | else 5 | result = cepton_sdk.capture_replay.get_time(); 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/get_timestamp.m: -------------------------------------------------------------------------------- 1 | function result = get_timestamp() 2 | result = posixtime(datetime('now', 'TimeZone', 'UTC')); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/has_control_flag.m: -------------------------------------------------------------------------------- 1 | function result = has_control_flag(flag) 2 | flag = uint32(flag); 3 | result = cepton_sdk.c.call('cepton_sdk_has_control_flag', flag); 4 | result = logical(result); 5 | end 6 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/has_sensor.m: -------------------------------------------------------------------------------- 1 | function result = has_sensor(serial_number) 2 | try 3 | cepton_sdk.get_sensor_handle(serial_number); 4 | except 5 | result = false; 6 | return 7 | end 8 | result = true; 9 | end 10 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/initialize.m: -------------------------------------------------------------------------------- 1 | function initialize(varargin) 2 | %initialize(capture_path=None, control_flags=0) 3 | % 4 | % Initializes SDK and starts capture replay. 5 | % 6 | % Arguments: 7 | % control_flags: cepton_sdk.ControlFlag 8 | default_args = struct(); 9 | default_args.capture_path = cepton_sdk.common.None; 10 | default_args.control_flags = 0; 11 | args = cepton_sdk.common.parse_args(default_args, varargin{:}); 12 | 13 | control_flags = uint32(args.control_flags); 14 | if ~cepton_sdk.common.is_none(args.capture_path) 15 | control_flags = ... 16 | bitor(control_flags, cepton_sdk.ControlFlag.DISABLE_NETWORK); 17 | end 18 | cepton_sdk.c.call_and_check('cepton_sdk_matlab_initialize', 19, control_flags); 19 | 20 | if ~cepton_sdk.common.is_none(args.capture_path) 21 | cepton_sdk.open_replay(args.capture_path); 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/is_end.m: -------------------------------------------------------------------------------- 1 | function result = is_end() 2 | if cepton_sdk.capture_replay.is_open() 3 | if cepton_sdk.capture_replay.get_enable_loop() 4 | result = false; 5 | else 6 | result = cepton_sdk.capture_replay.is_end(); 7 | end 8 | else 9 | result = false; 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/is_initialized.m: -------------------------------------------------------------------------------- 1 | function result = is_initialized() 2 | result = cepton_sdk.c.call('cepton_sdk_is_initialized'); 3 | result = logical(result); 4 | end 5 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/is_live.m: -------------------------------------------------------------------------------- 1 | function result = is_live() 2 | result = ~cepton_sdk.capture_replay.is_open(); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/is_realtime.m: -------------------------------------------------------------------------------- 1 | function result = is_realtime() 2 | result = cepton_sdk.is_live() | cepton_sdk.capture_replay.is_running(); 3 | end 4 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/listen_frames.m: -------------------------------------------------------------------------------- 1 | function callback_id = listen_frames(varargin) 2 | callback_id = cepton_sdk.internal.frames_callback().listen(varargin{:}); 3 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/open_replay.m: -------------------------------------------------------------------------------- 1 | function open_replay(capture_path) 2 | if cepton_sdk.capture_replay.is_open() 3 | cepton_sdk.capture_replay.close(); 4 | end 5 | cepton_sdk.capture_replay.open(capture_path); 6 | 7 | cepton_sdk.capture_replay.resume_blocking(10); 8 | cepton_sdk.capture_replay.seek(0); 9 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/plot_points.m: -------------------------------------------------------------------------------- 1 | function plot_points(points) 2 | x = points.positions(:, 1); 3 | y = points.positions(:, 2); 4 | z = points.positions(:, 3); 5 | s = 3; 6 | c = [1, 1, 1]; 7 | h = scatter3(x, y, z, s, c, 'filled'); 8 | 9 | fig = gcf(); 10 | ax = gca(); 11 | 12 | % Set background color 13 | fig.Color = 'black'; 14 | 15 | % Disable bounds clipping 16 | ax.Clipping = 'off'; 17 | 18 | % Fix aspect ratio 19 | axis(ax, 'equal'); 20 | axis(ax, 'vis3d'); 21 | 22 | % Disable axes 23 | axis(ax, 'off'); 24 | grid(ax, 'off'); 25 | 26 | % Enable 3d rotation cursor 27 | rotate3d(ax, 'on'); 28 | end 29 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/set_control_flags.m: -------------------------------------------------------------------------------- 1 | function set_control_flags(mask, control_flags) 2 | mask = uint32(mask); 3 | control_flags = uint32(control_flags); 4 | cepton_sdk.c.call_and_check('cepton_sdk_set_control_flags', mask, control_flags); 5 | end 6 | -------------------------------------------------------------------------------- /matlab/+cepton_sdk/unlisten_frames.m: -------------------------------------------------------------------------------- 1 | function unlisten_frames(varargin) 2 | cepton_sdk.internal.frames_callback().unlisten(varargin{:}); 3 | end -------------------------------------------------------------------------------- /matlab/+cepton_sdk/wait.m: -------------------------------------------------------------------------------- 1 | function wait(t_length_tmp) 2 | if nargin >= 1 3 | t_length = t_length_tmp; 4 | else 5 | t_length = 0.1; 6 | end 7 | 8 | if cepton_sdk.is_end() 9 | error('EOF'); 10 | end 11 | 12 | t = cepton_sdk.get_time() + t_length; 13 | while cepton_sdk.get_time() < t 14 | if cepton_sdk.is_realtime() 15 | pause(0.1); 16 | else 17 | if cepton_sdk.capture_replay.is_end() 18 | break; 19 | end 20 | cepton_sdk.capture_replay.resume_blocking(0.1); 21 | end 22 | cepton_sdk.internal.update(); 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /matlab/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /matlab/README.md: -------------------------------------------------------------------------------- 1 | # Cepton MATLAB SDK 2 | 3 | ## Installation 4 | 5 | Ensure that you have a c compiler installed: . 6 | 7 | In MATLAB, double-click `cepton_sdk.mltbx` to install the toolbox. 8 | 9 | To test the installation, run 10 | 11 | ```matlab 12 | cepton_sdk.is_initialized() 13 | ``` 14 | 15 | ## Getting Started 16 | 17 | In MATLAB, change to the `samples` folder. Open, and run the sample scripts. 18 | -------------------------------------------------------------------------------- /matlab/VERSION: -------------------------------------------------------------------------------- 1 | 1.18.2 2 | -------------------------------------------------------------------------------- /matlab/lib/linux-aarch64/libcepton_sdk_matlab.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/linux-aarch64/libcepton_sdk_matlab.so -------------------------------------------------------------------------------- /matlab/lib/linux-arm/libcepton_sdk_matlab.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/linux-arm/libcepton_sdk_matlab.so -------------------------------------------------------------------------------- /matlab/lib/linux-i386/libcepton_sdk_matlab.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/linux-i386/libcepton_sdk_matlab.so -------------------------------------------------------------------------------- /matlab/lib/linux-x86_64/libcepton_sdk_matlab.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/linux-x86_64/libcepton_sdk_matlab.so -------------------------------------------------------------------------------- /matlab/lib/osx/libcepton_sdk_matlab.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/osx/libcepton_sdk_matlab.dylib -------------------------------------------------------------------------------- /matlab/lib/win64/cepton_sdk_matlab.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/win64/cepton_sdk_matlab.dll -------------------------------------------------------------------------------- /matlab/lib/win64/cepton_sdk_matlab.imp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/lib/win64/cepton_sdk_matlab.imp.lib -------------------------------------------------------------------------------- /matlab/samples/+common/get_sample_capture_path.m: -------------------------------------------------------------------------------- 1 | function result = get_sample_capture_path() 2 | result = '1.pcap'; 3 | end 4 | -------------------------------------------------------------------------------- /matlab/samples/1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/samples/1.pcap -------------------------------------------------------------------------------- /matlab/samples/1.pcap.cep0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/matlab/samples/1.pcap.cep0 -------------------------------------------------------------------------------- /matlab/samples/capture_replay.m: -------------------------------------------------------------------------------- 1 | %% 2 | % Variables 3 | capture_path = common.get_sample_capture_path(); 4 | 5 | % Initialize 6 | if cepton_sdk.is_initialized() 7 | cepton_sdk.deinitialize(); 8 | end 9 | options = struct(); 10 | options.capture_path = capture_path; 11 | cepton_sdk.initialize(options); 12 | 13 | %% 14 | % Get start time (seconds since epoch) 15 | t_start = cepton_sdk.capture_replay.get_start_time() 16 | 17 | % Get length (seconds) 18 | t_length = cepton_sdk.capture_replay.get_length() 19 | 20 | % Seek to relative position (seconds) 21 | cepton_sdk.capture_replay.seek(1); 22 | 23 | % Get relative position (seconds) 24 | t = cepton_sdk.capture_replay.get_position() 25 | -------------------------------------------------------------------------------- /matlab/samples/multiple_sensors.m: -------------------------------------------------------------------------------- 1 | %% 2 | % Variables 3 | capture_path = common.get_sample_capture_path(); 4 | 5 | %% 6 | % Initialize 7 | if cepton_sdk.is_initialized() 8 | cepton_sdk.deinitialize(); 9 | end 10 | options = struct(); 11 | options.capture_path = capture_path; 12 | cepton_sdk.initialize(options); 13 | 14 | % Get sensors 15 | sensors_dict = cepton_sdk.get_sensors(); 16 | 17 | %% Get points 18 | listener = cepton_sdk.FramesListener(); 19 | points_dict = listener.get_points(); 20 | delete(listener); 21 | points_list = values(points_dict); 22 | points_list = points_list{1}; 23 | points = points_list{1}; 24 | 25 | % Plot 26 | cepton_sdk.plot_points(points); 27 | -------------------------------------------------------------------------------- /matlab/samples/single_live_sensor.m: -------------------------------------------------------------------------------- 1 | %% 2 | % Initialize 3 | if cepton_sdk.is_initialized() 4 | cepton_sdk.deinitialize(); 5 | end 6 | cepton_sdk.initialize(); 7 | cepton_sdk.wait(3); 8 | 9 | % Get sensor 10 | sensors_dict = cepton_sdk.get_sensors(); 11 | sensors_list = values(sensors_dict); 12 | sensor = sensors_list{1}; 13 | disp(sensor.information) 14 | 15 | %% Get points 16 | listener = cepton_sdk.SensorFramesListener(sensor.serial_number); 17 | points_list = listener.get_points(); 18 | delete(listener); 19 | points = points_list{1}; 20 | 21 | % Plot 22 | cepton_sdk.plot_points(points); 23 | -------------------------------------------------------------------------------- /matlab/samples/single_sensor.m: -------------------------------------------------------------------------------- 1 | %% 2 | % Variables 3 | capture_path = common.get_sample_capture_path(); 4 | 5 | %% 6 | % Initialize 7 | if cepton_sdk.is_initialized() 8 | cepton_sdk.deinitialize(); 9 | end 10 | options = struct(); 11 | options.capture_path = capture_path; 12 | cepton_sdk.initialize(options); 13 | 14 | % Get sensor 15 | sensors_dict = cepton_sdk.get_sensors(); 16 | sensors_list = values(sensors_dict); 17 | sensor = sensors_list{1}; 18 | disp(sensor.information); 19 | 20 | %% Get points 21 | listener = cepton_sdk.SensorFramesListener(sensor.serial_number); 22 | points_list = listener.get_points(); 23 | delete(listener); 24 | points = points_list{1}; 25 | 26 | % Plot 27 | cepton_sdk.plot_points(points); 28 | -------------------------------------------------------------------------------- /matlab/source/cepton_sdk_matlab.h: -------------------------------------------------------------------------------- 1 | #ifndef CEPTON_SDK_MATLAB_H 2 | #define CEPTON_SDK_MATLAB_H 3 | 4 | #ifndef CEPTON_SIMPLE 5 | #define CEPTON_SIMPLE 6 | #endif 7 | #include "cepton_sdk.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #ifndef CEPTON_SDK_EXPORT 14 | #define CEPTON_SDK_EXPORT 15 | #endif 16 | 17 | /* 18 | * Duplicating some functions to provide interface for MATLAB. 19 | * 20 | * MATLAB doesn't support: 21 | * - Nested structs. 22 | * - Function pointers. 23 | * - Unions. 24 | */ 25 | 26 | CEPTON_SDK_EXPORT CeptonSensorErrorCode 27 | cepton_sdk_matlab_initialize(int ver, CeptonSDKControl control_flags); 28 | CEPTON_SDK_EXPORT CeptonSensorErrorCode cepton_sdk_matlab_deinitialize(); 29 | CEPTON_SDK_EXPORT CeptonSensorErrorCode cepton_sdk_matlab_clear_cache(); 30 | 31 | CEPTON_SDK_EXPORT CeptonSensorErrorCode 32 | cepton_sdk_matlab_get_sensor_information( 33 | CeptonSensorHandle sensor_handle, 34 | struct CeptonSensorInformation *const sensor_info); 35 | CEPTON_SDK_EXPORT CeptonSensorErrorCode 36 | cepton_sdk_matlab_get_sensor_information_by_index( 37 | int sensor_index, struct CeptonSensorInformation *const sensor_info); 38 | 39 | CEPTON_SDK_EXPORT int cepton_sdk_matlab_has_error(); 40 | CEPTON_SDK_EXPORT CeptonSensorErrorCode cepton_sdk_matlab_get_error( 41 | CeptonSensorHandle *const handle, CeptonSensorErrorCode *const error_code, 42 | size_t *const msg_size); 43 | 44 | CEPTON_SDK_EXPORT int cepton_sdk_matlab_has_image_points(); 45 | CEPTON_SDK_EXPORT CeptonSensorErrorCode cepton_sdk_matlab_get_image_points( 46 | CeptonSensorHandle *const sensor_handle, size_t *const n_points); 47 | CEPTON_SDK_EXPORT CeptonSensorErrorCode cepton_sdk_matlab_get_image_points_data( 48 | uint64_t *const timestamps, float *const image_x, float *const distances, 49 | float *const image_z, float *const intensities, uint8_t *const return_types, 50 | uint8_t *const flags); 51 | 52 | #ifdef __cplusplus 53 | } // extern "C" 54 | #endif 55 | 56 | #endif /* CEPTON_SDK_MATLAB_H */ 57 | -------------------------------------------------------------------------------- /matlab/source/matlab.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "cepton_sdk.h" 10 | #include "cepton_sdk_matlab.h" 11 | 12 | namespace cepton_sdk_matlab { 13 | 14 | struct Error { 15 | CeptonSensorHandle handle; 16 | CeptonSensorErrorCode error_code; 17 | std::string msg; 18 | std::shared_ptr data; 19 | std::size_t data_size; 20 | }; 21 | 22 | class ErrorsListener { 23 | public: 24 | void clear(); 25 | bool is_empty(); 26 | std::shared_ptr queue_error(); 27 | void clear_queued_error() { m_queued_error.reset(); } 28 | std::shared_ptr get_queued_error() { return m_queued_error; } 29 | 30 | void on_error(CeptonSensorHandle handle, CeptonSensorErrorCode error_code, 31 | const char *const error_msg, const void *const error_data, 32 | size_t error_data_size); 33 | 34 | private: 35 | std::timed_mutex m_mutex; 36 | std::deque> m_errors; 37 | std::shared_ptr m_queued_error; 38 | }; 39 | 40 | extern ErrorsListener errors_listener; 41 | 42 | struct Frame { 43 | CeptonSensorHandle handle; 44 | std::vector image_points; 45 | }; 46 | 47 | class FramesListener { 48 | public: 49 | void clear(); 50 | bool is_empty(); 51 | std::shared_ptr queue_frame(); 52 | void clear_queued_frame() { m_queued_frame.reset(); } 53 | std::shared_ptr get_queued_frame() { return m_queued_frame; } 54 | 55 | void on_image_points(CeptonSensorHandle handle, size_t n_points, 56 | const CeptonSensorImagePoint *p_image_points); 57 | 58 | private: 59 | std::timed_mutex m_mutex; 60 | std::deque> m_frames; 61 | std::shared_ptr m_queued_frame; 62 | }; 63 | 64 | extern FramesListener frames_listener; 65 | 66 | } // namespace cepton_sdk_matlab 67 | -------------------------------------------------------------------------------- /python/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /python/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include cepton_util/VERSION 2 | recursive-include cepton_sdk/lib * 3 | -------------------------------------------------------------------------------- /python/README.md: -------------------------------------------------------------------------------- 1 | # Cepton Python SDK 2 | 3 | ## Installation 4 | 5 | ```sh 6 | pip3 install --user -U cepton_sdk[samples] 7 | ``` 8 | 9 | ## Getting Started 10 | 11 | See `samples`. -------------------------------------------------------------------------------- /python/cepton_sdk/__init__.py: -------------------------------------------------------------------------------- 1 | from cepton_util import __author__, __version__ # noqa isort:skip 2 | 3 | import cepton_sdk.common 4 | 5 | _all_builder = cepton_sdk.common.AllBuilder(__name__) 6 | 7 | 8 | def __check_version(): 9 | c_version = cepton_sdk.c.get_version_string().split(".")[:2] 10 | version = __version__.split(".")[:2] 11 | if c_version != version: 12 | raise RuntimeError( 13 | "Library versions do not match: {} != {}".format(c_version, version)) 14 | 15 | 16 | try: 17 | import cepton_sdk.c 18 | from cepton_sdk.c import C_ErrorCode, C_Error, C_Warning 19 | except OSError: 20 | # Allow loading python only parts of library 21 | pass 22 | else: 23 | from cepton_sdk.api import * 24 | from cepton_sdk.core import * 25 | from cepton_sdk.point import * 26 | from cepton_sdk.sensor import * 27 | import cepton_sdk.capture_replay 28 | 29 | __check_version() 30 | 31 | __all__ = _all_builder.get() 32 | -------------------------------------------------------------------------------- /python/cepton_sdk/capture_replay.py: -------------------------------------------------------------------------------- 1 | import ctypes 2 | import os.path 3 | 4 | import cepton_sdk.c 5 | from cepton_sdk.common import * 6 | 7 | _all_builder = AllBuilder(__name__) 8 | 9 | 10 | def is_open(): 11 | return bool(cepton_sdk.c.c_capture_replay_is_open()) 12 | 13 | 14 | def open(capture_path): 15 | capture_path = capture_path.encode("utf-8") 16 | cepton_sdk.c.c_capture_replay_open(capture_path) 17 | 18 | 19 | def close(): 20 | try: 21 | cepton_sdk.c.c_capture_replay_close() 22 | except IOError as e: 23 | warnings.warn(e) 24 | 25 | 26 | def get_filename(): 27 | return cepton_sdk.c.c_capture_replay_get_filename().decode("utf-8") 28 | 29 | 30 | def get_start_time(): 31 | return 1e-6 * float(cepton_sdk.c.c_capture_replay_get_start_time()) 32 | 33 | 34 | def get_position(): 35 | return float(cepton_sdk.c.c_capture_replay_get_position()) 36 | 37 | 38 | def get_time(): 39 | return get_start_time() + get_position() 40 | 41 | 42 | def get_length(): 43 | return float(cepton_sdk.c.c_capture_replay_get_length()) 44 | 45 | 46 | def is_end(): 47 | return bool(cepton_sdk.c.c_capture_replay_is_end()) 48 | 49 | 50 | def seek(t): 51 | cepton_sdk.c.c_capture_replay_seek(t) 52 | 53 | 54 | def seek_relative(t): 55 | t += get_position() 56 | seek(t) 57 | 58 | 59 | def get_enable_loop(): 60 | return bool(cepton_sdk.c.c_capture_replay_get_enable_loop()) 61 | 62 | 63 | def set_enable_loop(enable_loop): 64 | cepton_sdk.c.c_capture_replay_set_enable_loop(enable_loop) 65 | 66 | 67 | def get_speed(): 68 | return float(cepton_sdk.c.c_capture_replay_get_speed()) 69 | 70 | 71 | def set_speed(speed): 72 | cepton_sdk.c.c_capture_replay_set_speed(speed) 73 | 74 | 75 | def resume_blocking(duration=None): 76 | if duration is None: 77 | cepton_sdk.c.c_capture_replay_resume_blocking_once() 78 | else: 79 | cepton_sdk.c.c_capture_replay_resume_blocking(duration) 80 | 81 | 82 | def is_running(): 83 | return bool(cepton_sdk.c.c_capture_replay_is_running()) 84 | 85 | 86 | def resume(): 87 | cepton_sdk.c.c_capture_replay_resume() 88 | 89 | 90 | def pause(): 91 | cepton_sdk.c.c_capture_replay_pause() 92 | 93 | 94 | __all__ = _all_builder.get() 95 | -------------------------------------------------------------------------------- /python/cepton_sdk/common/__init__.py: -------------------------------------------------------------------------------- 1 | from cepton_sdk.common.general import * 2 | -------------------------------------------------------------------------------- /python/cepton_sdk/common/transform.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | import transforms3d 3 | import transforms3d.quaternions 4 | 5 | from cepton_sdk.common import * 6 | 7 | _all_builder = AllBuilder(__name__) 8 | 9 | 10 | class Quaternion: 11 | def __init__(self): 12 | self.s = 0.0 13 | self.v = numpy.zeros([3]) 14 | 15 | @classmethod 16 | def from_vector(cls, v, scalar_first=False): 17 | self = cls() 18 | if scalar_first: 19 | self.s = v[0] 20 | self.v[:] = v[1:] 21 | else: 22 | self.v[:] = v[:3] 23 | self.s = v[3] 24 | return self 25 | 26 | def to_vector(self, scalar_first=False): 27 | result = numpy.zeros([4]) 28 | if scalar_first: 29 | result[0] = self.s 30 | result[1:] = self.v 31 | else: 32 | result[:3] = self.v 33 | result[3] = self.s 34 | return result 35 | 36 | @classmethod 37 | def from_matrix(self, mat): 38 | return self.from_vector( 39 | transforms3d.quaternions.mat2quat(mat), scalar_first=True) 40 | 41 | def to_matrix(self): 42 | return transforms3d.quaternions.quat2mat( 43 | self.to_vector(scalar_first=True)) 44 | 45 | def apply(self, v): 46 | return numpy.matmul(self.to_matrix(), v.transpose()).transpose() 47 | 48 | 49 | class Transform3d: 50 | def __init__(self): 51 | self.rotation = Quaternion() 52 | self.translation = numpy.zeros([3]) 53 | 54 | @classmethod 55 | def from_matrix(cls, mat): 56 | self = cls() 57 | self.rotation = Quaternion.from_matrix(mat[:3, :3]) 58 | self.translation = mat[3, :3] 59 | return self 60 | 61 | def to_matrix(self): 62 | result = numpy.identity(4) 63 | result[:3, :3] = self.rotation.to_matrix() 64 | result[:3, 3] = self.translation 65 | return result 66 | 67 | def apply(self, v): 68 | return self.rotation.apply(v) + self.translation 69 | 70 | 71 | __all__ = _all_builder.get() 72 | -------------------------------------------------------------------------------- /python/cepton_sdk/lib/linux-aarch64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/linux-aarch64/libcepton_sdk.so -------------------------------------------------------------------------------- /python/cepton_sdk/lib/linux-arm/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/linux-arm/libcepton_sdk.so -------------------------------------------------------------------------------- /python/cepton_sdk/lib/linux-i386/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/linux-i386/libcepton_sdk.so -------------------------------------------------------------------------------- /python/cepton_sdk/lib/linux-x86_64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/linux-x86_64/libcepton_sdk.so -------------------------------------------------------------------------------- /python/cepton_sdk/lib/osx/libcepton_sdk.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/osx/libcepton_sdk.dylib -------------------------------------------------------------------------------- /python/cepton_sdk/lib/win64/cepton_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/win64/cepton_sdk.dll -------------------------------------------------------------------------------- /python/cepton_sdk/lib/win64/cepton_sdk.imp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/cepton_sdk/lib/win64/cepton_sdk.imp.lib -------------------------------------------------------------------------------- /python/cepton_sdk/plot.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | import vispy.app 3 | import vispy.scene 4 | import vispy.visuals.transforms 5 | from cepton_sdk.common import * 6 | 7 | _all_builder = AllBuilder(__name__) 8 | 9 | 10 | def plot_positions(positions, colors=None, sizes=None): 11 | # Initialize canvas 12 | options = { 13 | "keys": "interactive", 14 | "position": [0, 0], 15 | } 16 | canvas = vispy.scene.SceneCanvas(**options) 17 | canvas.show() 18 | 19 | # Initialize view 20 | view = canvas.central_widget.add_view() 21 | view.camera = vispy.scene.cameras.make_camera("turntable") 22 | view.camera.azimuth = 0 23 | view.camera.depth_value = 1e4 24 | view.camera.elevation = 90 25 | view.camera.fov = 0 26 | view.camera.scale_factor = 100 27 | 28 | # Plot points 29 | points_visual = vispy.scene.visuals.Markers() 30 | points_visual.antialias = 0 31 | view.add(points_visual) 32 | positions = positions - numpy.mean(positions, axis=0) 33 | if colors is None: 34 | colors = numpy.ones([positions.shape[0], 4]) 35 | if sizes is None: 36 | sizes = numpy.full([positions.shape[0]], 2) 37 | options = { 38 | "edge_width": 0, 39 | "face_color": colors, 40 | "pos": positions, 41 | "size": sizes, 42 | } 43 | points_visual.set_data(**options) 44 | 45 | # Run 46 | vispy.app.run() 47 | 48 | 49 | def plot_points(points, show_invalid=False): 50 | colors = numpy.ones([len(points), 4]) 51 | if show_invalid: 52 | colors[numpy.logical_not(points.valid), :] = [1, 0, 0, 1] 53 | else: 54 | colors[numpy.logical_not(points.valid), :] = 0 55 | 56 | sizes = numpy.full([len(points)], 2) 57 | 58 | plot_positions(points.positions, colors=colors, sizes=sizes) 59 | 60 | 61 | __all__ = _all_builder.get() 62 | -------------------------------------------------------------------------------- /python/cepton_util/VERSION: -------------------------------------------------------------------------------- 1 | 1.18.2 2 | -------------------------------------------------------------------------------- /python/cepton_util/__init__.py: -------------------------------------------------------------------------------- 1 | import cepton_util.common 2 | import pathlib 3 | 4 | version_path = pathlib.Path(__file__).resolve().parent / "VERSION" 5 | __version__ = version_path.open().read().strip() 6 | 7 | __author__ = "Cepton Technologies" 8 | 9 | _all_builder = cepton_util.common.AllBuilder(__name__) 10 | 11 | from cepton_util.common import * # noqa isort:skip 12 | 13 | __all__ = _all_builder.get() 14 | -------------------------------------------------------------------------------- /python/cepton_util/gui.py: -------------------------------------------------------------------------------- 1 | import signal 2 | 3 | import imageio 4 | 5 | import cepton_util.common 6 | 7 | _all_builder = cepton_util.common.AllBuilder(__name__) 8 | 9 | from PyQt5.QtCore import * # noqa isort:skip 10 | from PyQt5.QtGui import * # noqa isort:skip 11 | from PyQt5.QtWidgets import * # noqa isort:skip 12 | 13 | from cepton_util.common import * # noqa isort:skip 14 | 15 | 16 | def create_toolbox_header(name): 17 | label = QLabel(name) 18 | label.setAlignment(Qt.AlignLeft) 19 | font = QFont() 20 | font.setBold(True) 21 | label.setFont(font) 22 | return label 23 | 24 | 25 | def create_expanding_label(name): 26 | label = QLabel(name) 27 | label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) 28 | return label 29 | 30 | 31 | def clear_layout(layout): 32 | while layout.count(): 33 | layout.takeAt(0).widget().deleteLater() 34 | 35 | 36 | class VariableLabel(QLabel): 37 | def __init__(self, *args, **kwargs): 38 | super().__init__(*args, **kwargs) 39 | 40 | self.setTextInteractionFlags(Qt.TextSelectableByMouse) 41 | 42 | def paintEvent(self, event): 43 | painter = QPainter(self) 44 | 45 | metrics = QFontMetrics(self.font()) 46 | elided = metrics.elidedText(self.text(), Qt.ElideRight, self.width()) 47 | 48 | painter.drawText(self.rect(), self.alignment(), elided) 49 | 50 | 51 | class ButtonLineEdit(QLineEdit): 52 | def __init__(self, icon, parent=None): 53 | super().__init__(parent) 54 | 55 | self.button = QToolButton(self) 56 | self.button.setIcon(icon) 57 | self.button.setStyleSheet('border: 0px; padding: 0px;') 58 | self.button.setCursor(Qt.ArrowCursor) 59 | 60 | frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth) 61 | button_size = self.button.sizeHint() 62 | self.setStyleSheet( 63 | 'QLineEdit {padding-right: %dpx; }' % 64 | (button_size.width() + frame_width + 1)) 65 | self.setMinimumSize( 66 | max(self.minimumSizeHint().width(), 67 | button_size.width() + frame_width*2 + 2), 68 | max(self.minimumSizeHint().height(), 69 | button_size.height() + frame_width*2 + 2)) 70 | 71 | def resizeEvent(self, event): 72 | frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth) 73 | button_size = self.button.sizeHint() 74 | self.button.move( 75 | self.rect().right() - frame_width - button_size.width(), 76 | (self.rect().bottom() - button_size.height() + 1)/2) 77 | super().resizeEvent(event) 78 | 79 | 80 | __all__ = _all_builder.get() 81 | -------------------------------------------------------------------------------- /python/samples/1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/samples/1.pcap -------------------------------------------------------------------------------- /python/samples/1.pcap.cep0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/python/samples/1.pcap.cep0 -------------------------------------------------------------------------------- /python/samples/advanced/listen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Sample script for the different methods of getting points. 4 | """ 5 | 6 | import numpy 7 | 8 | import cepton_sdk 9 | from common import * 10 | 11 | 12 | def on_frame(serial_number, points): 13 | print("Received {} points from sensor {}".format( 14 | len(points), serial_number)) 15 | 16 | 17 | if __name__ == "__main__": 18 | # Initialize 19 | cepton_sdk.initialize(capture_path=get_sample_capture_path()) 20 | sensors_dict = cepton_sdk.get_sensors() 21 | sensor = next(iter(sensors_dict.values())) 22 | 23 | callback_id = cepton_sdk.listen_frames(on_frame) 24 | cepton_sdk.wait(0.1) 25 | cepton_sdk.unlisten_frames(callback_id) 26 | 27 | # Get next frames for all sensors. Wait until data is available. 28 | listener = cepton_sdk.FramesListener() 29 | points_dict = listener.get_points() 30 | del listener 31 | 32 | # Get next frames for single sensor. Wait until data is available. 33 | listener = cepton_sdk.SensorFramesListener(sensor.serial_number) 34 | points_list = listener.get_points() 35 | del listener 36 | 37 | # Get large chunk of data 38 | listener = cepton_sdk.FramesListener() 39 | cepton_sdk.wait(10) 40 | points_dict = listener.get_points() 41 | del listener 42 | points = cepton_sdk.combine_points(points_dict[sensor.serial_number]) 43 | print("Received {} seconds of data from sensor {}".format( 44 | numpy.ptp(points.timestamps), sensor.serial_number)) 45 | -------------------------------------------------------------------------------- /python/samples/common.py: -------------------------------------------------------------------------------- 1 | """Common methods used by sample code.""" 2 | 3 | import os.path 4 | 5 | import numpy 6 | 7 | from cepton_util.common import * 8 | 9 | 10 | def get_sample_capture_path(): 11 | module_dir_path = os.path.dirname(__file__) 12 | capture_path = fix_path(os.path.join(module_dir_path, "1.pcap")) 13 | return capture_path 14 | 15 | 16 | def print_points(points): 17 | options = { 18 | "precision": 3, 19 | "suppress_small": True, 20 | } 21 | s = numpy.array_str(points.positions, **options) 22 | print("Positions [m]:\n{}".format(s)) 23 | -------------------------------------------------------------------------------- /python/samples/multiple_sensors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Sample script for getting points from multiple sensors simultaneously. 4 | """ 5 | 6 | import pprint 7 | 8 | import cepton_sdk 9 | import cepton_sdk.plot 10 | from common import * 11 | 12 | if __name__ == "__main__": 13 | # Variables 14 | capture_path = get_sample_capture_path() 15 | 16 | # Initialize 17 | cepton_sdk.initialize(capture_path=capture_path, enable_wait=True) 18 | 19 | # Get sensors 20 | sensors_dict = cepton_sdk.get_sensors() 21 | 22 | # Get points 23 | listener = cepton_sdk.FramesListener() 24 | points_dict = listener.get_points() 25 | del listener 26 | points_list = next(iter(points_dict.values())) 27 | points = points_list[0] 28 | 29 | # Plot 30 | cepton_sdk.plot.plot_points(points) 31 | -------------------------------------------------------------------------------- /python/samples/single_sensor.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Sample script for getting points from a single sensor. 4 | """ 5 | 6 | import pprint 7 | 8 | import numpy 9 | 10 | import cepton_sdk 11 | import cepton_sdk.plot 12 | from common import * 13 | 14 | if __name__ == "__main__": 15 | # Variables 16 | capture_path = get_sample_capture_path() 17 | 18 | # Initialize 19 | cepton_sdk.initialize(capture_path=capture_path, enable_wait=True) 20 | 21 | # Get sensor 22 | sensor = cepton_sdk.Sensor.create_by_index(0) 23 | pprint.pprint(sensor.information.to_dict()) 24 | 25 | # Get points 26 | listener = cepton_sdk.SensorFramesListener(sensor.serial_number) 27 | points_list = listener.get_points() 28 | del listener 29 | points = points_list[0] 30 | 31 | # Plot 32 | cepton_sdk.plot.plot_points(points) 33 | -------------------------------------------------------------------------------- /python/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | -------------------------------------------------------------------------------- /python/setup.py: -------------------------------------------------------------------------------- 1 | import platform 2 | import sys 3 | import pathlib 4 | 5 | import setuptools 6 | 7 | if __name__ == "__main__": 8 | setuptools.setup( 9 | name="cepton_sdk", 10 | version=open("cepton_util/VERSION").read().strip(), 11 | description="Cepton Python SDK", 12 | long_description=open("README.md").read(), 13 | long_description_content_type="text/markdown", 14 | url="https://github.com/ceptontech/cepton_sdk_redist", 15 | author="Cepton Technologies", 16 | author_email="support@cepton.com", 17 | classifiers=[ 18 | "Development Status :: 5 - Production/Stable", 19 | "Programming Language :: Python :: 3", 20 | ], 21 | keywords="cepton sdk", 22 | python_requires=">=3.3", 23 | packages=setuptools.find_packages(), 24 | include_package_data=True, 25 | install_requires=[ 26 | "numpy", 27 | "pyserial", 28 | "laspy", 29 | "plyfile", 30 | "transforms3d" 31 | ], 32 | extras_require={ 33 | "samples": [ 34 | "imageio-ffmpeg", 35 | "imageio", 36 | "netifaces", 37 | "plyfile", 38 | "pyqt5", 39 | "uuid", 40 | "vispy", 41 | ], 42 | }, 43 | scripts=[ 44 | "tools/cepton_capture_gui.py", 45 | "tools/cepton_capture.py", 46 | "tools/cepton_clip.py", 47 | "tools/cepton_export_serial.py", 48 | "tools/cepton_export.py", 49 | "tools/cepton_georeference.py", 50 | "tools/cepton_list_sensors.py", 51 | ] 52 | ) 53 | -------------------------------------------------------------------------------- /python/tools/cepton_capture.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | import os 5 | import sys 6 | 7 | from cepton_util.capture import * 8 | from cepton_util.common import * 9 | 10 | 11 | def main(): 12 | description = """ 13 | Captures camera, network, ROS, and serial. 14 | 15 | Dependencies: ffmpeg, wireshark. 16 | """ 17 | parser = argparse.ArgumentParser( 18 | usage="%(prog)s [OPTIONS] output_dir", 19 | description=description, formatter_class=argparse.RawTextHelpFormatter) 20 | OutputDataDirectory.add_arguments(parser) 21 | parser.add_argument( 22 | "--network", action="store_true", help="Capture network.") 23 | parser.add_argument("--camera_devices") 24 | parser.add_argument("--network_interface") 25 | parser.add_argument("--ros_topics") 26 | parser.add_argument("--settings_dir") 27 | parser.add_argument("--serial_ports") 28 | args = parser.parse_args() 29 | 30 | capture = OutputDataDirectory.from_arguments(args) 31 | print("Capture Path: {}".format(capture.path)) 32 | 33 | settings_dir = fix_path(args.settings_dir) 34 | if settings_dir is None: 35 | settings_dir = os.getcwd() 36 | print("Settings Path: {}".format(settings_dir)) 37 | capture.copy_settings(settings_dir) 38 | 39 | if args.camera_devices is not None: 40 | camera_devices = sorted(args.camera_devices.split(",")) 41 | print("Camera Devices: {}".format(camera_devices)) 42 | for i, device in enumerate(camera_devices): 43 | device = device.strip() 44 | camera_capture = CameraCapture(device, capture.camera_path(i)) 45 | 46 | if args.network: 47 | network_interface = args.network_interface 48 | if network_interface is None: 49 | network_interface = find_network_interface() 50 | print("Network Interface: {}".format(network_interface)) 51 | network_capture = NetworkCapture( 52 | capture.network_path, interface=network_interface) 53 | 54 | if args.ros_topics is not None: 55 | ros_topics = sorted(args.ros_topics.split(",")) 56 | print("ROS Topics: {}".format(ros_topics)) 57 | ROSCapture(ros_topics, capture.ros_path) 58 | 59 | if args.serial_ports is not None: 60 | serial_ports = sorted(args.serial_ports.split(",")) 61 | print("Serial Ports: {}".format(serial_ports)) 62 | for i, port in enumerate(serial_ports): 63 | SerialCapture(port, capture.serial_path(i)) 64 | 65 | print("Capturing...") 66 | capture.wait() 67 | print("Processing...") 68 | 69 | 70 | if __name__ == "__main__": 71 | main() 72 | -------------------------------------------------------------------------------- /python/tools/cepton_clip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | import datetime 5 | import os 6 | import shutil 7 | import subprocess 8 | import sys 9 | 10 | from cepton_util.capture import * 11 | from cepton_util.common import * 12 | 13 | 14 | def main(): 15 | description = """ 16 | Clips camera, network, and ROS. 17 | 18 | Dependencies: ffmpeg, wireshark. 19 | """ 20 | parser = argparse.ArgumentParser( 21 | usage="%(prog)s [OPTIONS]", 22 | description=description, formatter_class=argparse.RawTextHelpFormatter) 23 | parser.add_argument("-i", "--input", required=True, 24 | help="Input directory.") 25 | parser.add_argument("-o", "--output", help="Output directory.") 26 | parser.add_argument("--duration") 27 | parser.add_argument("--end") 28 | parser.add_argument("--start") 29 | args = parser.parse_args() 30 | 31 | input_dir = fix_path(args.input) 32 | if args.output is None: 33 | output_dir = input_dir + "_clip" 34 | else: 35 | output_dir = fix_path(args.output) 36 | print("Output Directory: {}".format(output_dir)) 37 | 38 | start = 0 39 | if args.start is not None: 40 | start = parse_time_hms(args.start) 41 | end = None 42 | if args.end is not None: 43 | end = parse_time_hms(args.end) 44 | elif args.duration is not None: 45 | end = start + parse_time_hms(args.duration) 46 | clip_capture(input_dir, output_dir, start=start, end=end) 47 | 48 | 49 | if __name__ == "__main__": 50 | main() 51 | -------------------------------------------------------------------------------- /python/tools/cepton_export_serial.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import argparse 3 | 4 | import cepton_sdk 5 | import cepton_sdk.load 6 | from cepton_util.common import * 7 | 8 | 9 | def main(): 10 | parser = argparse.ArgumentParser( 11 | usage="%(prog)s [OPTIONS] output_path", formatter_class=argparse.RawTextHelpFormatter) 12 | parser.add_argument("output", help="Output path.") 13 | cepton_sdk.load.Loader.add_arguments(parser) 14 | parser.add_argument("--duration", default="-1", 15 | help="Export duration (if negative, export entire capture file).") 16 | parser.add_argument("--version", action="version", 17 | version="cepton_sdk {}".format(cepton_sdk.__version__)) 18 | args = parser.parse_args() 19 | 20 | duration = parse_time_hms(args.duration) 21 | output_path = fix_path(args.output) 22 | 23 | # Initialize 24 | loader = cepton_sdk.load.Loader.from_arguments(args) 25 | loader.initialize() 26 | 27 | listener = cepton_sdk.SerialLinesListener() 28 | cepton_sdk.wait(duration) 29 | lines_dict = listener.get_lines() 30 | if not lines_dict: 31 | return 32 | lines = next(iter(lines_dict.values())) 33 | with open(output_path, "wb") as f: 34 | f.writelines(lines) 35 | 36 | 37 | if __name__ == "__main__": 38 | main() 39 | -------------------------------------------------------------------------------- /python/tools/cepton_list_sensors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Sample script to list attached sensors. 4 | """ 5 | 6 | import argparse 7 | import pprint 8 | 9 | import cepton_sdk 10 | from cepton_util.common import * 11 | 12 | if __name__ == "__main__": 13 | parser = argparse.ArgumentParser(usage="%(prog)s [OPTIONS]") 14 | parser.add_argument("--capture_path") 15 | parser.add_argument("--version", action="version", 16 | version="cepton_sdk {}".format(cepton_sdk.__version__)) 17 | args = parser.parse_args() 18 | 19 | capture_path = fix_path(args.capture_path) 20 | 21 | cepton_sdk.initialize(capture_path=capture_path) 22 | if cepton_sdk.is_live(): 23 | cepton_sdk.wait(3) 24 | 25 | sensors_dict = cepton_sdk.get_sensors() 26 | for sensor in sensors_dict.values(): 27 | pprint.pprint(sensor.information.to_dict()) 28 | -------------------------------------------------------------------------------- /ros/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /ros/README.md: -------------------------------------------------------------------------------- 1 | # Cepton ROS 2 | 3 | ## Overview 4 | 5 | This package provides ROS support for Cepton LiDAR. It is meant as reference code, and not actively developed. 6 | 7 | ## Installation 8 | 9 | First, install [CeptonViewer](https://ceptontech.github.io/cepton_sdk_redist/cepton_viewer.html). 10 | 11 | If you have not done so already, install ROS, and [create a catkin workspace](http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment). 12 | 13 | Change to the catkin workspace directory. 14 | 15 | Clone the repository. 16 | 17 | ```sh 18 | git clone https://github.com/ceptontech/cepton_ros.git src/cepton_ros 19 | ``` 20 | 21 | Run catkin make. 22 | 23 | ```sh 24 | catkin_make 25 | ``` 26 | 27 | Source the catkin setup script. 28 | 29 | ```sh 30 | source devel/setup.bash 31 | ``` 32 | 33 | ## Getting started 34 | 35 | Launch the ROS demo 36 | 37 | ```sh 38 | roslaunch cepton_ros demo.launch 39 | ``` 40 | 41 | A rviz window should popup showing a sample point cloud. 42 | 43 | To launch the driver standalone, you need to first launch the nodelet manager 44 | 45 | ```sh 46 | roslaunch cepton_ros manager.launch 47 | ``` 48 | 49 | Then, you can launch the driver 50 | 51 | ```sh 52 | 53 | roslaunch cepton_ros driver.launch 54 | ``` 55 | 56 | You can print a help menu for the driver launcher 57 | 58 | ```sh 59 | roslaunch --ros-args cepton_ros driver.launch 60 | ``` 61 | 62 | ### Using multiple sensors 63 | 64 | If the `settings_dir` parameter is passed, the driver will load sensor transforms (use `CeptonViewer` to generate the settings directory) 65 | 66 | - Publish transforms in the `cepton_transforms.json` file. 67 | 68 | ```sh 69 | roslaunch cepton_ros driver.launch settings_dir:= 70 | ``` 71 | 72 | ## Capture Replay 73 | 74 | A PCAP capture file can be converted to a bag file as follows: 75 | 76 | ```sh 77 | roslaunch cepton_ros convert_capture.launch capture_path:= output_path:= 78 | ``` 79 | 80 | A PCAP capture file can also passed directly to the launch files. For example: 81 | 82 | ```sh 83 | roslaunch cepton_ros demo.launch capture_path:= 84 | ``` 85 | 86 | ## Troubleshooting 87 | 88 | First, try viewing the sensor in CeptonViewer to determine if the issue is ROS or the sensor/network. 89 | 90 | ## Reference 91 | 92 | ### Driver nodelet 93 | 94 | The driver nodelet is a thin wrapper around the Cepton SDK. The point type definitions can be found in `include/cepton_ros/point.hpp`. 95 | -------------------------------------------------------------------------------- /ros/VERSION: -------------------------------------------------------------------------------- 1 | 1.18.2 2 | -------------------------------------------------------------------------------- /ros/include/cepton_ros/common.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define FATAL_ERROR(error) \ 7 | do { \ 8 | if (error) { \ 9 | NODELET_FATAL(error.what()); \ 10 | return; \ 11 | } \ 12 | } while (0) 13 | 14 | #define WARN_ERROR(error) \ 15 | do { \ 16 | if (error) { \ 17 | NODELET_WARN(error.what()); \ 18 | return; \ 19 | } \ 20 | } while (0) 21 | 22 | namespace cepton_ros { 23 | namespace rosutil { 24 | 25 | ros::Time from_usec(int64_t usec); 26 | int64_t to_usec(const ros::Time &stamp); 27 | 28 | } // namespace rosutil 29 | } // namespace cepton_ros -------------------------------------------------------------------------------- /ros/include/cepton_ros/point.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace cepton_ros { 10 | using CeptonPointCloud = pcl::PointCloud; 11 | } // namespace cepton_ros 12 | 13 | // clang-format off 14 | POINT_CLOUD_REGISTER_POINT_STRUCT(cepton_sdk::util::SensorPoint, 15 | (double, timestamp, timestamp) // int64_t not supported in PCL 16 | (float, image_x, image_x) 17 | (float, distance, distance) 18 | (float, image_z, image_z) 19 | (float, intensity, intensity) 20 | (uint8_t, return_type, return_type) 21 | (uint8_t, flags, flags) 22 | (float, x, x) 23 | (float, y, y) 24 | (float, z, z) 25 | ) 26 | // clang-format on 27 | -------------------------------------------------------------------------------- /ros/launch/convert_capture.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ros/launch/demo.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ros/launch/driver.launch: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ros/launch/manager.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ros/launch/rviz.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ros/launch/subscriber.launch: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ros/msg/SensorInformation.msg: -------------------------------------------------------------------------------- 1 | Header header 2 | 3 | uint64 handle 4 | uint64 serial_number 5 | string model_name 6 | uint16 model 7 | string firmware_version 8 | 9 | float32 last_reported_temperature 10 | float32 last_reported_humidity 11 | float32 last_reported_age 12 | 13 | float32 measurement_period 14 | 15 | int64 ptp_ts 16 | 17 | uint8 gps_ts_year 18 | uint8 gps_ts_month 19 | uint8 gps_ts_day 20 | uint8 gps_ts_hour 21 | uint8 gps_ts_min 22 | uint8 gps_ts_sec 23 | 24 | uint8 return_count 25 | uint8 segment_count 26 | 27 | bool is_mocked 28 | bool is_pps_connected 29 | bool is_nmea_connected 30 | bool is_ptp_connected 31 | bool is_calibrated 32 | bool is_over_heated 33 | 34 | int16 cepton_sdk_version 35 | uint8[] data # `cepton_sdk::SensorInformation` bytes -------------------------------------------------------------------------------- /ros/nodelets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Cepton SDK driver. 4 | 5 | 6 | Sample subscriber. 7 | 8 | 9 | -------------------------------------------------------------------------------- /ros/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cepton_ros 4 | 1.10.1 5 | Cepton LiDAR SDK. 6 | None 7 | https://github.com/ceptontech/cepton_ros.git 8 | Cepton Technologies 9 | 10 | catkin 11 | 12 | libjsoncpp-dev 13 | nodelet 14 | pcl_conversions 15 | pcl_ros 16 | pluginlib 17 | roscpp 18 | roslib 19 | std_msgs 20 | tf2_ros 21 | 22 | message_generation 23 | message_runtime 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ros/src/common.cpp: -------------------------------------------------------------------------------- 1 | #include "cepton_ros/common.hpp" 2 | 3 | namespace cepton_ros { 4 | namespace rosutil { 5 | 6 | ros::Time from_usec(int64_t usec) { 7 | ros::Time stamp; 8 | stamp.sec = double(usec) * 1e-6; 9 | usec -= int64_t(double(stamp.sec) * 1e6); 10 | stamp.nsec = double(usec) * 1e3f; 11 | return stamp; 12 | } 13 | 14 | int64_t to_usec(const ros::Time &stamp) { 15 | int64_t usec = 0; 16 | usec += double(stamp.sec) * 1e6; 17 | usec += double(stamp.nsec) * 1e-3; 18 | return usec; 19 | } 20 | 21 | } // namespace rosutil 22 | } // namespace cepton_ros -------------------------------------------------------------------------------- /ros/src/driver_nodelet.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "cepton_ros/SensorInformation.h" 13 | #include "cepton_ros/common.hpp" 14 | #include "cepton_ros/point.hpp" 15 | 16 | namespace cepton_ros { 17 | 18 | /// SDK nodelet. 19 | /** 20 | * Publishes sensor information and points topics. 21 | */ 22 | class DriverNodelet : public nodelet::Nodelet { 23 | public: 24 | ~DriverNodelet(); 25 | 26 | void on_image_points(cepton_sdk::SensorHandle sensor_handle, 27 | std::size_t n_points, 28 | const cepton_sdk::SensorImagePoint *const image_points); 29 | 30 | protected: 31 | void onInit() override; 32 | 33 | private: 34 | void publish_transforms(const std::string &transforms_path); 35 | void publish_sensor_information( 36 | const cepton_sdk::SensorInformation &sensor_info); 37 | void publish_points(uint64_t serial_number); 38 | 39 | private: 40 | ros::NodeHandle node_handle; 41 | ros::NodeHandle private_node_handle; 42 | 43 | std::string parent_frame_id = "cepton"; 44 | 45 | cepton_sdk::api::SensorErrorCallback error_callback; 46 | cepton_sdk::api::SensorImageFrameCallback image_frame_callback; 47 | 48 | ros::Timer watchdog_timer; 49 | ros::Publisher sensor_info_publisher; 50 | ros::Publisher points_publisher; 51 | tf2_ros::StaticTransformBroadcaster tf_broadcaster; 52 | std::set tf_serial_numbers; 53 | 54 | std::vector image_points; 55 | std::vector points; 56 | CeptonPointCloud point_cloud; 57 | }; 58 | } // namespace cepton_ros 59 | -------------------------------------------------------------------------------- /ros/src/subscriber_nodelet.cpp: -------------------------------------------------------------------------------- 1 | #include "subscriber_nodelet.hpp" 2 | 3 | #include 4 | 5 | PLUGINLIB_EXPORT_CLASS(cepton_ros::SubscriberNodelet, nodelet::Nodelet); 6 | 7 | namespace cepton_ros { 8 | 9 | void SubscriberNodelet::on_sensor_information( 10 | const SensorInformation::ConstPtr& msg) {} 11 | 12 | void SubscriberNodelet::on_points( 13 | const CeptonPointCloud::ConstPtr& point_cloud) { 14 | const auto& points = point_cloud->points; 15 | if (points.size() == 0) return; 16 | NODELET_INFO("Received %i points.", (int)points.size()); 17 | NODELET_INFO(" Timestamp Range: [%li, %li]", (long int)points[0].timestamp, 18 | (long int)points[points.size() - 1].timestamp); 19 | 20 | // Print info for first valid point 21 | int i; 22 | for (i = 0; i < points.size(); ++i) { 23 | if (points[i].valid) break; 24 | } 25 | const auto& point = points[i]; 26 | NODELET_INFO(" Point %i:", i); 27 | NODELET_INFO(" Image Position: [%.3f, %.3f]", point.image_x, point.image_z); 28 | NODELET_INFO(" Distance: %.2f", point.distance); 29 | NODELET_INFO(" Position: [%.2f, %.2f, %.2f]", point.x, point.y, point.z); 30 | NODELET_INFO(" Intensity: %.2f", point.intensity); 31 | NODELET_INFO(" Return Type: %i", (int)point.return_type); 32 | NODELET_INFO(" Flags: %i", (int)point.flags); 33 | } 34 | 35 | void SubscriberNodelet::onInit() { 36 | this->node_handle = getNodeHandle(); 37 | this->private_node_handle = getPrivateNodeHandle(); 38 | 39 | sensor_information_subscriber = node_handle.subscribe( 40 | "cepton/sensor_information", 10, 41 | &SubscriberNodelet::on_sensor_information, this); 42 | points_subscriber = node_handle.subscribe( 43 | "cepton/points", 10, &SubscriberNodelet::on_points, this); 44 | } 45 | } // namespace cepton_ros -------------------------------------------------------------------------------- /ros/src/subscriber_nodelet.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "cepton_ros/SensorInformation.h" 12 | #include "cepton_ros/common.hpp" 13 | #include "cepton_ros/point.hpp" 14 | 15 | namespace cepton_ros { 16 | 17 | class SubscriberNodelet : public nodelet::Nodelet { 18 | public: 19 | void on_sensor_information(const SensorInformation::ConstPtr& msg); 20 | void on_points(const CeptonPointCloud::ConstPtr& point_cloud); 21 | 22 | protected: 23 | void onInit() override; 24 | 25 | private: 26 | ros::NodeHandle node_handle; 27 | ros::NodeHandle private_node_handle; 28 | 29 | ros::Subscriber sensor_information_subscriber; 30 | ros::Subscriber points_subscriber; 31 | }; 32 | } // namespace cepton_ros -------------------------------------------------------------------------------- /ros/tests/1/cepton_transforms.json: -------------------------------------------------------------------------------- 1 | { 2 | "8696": { 3 | "rotation": [ 4 | 0.02443213202059269, 5 | -0.0026172096841037273, 6 | -6.396331446012482e-05, 7 | 0.9996981024742126 8 | ], 9 | "translation": [ 10 | 0.0, 11 | 0.0, 12 | 1.5 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /ros/tests/1/lidar.cep0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/tests/1/lidar.cep0 -------------------------------------------------------------------------------- /ros/tests/1/lidar.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/tests/1/lidar.pcap -------------------------------------------------------------------------------- /ros/tests/1/lidar.pcap.cep0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/tests/1/lidar.pcap.cep0 -------------------------------------------------------------------------------- /ros/tests/test_multi.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ros/tests/test_single.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | CMake file for including cepton_sdk in a CMake project. 3 | 4 | See `samples/CMakeLists.txt` for example usage. 5 | ]] 6 | set(CEPTON_SDK_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}") 7 | list(APPEND CMAKE_MODULE_PATH "${CEPTON_SDK_SOURCE_DIR}/cmake") 8 | 9 | include("CeptonVersion") 10 | 11 | cmake_minimum_required(VERSION 3.1) 12 | project( 13 | cepton_sdk 14 | VERSION ${CEPTON_VERSION} 15 | LANGUAGES C CXX) 16 | 17 | include("CeptonCommon") 18 | 19 | create_option(BOOL CEPTON_SDK_USE_STATIC FALSE 20 | "Use static cepton sdk libraries.") 21 | 22 | if(NOT TARGET cepton_sdk::cepton_sdk) 23 | if(CEPTON_SDK_USE_STATIC) 24 | add_library(cepton_sdk::cepton_sdk STATIC IMPORTED GLOBAL) 25 | cepton_import_static_library(cepton_sdk::cepton_sdk 26 | "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk") 27 | set_target_properties( 28 | cepton_sdk::cepton_sdk PROPERTIES INTERFACE_COMPILE_DEFINITIONS 29 | CEPTON_SDK_STATIC) 30 | else() 31 | add_library(cepton_sdk::cepton_sdk SHARED IMPORTED GLOBAL) 32 | cepton_import_shared_library(cepton_sdk::cepton_sdk 33 | "${CMAKE_CURRENT_SOURCE_DIR}" "cepton_sdk") 34 | endif() 35 | set_target_properties( 36 | cepton_sdk::cepton_sdk PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 37 | "${CMAKE_CURRENT_SOURCE_DIR}/include") 38 | endif() 39 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Cepton Technologies Inc. 2017-2019, All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the Cepton Technologies Inc nor the 11 | names of its contributors may be used to endorse or promote products 12 | derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/VERSION: -------------------------------------------------------------------------------- 1 | 1.18.2 2 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/cmake/CeptonVersion.cmake: -------------------------------------------------------------------------------- 1 | macro(PARSE_VERSION_STRING PREFIX) 2 | string(REPLACE "." ";" ${PREFIX}_VERSION_LIST "${${PREFIX}_VERSION}") 3 | list(LENGTH ${PREFIX}_VERSION_LIST ${PREFIX}_VERSION_LIST_SIZE) 4 | set(${PREFIX}_VERSION_MAJOR 0) 5 | set(${PREFIX}_VERSION_MINOR 0) 6 | set(${PREFIX}_VERSION_PATCH 0) 7 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 0) 8 | list(GET ${PREFIX}_VERSION_LIST 0 ${PREFIX}_VERSION_MAJOR) 9 | endif() 10 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 1) 11 | list(GET ${PREFIX}_VERSION_LIST 1 ${PREFIX}_VERSION_MINOR) 12 | endif() 13 | if(${PREFIX}_VERSION_LIST_SIZE GREATER 2) 14 | list(GET ${PREFIX}_VERSION_LIST 2 ${PREFIX}_VERSION_PATCH) 15 | endif() 16 | endmacro() 17 | 18 | macro(PARSE_VERSION_FILE VERSION_PATH PREFIX) 19 | file(READ "${VERSION_PATH}" ${PREFIX}_VERSION) 20 | string(STRIP "${${PREFIX}_VERSION}" ${PREFIX}_VERSION) 21 | parse_version_string(${PREFIX}) 22 | endmacro() 23 | 24 | parse_version_file("${CMAKE_CURRENT_LIST_DIR}/../VERSION" CEPTON) 25 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/cmake/subdirectory/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | CMake scoping project for setting subdirectory options without changing parent. 3 | ]] 4 | project(cepton_subdirectory_${add_external_subdirectory_name}) 5 | 6 | set(CMAKE_BUILD_TYPE "Release") 7 | 8 | # Disable all warnings 9 | if(GCC) 10 | add_flags("-w") 11 | elseif(CLANG) 12 | add_flags("-Wno-everything") 13 | elseif(MSVC) 14 | add_flags("/W0") 15 | endif() 16 | 17 | add_subdirectory(${add_external_subdirectory_args}) 18 | -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/linux-aarch64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/linux-aarch64/libcepton_sdk.so -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/linux-arm/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/linux-arm/libcepton_sdk.so -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/linux-i386/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/linux-i386/libcepton_sdk.so -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/linux-x86_64/libcepton_sdk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/linux-x86_64/libcepton_sdk.so -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/osx/libcepton_sdk.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/osx/libcepton_sdk.dylib -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/win64/cepton_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/win64/cepton_sdk.dll -------------------------------------------------------------------------------- /ros/third_party/cepton_sdk/lib/win64/cepton_sdk.imp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/ros/third_party/cepton_sdk/lib/win64/cepton_sdk.imp.lib -------------------------------------------------------------------------------- /samples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #[[ 2 | CMake file for building samples. 3 | ]] 4 | cmake_minimum_required(VERSION 3.1) 5 | 6 | set(CEPTON_SDK_SAMPLES_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}") 7 | get_filename_component(CEPTON_SDK_SOURCE_DIR 8 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/../" ABSOLUTE) 9 | list(APPEND CMAKE_MODULE_PATH "${CEPTON_SDK_SOURCE_DIR}/cmake") 10 | 11 | include("CeptonVersion") 12 | project( 13 | cepton_sdk_samples 14 | VERSION ${CEPTON_VERSION} 15 | LANGUAGES C CXX) 16 | 17 | include("CeptonCommon") 18 | 19 | if(GCC OR CLANG) 20 | add_flags(-Wall -Wextra -pedantic) 21 | add_linker_flags(-pthread) 22 | endif() 23 | 24 | # cepton_sdk 25 | add_subdirectory("${CEPTON_SDK_SOURCE_DIR}" 26 | "${PROJECT_BINARY_DIR}/third_party/cepton_sdk") 27 | 28 | set(CEPTON_SDK_SAMPLE_SOURCES 29 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/advanced/frame_accumulator.cpp" 30 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/advanced/frame_detector.cpp" 31 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/advanced/process_multi.cpp" 32 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/advanced/process_single.cpp" 33 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/basic.cpp" 34 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/callback.cpp" 35 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/error.cpp") 36 | foreach(path ${CEPTON_SDK_SAMPLE_SOURCES}) 37 | get_filename_component(name "${path}" NAME_WE) 38 | add_executable(cepton_sdk_sample_${name} "${path}") 39 | target_include_directories(cepton_sdk_sample_${name} 40 | PRIVATE "${CEPTON_SDK_SAMPLES_SOURCE_DIR}") 41 | target_link_libraries(cepton_sdk_sample_${name} cepton_sdk::cepton_sdk) 42 | endforeach() 43 | 44 | if(GCC OR CLANG) 45 | set(CEPTON_SDK_POSIX_SAMPLE_SOURCES 46 | "${CEPTON_SDK_SAMPLES_SOURCE_DIR}/posix/direct_networking.c") 47 | foreach(path ${CEPTON_SDK_POSIX_SAMPLE_SOURCES}) 48 | get_filename_component(name "${path}" NAME_WE) 49 | add_executable(cepton_sdk_sample_${name} "${path}") 50 | target_include_directories(cepton_sdk_sample_${name} 51 | PRIVATE "${CEPTON_SDK_SAMPLES_SOURCE_DIR}") 52 | target_link_libraries(cepton_sdk_sample_${name} cepton_sdk::cepton_sdk) 53 | endforeach() 54 | endif() 55 | -------------------------------------------------------------------------------- /samples/README.md: -------------------------------------------------------------------------------- 1 | ## Building 2 | 3 | ### Unix 4 | 5 | ```sh 6 | cd cepton_sdk_redist/samples 7 | mkdir build 8 | cd build 9 | cmake .. 10 | make 11 | ``` 12 | 13 | ### Windows 14 | 15 | The following commands are for a UNIX command line (e.g. Git Bash). 16 | 17 | ```sh 18 | cd cepton_sdk_redist/samples 19 | mkdir build 20 | cd build 21 | cmake -G "Visual Studio 16 2019" .. 22 | ``` 23 | 24 | To build from the command line, run 25 | 26 | ```sh 27 | cmake --build . --config Release 28 | ``` 29 | 30 | To build in Visual Studio 31 | 32 | - Click `File` -> `Open` -> `Project/Solution`. Select `cepton_sdk_redist/samples/build/cepton_sdk_samples.sln`. 33 | - Build the project. -------------------------------------------------------------------------------- /samples/advanced/frame_accumulator.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for custom frame accumulation. 3 | */ 4 | #include 5 | 6 | int main(int argc, char **argv) { 7 | std::string capture_path; 8 | if (argc >= 2) capture_path = argv[1]; 9 | 10 | auto frame_options = cepton_sdk::create_frame_options(); 11 | 12 | // Uncomment to return points every frame. 13 | frame_options.mode = CEPTON_SDK_FRAME_COVER; 14 | 15 | // Uncomment to return points at fixed time interval. 16 | // frame_options.mode = CEPTON_SDK_FRAME_TIMED; 17 | // frame_options.length = 0.1f; 18 | 19 | // Initialize 20 | auto options = cepton_sdk::create_options(); 21 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize(options, capture_path)); 22 | cepton_sdk::api::SensorImageFrameCallback callback; 23 | CEPTON_CHECK_ERROR(callback.initialize()); 24 | 25 | // Get sensor 26 | while (cepton_sdk::get_n_sensors() == 0) 27 | CEPTON_CHECK_ERROR(cepton_sdk::api::wait(0.1f)); 28 | cepton_sdk::SensorInformation sensor_info; 29 | CEPTON_CHECK_ERROR( 30 | cepton_sdk::get_sensor_information_by_index(0, sensor_info)); 31 | 32 | // Create accumulator 33 | cepton_sdk::util::FrameAccumulator accumulator(sensor_info); 34 | CEPTON_CHECK_ERROR(accumulator.set_options(frame_options)); 35 | CEPTON_CHECK_ERROR(callback.listen( 36 | [&](cepton_sdk::SensorHandle handle, std::size_t n_points, 37 | const cepton_sdk::SensorImagePoint *const c_image_points) { 38 | if (handle != sensor_info.handle) return; 39 | accumulator.add_points(n_points, c_image_points); 40 | })); 41 | 42 | // Listen 43 | CEPTON_CHECK_ERROR(accumulator.callback.listen( 44 | [&](std::size_t n_points, 45 | const cepton_sdk::SensorImagePoint *const c_image_points) { 46 | // Handle frame... 47 | })); 48 | 49 | // Run 50 | CEPTON_CHECK_ERROR(cepton_sdk::api::wait(1.0f)); 51 | 52 | // Deinitialize 53 | cepton_sdk::deinitialize().ignore(); 54 | } 55 | -------------------------------------------------------------------------------- /samples/advanced/frame_detector.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for custom frame detection. 3 | */ 4 | #include 5 | 6 | int main(int argc, char **argv) { 7 | std::string capture_path; 8 | if (argc >= 2) capture_path = argv[1]; 9 | 10 | // Initialize 11 | auto options = cepton_sdk::create_options(); 12 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize(options, capture_path)); 13 | cepton_sdk::api::SensorImageFrameCallback callback; 14 | CEPTON_CHECK_ERROR(callback.initialize()); 15 | 16 | // Get sensor 17 | while (cepton_sdk::get_n_sensors() == 0) 18 | CEPTON_CHECK_ERROR(cepton_sdk::api::wait(0.1f)); 19 | cepton_sdk::SensorInformation sensor_info; 20 | CEPTON_CHECK_ERROR( 21 | cepton_sdk::get_sensor_information_by_index(0, sensor_info)); 22 | 23 | // Create detector 24 | cepton_sdk::util::FrameDetector<> detector(sensor_info); 25 | auto frame_options = cepton_sdk::create_frame_options(); 26 | frame_options.mode = CEPTON_SDK_FRAME_COVER; 27 | CEPTON_CHECK_ERROR(detector.set_options(frame_options)); 28 | const int stride = sensor_info.segment_count * sensor_info.return_count; 29 | CEPTON_CHECK_ERROR(callback.listen( 30 | [&](cepton_sdk::SensorHandle handle, std::size_t n_points, 31 | const cepton_sdk::SensorImagePoint *const c_image_points) { 32 | if (handle != sensor_info.handle) return; 33 | 34 | for (int i = 0; i < (int)n_points; i += stride) { 35 | auto &image_point = c_image_points[i]; 36 | if (detector.update(image_point)) { 37 | auto &result = detector.previous_result(); 38 | // `detector.period()` Frame period [seconds]. 39 | // `result.timestamp` Frame timestamp [microseconds]. 40 | 41 | // Handle frame... 42 | } 43 | } 44 | })); 45 | 46 | // Run 47 | CEPTON_CHECK_ERROR(cepton_sdk::api::wait(1.0f)); 48 | 49 | // Deinitialize 50 | cepton_sdk::deinitialize().ignore(); 51 | } -------------------------------------------------------------------------------- /samples/advanced/network.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for custom networking. 3 | */ 4 | #include 5 | 6 | #include 7 | 8 | using asio::ip::udp; 9 | 10 | class SocketListener { 11 | public: 12 | SocketListener() : m_socket(m_io_service, udp::v4()) { 13 | m_socket.set_option(asio::socket_base::reuse_address(true)); 14 | m_socket.bind(udp::endpoint(udp::v4(), 8808)); 15 | } 16 | 17 | void run() { 18 | listen(); 19 | m_io_service.run_for(std::chrono::seconds(5)); 20 | } 21 | 22 | void listen() { 23 | m_socket.async_receive_from( 24 | asio::buffer(m_buffer), m_end_point, 25 | [this](const asio::error_code& error, std::size_t buffer_size) { 26 | if (buffer_size == 0) return; 27 | if (error == asio::error::operation_aborted) return; 28 | const CeptonSensorHandle handle = 29 | m_end_point.address().to_v4().to_ulong(); 30 | // For more accurate timestamps, a separate network receive thread 31 | // should be 32 | // used. 33 | const int64_t timestamp = cepton_sdk::util::get_timestamp_usec(); 34 | CEPTON_CHECK_ERROR(cepton_sdk::mock_network_receive( 35 | handle, timestamp, m_buffer.data(), buffer_size)); 36 | listen(); 37 | }); 38 | } 39 | 40 | private: 41 | asio::io_context m_io_service; 42 | udp::socket m_socket; 43 | udp::endpoint m_end_point; 44 | std::array m_buffer; 45 | }; 46 | 47 | int main() { 48 | // Initialize 49 | auto options = cepton_sdk::create_options(); 50 | options.control_flags |= CEPTON_SDK_CONTROL_DISABLE_NETWORK; 51 | options.frame.mode = CEPTON_SDK_FRAME_COVER; 52 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize(options)); 53 | 54 | // Listen for points 55 | cepton_sdk::api::SensorImageFrameCallback callback; 56 | CEPTON_CHECK_ERROR(callback.initialize()); 57 | CEPTON_CHECK_ERROR( 58 | callback.listen([](cepton_sdk::SensorHandle handle, std::size_t n_points, 59 | const cepton_sdk::SensorImagePoint* c_image_points) { 60 | std::printf("Received %i points from sensor %lli\n", (int)n_points, 61 | (long long)handle); 62 | })); 63 | 64 | SocketListener listener; 65 | listener.run(); 66 | 67 | // Deinitialize 68 | cepton_sdk::deinitialize().ignore(); 69 | } -------------------------------------------------------------------------------- /samples/advanced/process_single.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for processing offline data from single sensor. 3 | */ 4 | #include 5 | 6 | #include "common.hpp" 7 | 8 | struct Frame { 9 | int64_t timestamp; 10 | cepton_sdk::SensorHandle handle; 11 | std::vector image_points; 12 | }; 13 | 14 | int main(int argc, char **argv) { 15 | check_help(argc, argv, "cepton_sdk_sample_process_single capture_path"); 16 | if (!CEPTON_ASSERT(argc >= 2, "Capture path not provided!")) std::exit(1); 17 | const std::string capture_path = argv[1]; 18 | 19 | // Initialize 20 | auto options = cepton_sdk::create_options(); 21 | options.frame.mode = CEPTON_SDK_FRAME_COVER; 22 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize(options, capture_path)); 23 | cepton_sdk::api::SensorImageFrameCallback callback; 24 | CEPTON_CHECK_ERROR(callback.initialize()); 25 | 26 | // Listen 27 | cepton_sdk::util::SingleConsumerQueue queue; 28 | CEPTON_CHECK_ERROR( 29 | callback.listen([&](cepton_sdk::SensorHandle handle, std::size_t n_points, 30 | const cepton_sdk::SensorImagePoint *c_image_points) { 31 | // Add frame to queue 32 | auto frame = std::make_shared(); 33 | frame->timestamp = cepton_sdk::api::get_time(); 34 | frame->handle = handle; 35 | frame->image_points.insert(frame->image_points.end(), c_image_points, 36 | c_image_points + n_points); 37 | queue.push(frame); 38 | })); 39 | 40 | while (!cepton_sdk::capture_replay::is_end()) { 41 | // Get frame 42 | if (queue.empty()) 43 | CEPTON_CHECK_ERROR(cepton_sdk::capture_replay::resume_blocking(0.1f)); 44 | const auto frame = queue.pop(); 45 | if (!frame) continue; 46 | 47 | // Do processing... 48 | } 49 | 50 | // Deinitialize 51 | cepton_sdk::deinitialize().ignore(); 52 | } 53 | -------------------------------------------------------------------------------- /samples/advanced/replay.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for custom packet replaying. 3 | */ 4 | #include 5 | #include 6 | 7 | class CaptureReplay { 8 | public: 9 | CaptureReplay(const std::string& path) { 10 | CEPTON_CHECK_ERROR(m_capture.open_for_read(path)); 11 | 12 | CEPTON_CHECK_ERROR( 13 | cepton_sdk_set_control_flags(CEPTON_SDK_CONTROL_DISABLE_NETWORK, 14 | CEPTON_SDK_CONTROL_DISABLE_NETWORK)); 15 | CEPTON_CHECK_ERROR(cepton_sdk_clear()); 16 | } 17 | 18 | ~CaptureReplay() { 19 | m_capture.close(); 20 | if (cepton_sdk_is_initialized()) { 21 | CEPTON_CHECK_ERROR(cepton_sdk_clear()); 22 | } 23 | } 24 | 25 | void run() { 26 | while (true) { 27 | cepton_sdk::Capture::PacketHeader header; 28 | const uint8_t* data; 29 | CEPTON_CHECK_ERROR(m_capture.next_packet(header, data)); 30 | 31 | const cepton_sdk::SensorHandle handle = 32 | (cepton_sdk::SensorHandle)header.ip_v4 | 33 | CEPTON_SENSOR_HANDLE_FLAG_MOCK; 34 | CEPTON_CHECK_ERROR(cepton_sdk_mock_network_receive( 35 | handle, header.timestamp, data, header.data_size)); 36 | } 37 | } 38 | 39 | private: 40 | cepton_sdk::Capture m_capture; 41 | }; 42 | 43 | int main(int argc, char** argv) { 44 | if (argc < 2) return -1; 45 | const std::string capture_path = argv[1]; 46 | 47 | // Initialize 48 | auto options = cepton_sdk::create_options(); 49 | options.control_flags |= CEPTON_SDK_CONTROL_DISABLE_NETWORK; 50 | options.frame.mode = CEPTON_SDK_FRAME_COVER; 51 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize(options)); 52 | 53 | // Listen for points 54 | cepton_sdk::api::SensorImageFrameCallback callback; 55 | CEPTON_CHECK_ERROR(callback.initialize()); 56 | CEPTON_CHECK_ERROR( 57 | callback.listen([](cepton_sdk::SensorHandle handle, std::size_t n_points, 58 | const cepton_sdk::SensorImagePoint* c_image_points) { 59 | std::printf("Received %i points from sensor %lli\n", (int)n_points, 60 | (long long)handle); 61 | })); 62 | 63 | // Run 64 | CaptureReplay replay(capture_path); 65 | replay.run(); 66 | 67 | // Deinitialize 68 | cepton_sdk::deinitialize().ignore(); 69 | } -------------------------------------------------------------------------------- /samples/advanced/simple.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv) { 4 | // Initialize SDK with default options 5 | CEPTON_CHECK_ERROR( 6 | cepton_sdk::api::initialize(cepton_sdk::create_options(), "", true)); 7 | 8 | // Get all sensors 9 | for (int i = 0; i < cepton_sdk::get_n_sensors(); ++i) { 10 | cepton_sdk::SensorInformation sensor_info; 11 | CEPTON_CHECK_ERROR( 12 | cepton_sdk::get_sensor_information_by_index(i, sensor_info)); 13 | } 14 | 15 | // Listen for points 16 | cepton_sdk::api::SensorImageFrameCallback callback; 17 | CEPTON_CHECK_ERROR(callback.initialize()); 18 | CEPTON_CHECK_ERROR( 19 | callback.listen([&](cepton_sdk::SensorHandle handle, std::size_t n_points, 20 | const cepton_sdk::SensorImagePoint *c_image_points) { 21 | // Get sensor info 22 | cepton_sdk::SensorInformation sensor_info; 23 | CEPTON_CHECK_ERROR( 24 | cepton_sdk::get_sensor_information(handle, sensor_info)); 25 | 26 | // Convert points 27 | std::vector points(n_points); 28 | for (int i = 0; i < n_points; ++i) { 29 | cepton_sdk::util::convert_sensor_image_point_to_point( 30 | c_image_points[i], points[i]); 31 | } 32 | })); 33 | 34 | // Sleep or do other work... 35 | 36 | // Deinitialize SDK 37 | cepton_sdk::deinitialize().ignore(); 38 | } -------------------------------------------------------------------------------- /samples/c_basic.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for general C SDK usage. 3 | */ 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void check_sdk_error() { 11 | const char *error_msg; 12 | int error_code = cepton_sdk_get_error(&error_msg); 13 | if (error_code != CEPTON_SUCCESS) { 14 | printf("%s: %s\n", cepton_get_error_code_name(error_code), error_msg); 15 | exit(1); 16 | } 17 | } 18 | 19 | void cepton_sdk_error_handler(CeptonSensorHandle handle, 20 | CeptonSensorErrorCode error_code, 21 | const char *error_msg, const void *error_data, 22 | size_t error_data_size, void *user_data) { 23 | printf("Got error: %s\n", error_msg); 24 | } 25 | 26 | int n_frames = 0; 27 | 28 | void image_frame_callback(CeptonSensorHandle handle, size_t n_points, 29 | const struct CeptonSensorImagePoint *c_points, 30 | void *user_data) { 31 | ++n_frames; 32 | printf("Got %d frames\n", n_frames); 33 | } 34 | 35 | int main() { 36 | // Initialize 37 | struct CeptonSDKOptions options = cepton_sdk_create_options(); 38 | options.frame.mode = CEPTON_SDK_FRAME_COVER; 39 | cepton_sdk_initialize(CEPTON_SDK_VERSION, &options, cepton_sdk_error_handler, NULL); 40 | check_sdk_error(); 41 | 42 | // Wait for sensor 43 | int n_sensors; 44 | printf("Waiting for sensors to connect\n"); 45 | while (!(n_sensors = (int)cepton_sdk_get_n_sensors())) 46 | ; 47 | for (int i = 0; i < n_sensors; ++i) { 48 | struct CeptonSensorInformation sensor_info; 49 | cepton_sdk_get_sensor_information_by_index(0, &sensor_info); 50 | check_sdk_error(); 51 | printf("Sensor: %i\n", (int)sensor_info.serial_number); 52 | } 53 | 54 | // Listen for frames 55 | cepton_sdk_listen_image_frames(image_frame_callback, NULL); 56 | check_sdk_error(); 57 | 58 | // Sleep 59 | while (n_frames < 10) 60 | ; 61 | 62 | // Deinitialize 63 | cepton_sdk_deinitialize(); 64 | check_sdk_error(); 65 | return 0; 66 | } -------------------------------------------------------------------------------- /samples/callback.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for callback usage. 3 | */ 4 | #include 5 | 6 | // Sample global callback. 7 | void on_image_frame(cepton_sdk::SensorHandle handle, std::size_t n_points, 8 | const cepton_sdk::SensorImagePoint *c_image_points) { 9 | // Handle frame... 10 | } 11 | 12 | // Sample member callback. 13 | class FramesListener { 14 | public: 15 | void on_image_frame(cepton_sdk::SensorHandle handle, std::size_t n_points, 16 | const cepton_sdk::SensorImagePoint *c_image_points) { 17 | // Handle frame... 18 | } 19 | }; 20 | 21 | int main(int argc, char **argv) { 22 | // Initialize 23 | CEPTON_CHECK_ERROR(cepton_sdk::api::initialize()); 24 | cepton_sdk::api::SensorImageFrameCallback callback; 25 | CEPTON_CHECK_ERROR(callback.initialize()); 26 | 27 | // Listen lambda 28 | CEPTON_CHECK_ERROR( 29 | callback.listen([](cepton_sdk::SensorHandle handle, std::size_t n_points, 30 | const cepton_sdk::SensorImagePoint *c_image_points) { 31 | // Handle frame... 32 | })); 33 | 34 | // Listen global function 35 | CEPTON_CHECK_ERROR(callback.listen(on_image_frame)); 36 | 37 | // Listen member function 38 | FramesListener frames_listener; 39 | CEPTON_CHECK_ERROR( 40 | callback.listen(&frames_listener, &FramesListener::on_image_frame)); 41 | 42 | // Deinitialize 43 | cepton_sdk::deinitialize().ignore(); 44 | } 45 | -------------------------------------------------------------------------------- /samples/common.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | void check_help(int argc, char **argv, const std::string &usage, 6 | const std::string &description = "") { 7 | for (int i = 1; i < argc; ++i) { 8 | const std::string arg(argv[i]); 9 | if ((arg == "-h") || (arg == "--help")) { 10 | std::printf("usage: %s\n", usage.c_str()); 11 | if (!description.empty()) std::printf("\n%s\n", description.c_str()); 12 | std::exit(0); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /samples/error.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample code for error callback usage. 3 | */ 4 | #include 5 | 6 | int main(int argc, char** argv) { 7 | // Initialize 8 | cepton_sdk::api::SensorErrorCallback error_callback; 9 | CEPTON_CHECK_ERROR( 10 | error_callback.listen([&](cepton_sdk::SensorHandle handle, 11 | const cepton_sdk::SensorError& error) { 12 | // Handle error... 13 | })); 14 | CEPTON_CHECK_ERROR(cepton_sdk::initialize( 15 | CEPTON_SDK_VERSION, cepton_sdk::create_options(), 16 | error_callback.global_on_callback, &error_callback)); 17 | 18 | // Deinitialize 19 | cepton_sdk::deinitialize().ignore(); 20 | } 21 | -------------------------------------------------------------------------------- /samples/exporter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | project(cepton_exporter VERSION 0.9.8 LANGUAGES C CXX) 4 | 5 | add_definitions(-DVERSION_MAJOR=${PROJECT_VERSION_MAJOR}) 6 | add_definitions(-DVERSION_MINOR=${PROJECT_VERSION_MINOR}) 7 | add_definitions(-DVERSION_BUILD=${PROJECT_VERSION_PATCH}) 8 | 9 | file(GLOB HEADERS "*.h*") 10 | file(GLOB SOURCES "*.cpp") 11 | 12 | set(LIBS cepton_sdk_static) 13 | 14 | if (WIN32) 15 | else() 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC") 17 | endif() 18 | 19 | add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES}) 20 | target_include_directories(${PROJECT_NAME} PRIVATE "${CEPTON_SDK_SOURCE_DIR}/include" "filesystem/include") 21 | target_link_libraries(${PROJECT_NAME} ${LIBS}) 22 | -------------------------------------------------------------------------------- /samples/exporter/filesystem/include/ghc/fs_impl.hpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // 3 | // ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 4 | // 5 | //--------------------------------------------------------------------------------------- 6 | // 7 | // Copyright (c) 2018, Steffen Schümann 8 | // All rights reserved. 9 | // 10 | // Redistribution and use in source and binary forms, with or without modification, 11 | // are permitted provided that the following conditions are met: 12 | // 13 | // 1. Redistributions of source code must retain the above copyright notice, this 14 | // list of conditions and the following disclaimer. 15 | // 16 | // 2. Redistributions in binary form must reproduce the above copyright notice, 17 | // this list of conditions and the following disclaimer in the documentation 18 | // and/or other materials provided with the distribution. 19 | // 20 | // 3. Neither the name of the copyright holder nor the names of its contributors 21 | // may be used to endorse or promote products derived from this software without 22 | // specific prior written permission. 23 | // 24 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 25 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 26 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 28 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | // 35 | //--------------------------------------------------------------------------------------- 36 | // fs_impl.hpp - The implementation header for the header/implementation seperated usage of 37 | // ghc::filesystem. 38 | // This file can be used to hide the implementation of ghc::filesystem into a single cpp. 39 | // The cpp has to include this before including fs_fwd.hpp directly or via a different 40 | // header to work. 41 | //--------------------------------------------------------------------------------------- 42 | #define GHC_FILESYSTEM_IMPLEMENTATION 43 | #include 44 | -------------------------------------------------------------------------------- /setup/cepton_sdk-linux-aarch64.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-linux-aarch64.deb -------------------------------------------------------------------------------- /setup/cepton_sdk-linux-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-linux-arm.deb -------------------------------------------------------------------------------- /setup/cepton_sdk-linux-i386.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-linux-i386.deb -------------------------------------------------------------------------------- /setup/cepton_sdk-linux-x86_64.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-linux-x86_64.deb -------------------------------------------------------------------------------- /setup/cepton_sdk-osx.dmg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-osx.dmg -------------------------------------------------------------------------------- /setup/cepton_sdk-win64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceptontech/cepton_sdk_redist/b5adda9b51cd54a344ed88b1cfb921b04e51cca0/setup/cepton_sdk-win64.exe --------------------------------------------------------------------------------