📄️ Unit
In Basis, a Unit is a component that interfaces with robot code and interacts with other Units to perform coordinated tasks. Units can communicate with one another within the same process, across different processes, or even on separate machines. This inter-Unit communication is achieved through a publish-subscribe mechanism centered around topics.
📄️ Serialization
When messages are exchanged between processes in Basis, they must be serialized by the publisher and deserialized by the subscriber. In Basis, this is accomplished using a serializer plugin. The serialization format and the corresponding serializer plugin are determined by the prefix of the type field in the Unit's configuration.
📄️ Publishing / Subscribing
At its core, Basis is a (pub/sub framework)[https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern]. Units and various tooling can send and receive messages on named topics. Each message has a type, and generally topics should only contain messages of one type.
📄️ Recording
Basis uses MCAP as the on-disk format for recorded data.
📄️ Time
Basis uses monotonic time for all timestamps. A common antipattern in robotics is to use system time, but not handle time jumps properly - it's very easy to have a misconfigured system clock that jumps instead of skewing, or doesn't wait for GPS synced time before starting the robotics code. Using monotonic time ensures that no guards are needed when writing algorithms dealing with time.