diff --git a/rb_ws/src/buggy/scripts/serial/host_comm.py b/rb_ws/src/buggy/scripts/serial/host_comm.py index 14d4e93..0d882e3 100644 --- a/rb_ws/src/buggy/scripts/serial/host_comm.py +++ b/rb_ws/src/buggy/scripts/serial/host_comm.py @@ -63,6 +63,7 @@ def update(self, b): MSG_TYPE_STEERING = b'ST' MSG_TYPE_BRAKE = b'BR' MSG_TYPE_ALARM = b'AL' +MSG_TYPE_BNYATEL = b'BT' @dataclass class Odometry: @@ -71,6 +72,15 @@ class Odometry: radio_seqnum: int gps_seqnum: int +@dataclass +class BnyaTelemetry: + x: float + y: float + velocity: float # In METERS / SECOND + steering: float # In DEGREES + heading: float # In RADIANS + heading_rate: float # In RADIANS / SECOND + class IncompletePacket(Exception): pass @@ -183,6 +193,9 @@ def read_packet(self): debug = struct.unpack('