Trajectory File Creation

By attaching the monoDrive State Sensor to a vehicle, users can save scenarios to monoDrive trajectory files that can then be used in the Replay modes of the monoDrive Simulator and Scenario Editor.

Using the State Sensor

In order to save all vehicles in a single simulation and generate a Trajectory File for Replay mode, a monoDrive State Sensor should be placed on the ego vehicle (i.e. the vehicle the simulation will control during playback). To attach the state sensor:

  1. Click on the vehicle to designate as the ego vehicle

  2. In the vehicle's "Details" window, click the "Add Component" button at the top and search for "State Sensor"

  3. Select the State Sensor component from the list to attach it.

  4. Click on the StateSensor component in the vehicle's hierarchy in side of the "Details" window to bring up the settings for the sensor.

  5. Setup the tagging system for the vehicle (see "Tagging System" below). Ensure that the selected vehicle contains the "ego" tag or the playback of the trajectory will not work.

  6. Go to the StateSensor's Streamer group in the "Details" window and select "File Streamer Component" as the "Streamer Type."

  7. Under the "Streamer" section expand the "File Settings" and type in the name of the file to save the trajectory. If there is a file with the same name, it will be overwritten with the new file.

  8. Under the "Tag System" section, click on the + button to add the tags of the objects you want to record with the state sensors under the Desired Tags. On a similar way, add the tags of the actors you do not want to record under the Undesired Tags.

  9. On the Sampling Control select 20 hz rate to save the state sensor data.

  10. Hit "Play" at the top of the Scenario Editor, the file set in the previous step should now be populated with all the desired tags.

NOTE: You must have a vehicle with the tag "ego," otherwise it cannot be used with the monoDrive client.

Replaying Trajectory Files

The scene that was recorded can be played back using the "Replay" or "Replay Step" modes of the monoDrive Simulator. For more information on these simulation modes see: