Commander has become unmanageable. After the next stable release goes out let's decide on a path forward for a rewrite or major restructuring.
@LorenzMeier @bkueng
I believe https://github.com/PX4/Firmware/pull/6750 is the only major commander work in progress.
Relevant - https://github.com/PX4/Firmware/pull/6955
Notes and Ideas
Issue Tracker
In addition to the above notes and ideas:
+1 for "A specification for the intended state machine logic is created and reviewed before we start coding"
It's nice to see that you're pushing this forward @dagar
Let me add some additional points/remarks:
- abstract the gps position to just has_position. It should not matter what the position source is (gps, vision, ...), as much as that is possible.
this is very important for the future, I think.
State machine testing: https://github.com/PX4/Firmware/tree/master/src/modules/commander/commander_tests
Update for anyone interested in this.
There's likely never going to be a full "commander rewrite", but gradually we are getting the complexity under control. The biggest change I want to push for this year is finding some kind of framework or library for handling the state machine (https://github.com/PX4/Firmware/issues/10584).
@dagar how about ESTELLE https://books.google.com/books?id=-OJ6CwAAQBAJ&pg=PA313&lpg=PA313&dq=estel+state+transition&source=bl&ots=-m7VzTVeGG&sig=ACfU3U3UsKzhqPvd6-J213YKpctpNGNpAA&hl=en&sa=X&ved=2ahUKEwjV--nmgrngAhUUJDQIHThyDUAQ6AEwAHoECAIQAQ#v=onepage&q=estel%20state%20transition&f=false
Or is that too old-school?
Here is a more complete reference http://www-lor.int-evry.fr/idemcop/uk/est-lang/download/estelle-tutorial-slides.pdf
Most helpful comment
It's nice to see that you're pushing this forward @dagar
Let me add some additional points/remarks:
It would be cool to have an automated way to generate state transition diagrams from source (or the other way around). This would ensure the docs always reflects the state of the code.