kas-lab / suave

An Exemplar for Self-Adaptive Underwater Vehicles performing pipeline inspection
https://kas-lab.github.io/suave/
Apache License 2.0
29 stars 9 forks source link

Change plan strategy for generate search path #71

Closed Rezenders closed 1 year ago

Rezenders commented 1 year ago

When the function design with lower altitude (fd_generate_search_path_low) is selected it is never adapted again for two reasons:

  1. If the water visibility is lower than the expected for fd_generate_search_path_low there are no alternatives to it
  2. When the water visibility starts growing, it keeps fulfilling the expected value for fd_generate_search_path_low, so there is no reason to choose the ones with higher altitude

Reason 1 is not a problem, but reason 2 is. A solution is to re-plan the function f_generate_search_path at every cycle

Rezenders commented 1 year ago

My idea for now is to create a subclass of RosReasoner and override the plan method.

JulianePa commented 1 year ago

I have no idea how much implementation work this would be, but could we design something like a QA "efficiency" that is the difference between the expected water visibility of the current function design and the measured one? Then it is negative if the expected water visibility is less than the measured one (i.e. in the case where we want to choose another function design). If it is negative, reconfiguration is triggered and another function design with higher expected water visibility is chosen

Rezenders commented 1 year ago

the difference between the expected water visibility of the current function design and the measured one?

Good idea, I will go for this. Might be possible to do it with swrl rules but I think I go for a python solution to be faster.

Rezenders commented 1 year ago

Done at 66e4923caf5b0788172aa3a3483651847c87f775

the difference between the expected water visibility of the current function design and the measured one?

This basically results in the adaptation being triggered unless the measured water visibility is equal to the expected water visibility. Because if it is lower, it is already being triggered in the regular analyze process. But anyway, this is not a problem.