3.3.1 Building and installing examples

OSMP includes three examples located in osmp/examples:

OSMPDummySensor/

Can be used as a simple dummy sensor model, demonstrating the use of OSI for sensor models consuming sensor view data and generating sensor data output.

OSMPDummySource/

Can be used as a simple source of sensor view data and ground-truth data. It can be connected to the input of an OSMPDummySensor model, for simple testing and demonstration purposes.

OSMPCNetworkProxy/

Demonstrates a simple C network proxy that can send and receive OSI data via TCP sockets.

Prerequisites

  • You have installed cmake version 3.10.2 or higher.

  • You have installed protobuf version 3.0.0 or higher.

Steps

  1. Clone the OSMP repository.

    git clone https://github.com/OpenSimulationInterface/osi-sensor-model-packaging.git
  2. Switch to the OSMP repository.

    cd osi-sensor-model-packaging
  3. Update and initialize the OSI submodule.

    git submodule update --init
  4. Switch to the examples/ directory.

    cd examples
  5. Create a new directory called build/.

    mkdir -p build
  6. Switch to the build/ directory.

    cd build
  7. Run cmake in the parent directory.

    cmake ..
  8. Run cmake build.

    cmake --build .