Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dock when rain detected and only dock when mowing #72

Closed
wants to merge 1 commit into from

Conversation

olliewalsh
Copy link
Collaborator

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
Copy link
Owner

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
Copy link
Collaborator

... @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
Copy link
Owner

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

@olliewalsh
Copy link
Collaborator Author

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.

Log the docking reason.

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.
@Apehaenger
Copy link
Collaborator

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!

@@ -474,6 +506,7 @@ void checkSafety(const ros::TimerEvent &timer_event) {
currentBehavior != &DockingBehavior::INSTANCE &&
currentBehavior != &UndockingBehavior::RETRY_INSTANCE
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed this in a rebase, should be:

            dockingNeeded &&
            currentBehavior != &DockingBehavior::INSTANCE &&
            currentBehavior != &UndockingBehavior::RETRY_INSTANCE &&
            currentBehavior != &IdleBehavior::INSTANCE &&
            currentBehavior != &UndockingBehavior::INSTANCE &&
            currentBehavior != &AreaRecordingBehavior::INSTANCE

@olliewalsh
Copy link
Collaborator Author

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

@Apehaenger
Copy link
Collaborator

@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
Copy link
Collaborator Author

Re-implemented in #148

@olliewalsh olliewalsh closed this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants