Feature Overview
The feature allows users to replay existing captures as if they were coming from an actual sensor.
Usage:
ouster-cli source <source_url> sensor_replay [OPTIONS]
This will command will start a:
-
an HTTP server to respond to sensor REST APIs calls
-
a UDP stream of sensor packets representing Lidar and IMU packets
-
And an mDNS service for virtual sensor discovery
Different apps would then be able to connect to the virtual sensor as shown below:
Usage Patterns
when you launch the ouster-cli soruce <source_url> sensor_replay first time with no additional options it will offer you some instructions on how it can be used, there are mainly two modes of operation to it:
-
To use without docker:
-
Server:
-
ouster-cli source <source_url> sensor_reply --http-port 8080
-
-
Client:
-
http_proxy=http://0.0.0.0:8080 ouster-cli source 127.0.0.1 viz
-
-
-
To use with docker
-
Precondition: must have followed the docker postinstall guide: https://docs.docker.com/engine/install/linux-postinstall/
-
Server:
-
ouster-cli <source_url> sensor_replay --dockerize # or just /-d/ -
First time users will be prompted to construct the docker image (1 min)
-
-
Client:
-
ouster-cli 127.0.0.1 viz OR ./OusterStudio-2.3.1.AppImage
-
-
-
Other alternative approaches:
-
ReverseProxy (NGIX)
-
Elevated Permissions for ouster-cli
-
Command OPTIONS
Following is a full listing of the command available options
Usage: ouster-cli source SOURCE sensor_replay [OPTIONS]
[BETA] Replay PCAP|BAG|OSF|MCAP as a Sensor
Options:
-d, --dockerize Run the sensor replay inside a Docker
container
-p, --http-port INTEGER Change the port used by the sensor HTTP
server [default: 80]
--lidar-port INTEGER lidar port [default: -1]
--imu-port INTEGER imu port [default: -1]
--loop BOOLEAN When playback reaches the end of the file,
restart from the begnning [default: True]
--rate FLOAT udp packets replay rate. [default: 1.0]
--udp-dest TEXT The destination IP to send the replayed
packets to. [default: 127.0.0.1]
--operating-mode [NORMAL|STANDBY]
Set sensor Operating Mode on startup.
[default: NORMAL]
--sensor-sn TEXT Override Sensor SN. [default: ""]
--hide-diagnostics Hide diagnostic information.
--help Show this message and exit.
Use Cases
-
Nothing replaces the interactions with the real sensor (users will need a physical sensor to confirm their application)
-
However, one could use this feature to kick start their development effort
-
Replicate multiple sensors: create multiple virtual sensors for stress test the system
-
Speed up testing: for example switching between NORMAL & STANDBY modes faster for testing application lifecycle (~ takes 30 seconds on a real sensor).
-
Use to convert to a data format that not directly supported by ouster-cli
Known Limitations
-
Certain properties are mutable while others are immutable, for example it is possible to mock the sensor ports or operating mode but it is not possible to properly mutate the LidarMode property
-
The feature doesn’t support multi-sensor datasets yet. If you supply a multisensor dataset only one sensor will be responding to http call and the published packets will be mixed up
-
It is not yet possible to start a sensor_replay service under MacOS due to NECP restrictions
