hatfield-c / avl

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

[AVL-32] Actuators can be commanded by student scripts #32

Closed hatfield-c closed 2 years ago

hatfield-c commented 2 years ago

Students should be able to command the Ego vehicle in their task scripts through an exposed actuator API. Make a few simple actuators for now, as more can be added later. Actuators in this issue are:

hatfield-c commented 2 years ago

Actuators will be provided to the students through a DataBus interface like in AVL-31. The students will send a 4 byte array to the class, composed of:

The usage of the data bytes will vary from actuator to actuator. The last command sent to an actuator is the one that will be executed.

hatfield-c commented 2 years ago

Accelerator will receive a cruising speed. When the velocity of the ego vehicle drops below this cruising speed, the accelerator will apply gas to bring it back up to the desired speed. The ego vehicle can only increase velocity by a certain amount every frame. The accelerator will only apply enough gas to reach the cruising speed.

Brakes will receive the amount of time to apply the brakes. A command of 0 seconds stops previous braking.

Steering will receive the angle to turn as well as the amount of time to spend turning.

All commands are overwritten by more recent commands sent to each system.

hatfield-c commented 2 years ago

This issue is now complete and will thus be closed.