Closed superdan-t closed 2 years ago
- We want to support "in-place" turns where one side drives forward and the other in reverse. We have not worked out how this will actually work from a controller perspective. Suggestions are welcome
From what I know about controllers:
- We want to support "in-place" turns where one side drives forward and the other in reverse. We have not worked out how this will actually work from a controller perspective. Suggestions are welcome
From what I know about controllers:
- diagonal stick => forward/backward + turn => one side goes half-speed, the other goes full-speed
horizontal stick => turn in-place => one side doesn't move, the other goes full-speed
- it could also be that one side goes backwards, the other side goes forwards. I think that's it
Thinking about this makes me realize that in-place turn will probably require a separate interface in this drive module (where we can set the left and right target speeds separately).
We'll have to experiment with the controller to see what we like most. Ideally, we will be able to reconfigure the bindings at runtime using our GUI once the product is more advanced.
I was thinking the primary drive mode would use right trigger for throttle/forward speed, left trigger for reverse speed, and left joystick for steering. The drive team lead suggested the rover should do an in-place turn if we are turning the joystick but applying no throttle.
Just cleaning up the old issues. I should've closed this back with #15
Main Objective
Create the software module responsible for processing drive commands and writing motor speed to the ODrives. This task does not include interfacing with the ODrives (yet) since another member is currently developing our ODrive and CAN bus controller.
Design Info
Requirements
DriveController()
. Place the hpp/cpp file for the module insrc/subsystem_computer/
. The new subsystems program has no main file yet, but you will likely need a temporary for testing.int8_t
where -128 is maximum in reverse and 127 is maximum forward. You can also use a float where 1.0 is the max forward and -1.0 is the max backward. The maximum velocity is something we'll have to determine by testing, so use anything for now.DriveController::update_drive_subsystem()
to be called every main loop that applies these changes. Usestd::chrono
for timing (you can save times using high_resolution_clock and then check how much has elapsed since the last call with chrono).Design Suggestions
Future Considerations