Closed mikeferguson closed 5 months ago
This is ready to review - addresses everything that is crossed out in the design doc
I'll do another pass of documentation (especially around coordinate frame assumptions) once we switch to using the upstream controller.
I walked through the whole docking loop - step by step (I've got some chicken scratch we can probably turn into a state diagram later):
@SteveMacenski - I'm going to merge this so I can start working on top of graceful controller - if you have any comments after the latest revamp - just leave them here and I'll get them addressed in another PR/commit
@mikeferguson
ex
approachDock
& resetApproach
, I noticed that loop doesn't have a max timeout condition. Those could both use the same param + throw FailedToControl
typee
UNKNOWN
failure?undockRobot
's break
for cancel/preempt calls a terminate_current
not terminate_all
On the first point (L402) - it's my understanding that plain "throw" is actually preferred since it won't recreate the exception: https://stackoverflow.com/questions/2360597/c-exceptions-questions-on-rethrow-of-original-exception - but I'll admit, I don't use exceptions all that much, and so I'm not 100% sure
Oh, if that works, that works. I didn't know that throw
in that context would implicitly throw the exception in the scope. I'd just test to verify that you get the right contextual errors and that the error_code
s are populated (if it works for one, it'll work for all). I didn't expect C++ to be that non-explicit about it. I learned something new today
re: stashDockData - it probably needs a rename - it also handles cleaning up that raw pointer that gets created when not using the dock database
If you added a success
field, you could use that whether or not to store it or just clean it
This is still a WIP - opening for visibility