Basic Examples

To facilitate working with the Ouster C++ SDK, we provide these examples of common operations. The examples explained below are compiled into executables which print to screen to demonstrate behavior. Build with BUILD_EXAMPLES and print to screen to demonstrate behavior.

Sensor Configuration

The Sensor config page covers various ways to work with the sensor configuration interface.

The concepts explained there are demonstrated in a compiled example that you can run using the command below:

config_example $SENSOR_HOSTNAME

LidarFrame constructors

We learnt all about LidarFrames in LidarFrame.

Here we will see this in action, you can do this by running the example executable lidar_frame_example:

$ lidar_frame_example $SAMPLE_DUAL_RETURNS_PCAP $SAMPLE_DUAL_RETURNS_JSON

The source code of lidar_frame_example is available here .

2D Representations and 3D representations

The core destaggering and projection to 3D capabilities are demonstrated in the representations_example executable. The concepts demonstrated by this example are covered in detail in LidarFrame processing section.

Here we will cover slightly more sophisticated ways of working with the data also demonstrated in that example.

To run this example:

representations_example $SAMPLE_DUAL_RETURNS_PCAP $SAMPLE_DUAL_RETURNS_JSON

The source code of representations_example is available on the GitHub .