Skip to content

Conversation

@Samahu
Copy link
Collaborator

@Samahu Samahu commented Nov 19, 2025

Related Issues & PRs

Summary of Changes

Minimal C and C# bindings for ouster-sdk to get the sensor accessible in these languages

Validation

Clone the repository with this branch:

Building the C wrapper library

Run the following build command, note the BUILD_C_WRAPPER flag:

cmake -DCMAKE_TOOLCHAIN_FILE=<PATH/TO/VCPKG> \
    -DVCPKG_MANIFEST_MODE=ON  \
    -DBUILD_C_WRAPPER=ON      \
    -DBUILD_EXAMPLES=ON       \
    -DBUILD_PCAP=ON           \
    -DBUILD_OSF=ON            \
    -DBUILD_VIZ=ON            \
    -DBUILD_SHARED_LIBRARY=ON \
    -DCMAKE_CXX_STANDARD=14   \
    -Bbuild ./ouster-sdk

This should build the ouster_c library and the two provided examples.
You can run any of the two examples as follows:

  • c_client_example
./build/examples/c_client_example <sensor_url> <lidar_port> <imu_port>
  • c_scan_source_example
    ``bash
    ./build/examples/c_client_example <sensor_url>
### Building the C# wrapper library and examples
Make sure you have a dotnet already installed:
```bash
dotnet build ouster-sdk/c_sharp

This should be the library and the included example, to execute the example simply execute the command:

dotnet run --project ouster-sdk/c_sharp -- <sensor_url>

Copy link
Collaborator

@matthew-lidar matthew-lidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall seems like a reasonable first pass, just need to sort out some questions about how we document/maintain things like this (including WASM).

Main issues I see that one would need to resolve before integration is this should probably utilize open_source to support multiple source types and we should be using packet sources instead of the older client API.

@Samahu
Copy link
Collaborator Author

Samahu commented Nov 20, 2025

Overall seems like a reasonable first pass, just need to sort out some questions about how we document/maintain things like this (including WASM).

Main issues I see that one would need to resolve before integration is this should probably utilize open_source to support multiple source types and we should be using packet sources instead of the older client API.

Yeah this is a work in progress I needed the live sensor for the most part and that' why I had in focus .. but many of the remaining API (like the XYZLut and LidarScan) are source type agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants