Closed merlinran closed 3 years ago
Thank you! This sounds promising. I am still working on a big PCB project but do let me know if any of these are blocking you.
closed in favour of https://github.com/Twisted-Fields/acorn-precision-farming-rover/pull/7
To show the meaningful diffs, it's better to be reviewed after https://github.com/Twisted-Fields/acorn-precision-farming-rover/pull/6. I'll add inline comments at that point.
It breaks the main loops of
remote_control_process.py
(nearly 1000 lines of code!) andmaster_process.py
into more manageable methods each within 100 lines. Shorter methods are easier to reason about and have proper level of abstraction.To make sure I didn't break things, I ran the new and old code side by side, and didn't see difference on the behaviour, except a few bugs of the old code which have been fixed in this PR. I wasn't able to make acorn really move in the simulation with this PR, due to a problem exists in the old code too(
travel_speed
is always 0), but after hardcoding the default nav parametertravel_speed
, the simulated Acorn could rover could follow any path back and forth. Some bugs may be revealed only when running on real hardware, though I'd be surprised if there are many.