Recording in NanoVer
This pages introduces: (a) the NanoVer data streams, which you can record to ‘save’ your NanoVer session; and (b) the file format of the recorded data. Head to the NanoVer Basics tutorial page for more information on how to record a NanoVer session and how to process NanoVer recordings.
NanoVer message stream
A NanoVer server communicates to connected clients via a stream of messages. The standard server uses messages of three
types: command`, state, frame for requests, shared data, and simulation information respectively. A NanoVer
recording is a record of this stream of messages and the times they arrived.
Note
Previously, NanoVer recordings were a pair of files ending in .traj and .state respectively.
This format is now obsolete and can be converted using a simple command line tool.
Recording file format
Overview
The recording file is an uncompressed zip archive comprised of at least two files:
The messages file,
messages.msgpack, which contains the sequence of messages, each individually encoded with MessagePack and concatenated into a single binary file.The index file,
index.msgpack, which is a list of metadata entries for each frame, specifying at the minimum their position in the messages file, the timestamp of their arrival, and the types of message contained. This binary file is a single list encoded with MessagePack.
Index file
The index file exists to provide an overview of the content of the recording file and allow efficient access to individual messages. It is a list of objects, each representing a message present in the recording, with the following fields:
The
offsetin bytes where the MessagePack data of the message begins in the messages file.The
lengthin bytes of the MessagePack data of the message.A
metadataobject pertaining to the message, with at least the following fields:The
timestampfor when the message was received.The
typeslist, noting the types the message contains (e.gframe,state,command).
# example index data
[
{
"offset": 0,
"length": 64,
"metadata": {
"timestamp": 0,
"types": ["frame"],
},
},
{
"offset": 64,
"length": 64,
"metadata": {
"timestamp": 100,
"types": ["state"],
},
}
]