ClemensElflein / open_mower_ros

Other
500 stars 124 forks source link

Dock when rain detected and only dock when mowing #72

Closed olliewalsh closed 3 weeks ago

olliewalsh commented 11 months ago

Log the docking reason. Only dock when mowing, otherwise can abort DockingBehavior.

Add option to dock when rain is detected. Initial logic is very basic, just dock when rain detected and if automatic mode is set will stay docked until rain is no longer detected.

ClemensElflein commented 6 months ago

Looks good to me, is this ready for merge / tested, or still draft? @Apehaenger have you tested this by any chance? I have seen some rain related sounds in your sound PR ;-)

Can you please add the new config option to the example config.sh

Apehaenger commented 6 months ago

... @Apehaenger have you tested this by any chance? I have seen some rain related sounds in your sound PR ;-)

I'm sorry, have had it on my own test & merge list, but had trouble last year with my GPS. So: Not tested by me yet. But I can test (if no other tested before) some-when the next days.

ClemensElflein commented 6 months ago

No problem, I'll also do a testing session soon.

olliewalsh commented 6 months ago

IIRC this was working very reliably on my c500 last year. Can't retest right now though as I only have my sa650 running, will be a few week until I have time get the c500 (dock) set up.

Apehaenger commented 6 months ago

Found some time to test it today.

In principle it work! thumbs-up, but I've some comments:

  1. Look like the mower drive his current routed path/line to the end before changing his route target to the dock. This doesn't matter to me, because most of my areas are more or less small, but if I would have a large square area, it could be a long way till he turns around.

  2. After he's back in dock, my log get flooded with

Mar 16 16:51:11 Dolly openmower_launch[118451]: [ INFO] [1710604271.998300408]: - Entered state: IDLE
Mar 16 16:51:11 Dolly openmower_launch[118451]: [ INFO] [1710604271.998336389]: --------------------------------------
Mar 16 16:51:12 Dolly openmower_launch[118421]: [ INFO] [1710604271.999872809]: Cancel action "exe_path"
Mar 16 16:51:12 Dolly openmower_launch[118421]: [ WARN] [1710604272.000039417]: FTCLocalPlannerROS: FTC planner was cancelled.
Mar 16 16:51:12 Dolly openmower_launch[118421]: [ INFO] [1710604272.000105064]: Controller will take care of stopping
Mar 16 16:51:12 Dolly openmower_launch[118460]: [ INFO] [1710604272.002052608]: new actions registered: mower_logic:idle registered 2 actions.
Mar 16 16:51:12 Dolly openmower_launch[118451]: [ INFO] [1710604272.003434178]: successfully registered actions for mower_logic:idle
Mar 16 16:51:12 Dolly openmower_launch[118443]: [ INFO] [1710604272.007625927]: Got getMowingArea call with index: 0
Mar 16 16:51:12 Dolly openmower_launch[118443]: [ INFO] [1710604272.011568957]: Getting Docking Point
Mar 16 16:51:12 Dolly openmower_launch[118429]: [ INFO] [1710604272.017629806]: dropping GPS update, since gps_enabled = false.
Mar 16 16:51:12 Dolly openmower_launch[118451]: [ INFO] [1710604272.021852314]: successfully set GPS to 0
Mar 16 16:51:12 Dolly openmower_launch[118451]: [ INFO] [1710604272.254297070]: Docking: Rain detected
Mar 16 16:51:12 Dolly openmower_launch[118451]: [ INFO] [1710604272.254412772]: - Behaviour.h: abort() called
Mar 16 16:51:12 Dolly openmower_launch[118460]: [ INFO] [1710604272.265441060]: new actions registered: mower_logic:idle registered 2 actions.
Mar 16 16:51:12 Dolly openmower_launch[118451]: [ INFO] [1710604272.266847686]: successfully registered actions for mower_logic:idle

for about 4 Minutes and the WebGUI's bottom button-bar is flickering. Also doesn't harm to me, but look unusual.

  1. Just realized that I didn't had automatic mode enabled, thus I didn't tested if he start again when dry. If interested, can do it tomorrow.

Who's interested, here's the recorded period in my Grafana stats (login & password is our often used "o.......r" ):

Click me!

olliewalsh commented 5 months ago

@Apehaenger re 1, could it have been just that it wasn't getting rain=true constantly for 20s?

Apehaenger commented 5 months ago

@Apehaenger re 1, could it have been just that it wasn't getting rain=true constantly for 20s?

Yes indeed. I tested with a SA type mower. It doesn't has that plate-like rain sensor like the C500. It has a flat and sloping rain sensor. I triggered the rain with a watering-can and once I heard her singing "It's raining again", I stopped watering the sensor. Think it's impossible to get a stable 20 second long rain signal for the SA Type mower, except if he drive into the pool ;-)

However, it recognize the rain, drives to the end of his current path (not area) and then goes back to his dock. In principle it works well (for my normal/small area)

olliewalsh commented 3 weeks ago

Re-implemented in https://github.com/ClemensElflein/open_mower_ros/pull/148