ClemensElflein / open_mower_ros

Other
498 stars 122 forks source link

No retry docking #87

Closed bodop closed 3 months ago

bodop commented 3 months ago

My garden is so small, that the mower does not need to charge to complete the mowing area. So I decided to place the base station in an unreachable place and recorded a dummy docking location instead. Obviously docking will never succeed. So I created the possibility to configure no retries. In addition it turned out, that even one configured retry ended in an infinite loop.

ClemensElflein commented 3 months ago

Thank you for the PR, LGTM

bodop commented 3 months ago

At least reset() in line 207 caused an infinite loop ignoring the number of configured retries. OK, I assumed, that approach_docking_point() always succeeds. Perhaps one should also add reset() after line 202.

"disable_docking" would be a different approach. My approach has the advantage, that it is simple and ends in a defined end position.

olliewalsh commented 3 months ago

At least reset() in line 207 caused an infinite loop ignoring the number of configured retries. OK, I assumed, that approach_docking_point() always succeeds. Perhaps one should also add reset() after line 202.

"disable_docking" would be a different approach. My approach has the advantage, that it is simple and ends in a defined end position.

ah, so you want it to move to the approach point and stop? What if the docking approach point is in a different isolated area?

bodop commented 3 months ago

If the approach point is in a different isolated area, the behavior is identical to the one before this pull request. Only the number of retries to reach an unreachable point may now be set to zero.

olliewalsh commented 3 months ago

Ok, so just want to skip the dock_straight stage. Why not just add a param to explicitly disable this?

Think you're correct about needing a reset() at 202 before returning to idle, plus the reset() at the end before returning to idle.