Abstracted Data Model

PolySync's main form of communication involves using a set of common messages that are broadcast and received to the PolySync bus through a publisher/subscriber model. PolySync ships with a core data model, as well as other data model modules. This includes typical types of data that are often seen on automated vehicles, as well as our own messages, that enable some of the API functionality. ![Big Picture](/wp-content/uploads/2016/06/basics-BigPicture_pubsub.png) The data model provides an abstraction layer that separates data consumers (program nodes) from data producers (Dynamic Drivers). The data within each message is in the vehicle-centered reference coordinate frame and is time stamped with UTC time, by default. This makes it easy to swap out hardware and software without breaking the system or the developer's code. ### Example of sensor abstraction Architecturally, the Dynamic Driver for the Lux looks like this: ![Lux Node](/wp-content/uploads/2016/06/basics-LuxNode.png) The Dynamic Driver abstracts the "native bus" of the sensor─Ethernet and CAN─into a set of generalized data types (messages) on the PolySync bus. Once these messages are published, they are available to any other participant on the bus. They also contain any data generated by other sensors or processes. For instance, the **ps_lidar_points_msg** contains the LiDAR points generated by each of the LiDAR sensors on the bus. Each LiDAR point contains generalized data: * Sensor description * String name for the source sensor * Native timestamp * Some sensors provide their own timestamps * Echo number * Used for LiDAR that supports multiple returns (i.e. through transparent objects) * Echo pulse width * Duration of energy return * Layer * Scanning LiDAR usually returns multiple "layers" of data in horizontal lines * Positions * The position of the point, returned in vehicle centered reference frame There is also a header that contains: * Message type * A string name for the sensor * Timestamp * Usually a UTC timestamp that comes from GPS * Source GUID * A unique identifier for the node, generated by PolySync at runtime