hatfield-c / avl

Repository for the [AVL] Autonomous Vehicle Lab project at UT Dallas
2 stars 7 forks source link

[AVL-31] Sensors can be read by student scripts #31

Closed hatfield-c closed 2 years ago

hatfield-c commented 2 years ago

Create some sample sensors for students to read from. Additional sensors can be added as needed. Sensors to include for this issue are:

hatfield-c commented 2 years ago

There needs to be a state memory cell that students can use to store an integer which represents the current state of their system. This will allow more complex behavior, and students will be able to read what state they are in no matter what task is being executed.

This has been replaced with 256 byte memory

hatfield-c commented 2 years ago

Sensor data will be provided to students through a DataBus interface. Students will send a binary command to the interface, that is essentially just the address of the sensor that student's wish to read from. In response they will receive a byte array composed of 4 bytes,

Each lidar will count as a separate sensor.

hatfield-c commented 2 years ago

The binary command is composed of 2 bytes:

The lidar is now a single sensor called the Lidar Array, and the option data specifies which of the lidar sensors to read from

hatfield-c commented 2 years ago

As per AVL-35, a significant amount of this has changed. Now, sensors will place their data into memory, such that tasks can now read from the memory.

hatfield-c commented 2 years ago

Sensors no longer place their data into memory. Instead all buses return a byte array that is of variable size so that all sensors can return data along the bus.

In terms of simulation, this is equivalent to the bus returning a memory address that contains the desired system info. This implementation simplifies the architecture.

hatfield-c commented 2 years ago

Sensor data is now access through pre-formatted variables in the device registry

hatfield-c commented 2 years ago

This issue is now complete and will thus be closed.