ClemensElflein / open_mower_ros

Other
500 stars 124 forks source link

Save/restore mowing progress across service/container restarts #62

Closed olliewalsh closed 4 months ago

olliewalsh commented 1 year ago

Records the current plan progress in a bag file and restores on restart if exactly the same plan is being mowed.

A digest of all of the poses in the plan is used to determine if the plan is identical. This should work regardless of why the plan changed e.g if any params that affect slicing change, or if the slicer logic changes.

Apehaenger commented 11 months ago

Like the function of this PR and was interested if mow_angle_increment get also saved. Thus I tested it together with https://github.com/ClemensElflein/open_mower_ros/pull/65 (because they look don't influencing).

Started mowing, did wait the first two outlines and then I manually tilted him. Cleared emergency and after some seconds he started to mow again... cool, looked like https://github.com/ClemensElflein/open_mower_ros/pull/65 work, but... Don't know if it has something to do with one of this two merged PRs, but he tried to drive outside his area, looks like a large (>20cm shift) then openmower.service crashed:

Openmower Log
Oct 14 16:09:39 robert openmower_launch[906]: [ INFO] [1697292579.650686888]: MowingBehavior: (MOW) First point reached - Executing mow path with 70 poses
Oct 14 16:09:39 robert openmower_launch[878]: [ INFO] [1697292579.667684829]: FTCLocalPlannerROS: Got new global plan with 70 points.
Oct 14 16:09:39 robert openmower_launch[878]: [ INFO] [1697292579.668531727]: FTCLocalPlannerROS: PRE_ROTATE finished. Starting following
Oct 14 16:09:39 robert openmower_launch[878]: [ INFO] [1697292579.668684132]: FTCLocalPlannerROS: Switching to state 1
Oct 14 16:09:39 robert openmower_launch[878]: [ERROR] [1697292579.717233654]: FTCLocalPlannerROS: Robot is far away from global plan. distance (2.12546) > config>
Oct 14 16:09:39 robert openmower_launch[878]: [ INFO] [1697292579.717468874]: FTCLocalPlannerROS: Switching to state 4
Oct 14 16:09:39 robert openmower_launch[878]: [ WARN] [1697292579.718444862]: No velocity command received from controller! 
Oct 14 16:09:39 robert openmower_launch[906]: [ INFO] [1697292579.763427983]: MowingBehavior: (MOW) Progress: 0/70
Oct 14 16:09:42 robert openmower_launch[878]: [ WARN] [1697292582.762000879]: No velocity command received from controller! 
Oct 14 16:09:44 robert openmower_launch[878]: [ WARN] [1697292584.711977465]: The controller has been aborted after it exceeded the patience time
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.751241509]: MowingBehavior: (MOW)  Got status 5 from MBF/FTCPlanner -> Stopping path execution.
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766562120]: >> MowingBehavior: (MOW) PlannerGetProgress currentIndex = 0 of 70
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766685322]: >>> State: Aborted <<<
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766745895]: MowingBehavior (ErrorCatch): Poses before trim:70
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766800635]: MowingBehavior (ErrorCatch): Trimming 1 points.
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766868968]: MowingBehavior (ErrorCatch): Poses after trim:69
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.766913338]: MowingBehavior: (MOW) PAUSED due to MBF Error
Oct 14 16:09:44 robert openmower_launch[917]: [ INFO] [1697292584.776989160]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.781487921]: successfully registered actions for mower_logic:mowing
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.788341301]: MowingBehavior: CONTINUING
Oct 14 16:09:44 robert openmower_launch[917]: [ INFO] [1697292584.802406038]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.803457562]: successfully registered actions for mower_logic:mowing
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.803601301]: MowingBehavior: Path segment length: 69 poses.
Oct 14 16:09:44 robert openmower_launch[906]: [ INFO] [1697292584.803667467]: MowingBehavior: (FIRST POINT)  Moving to path segment starting point
Oct 14 16:09:44 robert openmower_launch[878]: [ INFO] [1697292584.830230313]: FTCLocalPlannerROS: Got new global plan with 87 points.
Oct 14 16:09:46 robert openmower_launch[878]: [ INFO] [1697292586.174910186]: FTCLocalPlannerROS: PRE_ROTATE finished. Starting following
Oct 14 16:09:46 robert openmower_launch[878]: [ INFO] [1697292586.175145757]: FTCLocalPlannerROS: Switching to state 1
Oct 14 16:09:46 robert openmower_launch[906]: [ INFO] [1697292586.536081674]: GPS quality: 0.913977
Oct 14 16:09:54 robert openmower_launch[878]: [ INFO] [1697292594.475600313]: FTCLocalPlannerROS: switching planner to position mode
Oct 14 16:09:54 robert openmower_launch[878]: [ INFO] [1697292594.475846013]: FTCLocalPlannerROS: Switching to state 2
Oct 14 16:09:57 robert openmower_launch[906]: [ INFO] [1697292597.036098677]: GPS quality: 0.897409
Oct 14 16:10:07 robert openmower_launch[906]: [ INFO] [1697292607.036155473]: GPS quality: 0.913977
Oct 14 16:10:14 robert openmower_launch[878]: [ WARN] [1697292614.525059937]: FTCLocalPlannerROS: Could not reach goal position. config.goal_timeout (20) reached>
Oct 14 16:10:14 robert openmower_launch[878]: [ INFO] [1697292614.525346452]: FTCLocalPlannerROS: Switching to state 3
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.224918191]: FTCLocalPlannerROS: POST_ROTATE finished.
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.225134485]: FTCLocalPlannerROS: Switching to state 4
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.274387123]: Action "move_base" succeeded!
Oct 14 16:10:16 robert openmower_launch[898]: [ INFO] [1697292616.288329865]: Clearing Nav Point
Oct 14 16:10:16 robert openmower_launch[898]: [ INFO] [1697292616.288626787]: Map Position: x=3.25704, y=-9.05945
Oct 14 16:10:16 robert openmower_launch[898]: [ INFO] [1697292616.288723341]: Map Size: x=13.3056, y=24.6924
Oct 14 16:10:16 robert openmower_launch[898]: [ INFO] [1697292616.608306659]: docking pose: position:
Oct 14 16:10:16 robert openmower_launch[898]:   x: 1.27453
Oct 14 16:10:16 robert openmower_launch[898]:   y: 2.07937
Oct 14 16:10:16 robert openmower_launch[898]:   z: 0
Oct 14 16:10:16 robert openmower_launch[898]: orientation:
Oct 14 16:10:16 robert openmower_launch[898]:   x: 0
Oct 14 16:10:16 robert openmower_launch[898]:   y: 0
Oct 14 16:10:16 robert openmower_launch[898]:   z: 0.926374
Oct 14 16:10:16 robert openmower_launch[898]:   w: 0.376605
Oct 14 16:10:16 robert openmower_launch[898]: 
Oct 14 16:10:16 robert openmower_launch[906]: [ INFO] [1697292616.611812951]: MowingBehavior: (MOW) First point reached - Executing mow path with 69 poses
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.630069197]: FTCLocalPlannerROS: Got new global plan with 69 points.
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.631005557]: FTCLocalPlannerROS: PRE_ROTATE finished. Starting following
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.631168684]: FTCLocalPlannerROS: Switching to state 1
Oct 14 16:10:16 robert openmower_launch[878]: [ERROR] [1697292616.681390051]: FTCLocalPlannerROS: Robot is far away from global plan. distance (1.06808) > config>
Oct 14 16:10:16 robert openmower_launch[878]: [ INFO] [1697292616.681600104]: FTCLocalPlannerROS: Switching to state 4
Oct 14 16:10:16 robert openmower_launch[878]: [ WARN] [1697292616.682119024]: No velocity command received from controller! 
Oct 14 16:10:16 robert openmower_launch[906]: [ INFO] [1697292616.730557134]: MowingBehavior: (MOW) Progress: 0/69
Oct 14 16:10:17 robert openmower_launch[906]: [ INFO] [1697292617.036108378]: GPS quality: 0.913977
Oct 14 16:10:19 robert openmower_launch[878]: [ WARN] [1697292619.723834382]: No velocity command received from controller! 
Oct 14 16:10:21 robert openmower_launch[878]: [ WARN] [1697292621.673928903]: The controller has been aborted after it exceeded the patience time
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.712378115]: MowingBehavior: (MOW)  Got status 5 from MBF/FTCPlanner -> Stopping path execution.
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.726704131]: >> MowingBehavior: (MOW) PlannerGetProgress currentIndex = 0 of 69
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.726843888]: >>> State: Aborted <<<
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.726925739]: MowingBehavior (ErrorCatch): Poses before trim:69
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.726994979]: MowingBehavior (ErrorCatch): Trimming 1 points.
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.727073552]: MowingBehavior (ErrorCatch): Poses after trim:68
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.727142514]: MowingBehavior: (MOW) PAUSED due to MBF Error
Oct 14 16:10:21 robert openmower_launch[917]: [ INFO] [1697292621.738103125]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.740113250]: successfully registered actions for mower_logic:mowing
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.747566513]: MowingBehavior: CONTINUING
Oct 14 16:10:21 robert openmower_launch[917]: [ INFO] [1697292621.765099417]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.766612325]: successfully registered actions for mower_logic:mowing
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.766815952]: MowingBehavior: Path segment length: 68 poses.
Oct 14 16:10:21 robert openmower_launch[906]: [ INFO] [1697292621.767085875]: MowingBehavior: (FIRST POINT)  Moving to path segment starting point
Oct 14 16:10:21 robert openmower_launch[878]: [ INFO] [1697292621.792553944]: FTCLocalPlannerROS: Got new global plan with 43 points.
Oct 14 16:10:23 robert openmower_launch[878]: [ INFO] [1697292623.538209798]: FTCLocalPlannerROS: PRE_ROTATE finished. Starting following
Oct 14 16:10:23 robert openmower_launch[878]: [ INFO] [1697292623.538747440]: FTCLocalPlannerROS: Switching to state 1
Oct 14 16:10:27 robert openmower_launch[906]: [ INFO] [1697292627.536116777]: GPS quality: 0.889886
Oct 14 16:10:30 robert openmower_launch[878]: [ INFO] [1697292630.538665099]: FTCLocalPlannerROS: switching planner to position mode
Oct 14 16:10:30 robert openmower_launch[878]: [ INFO] [1697292630.539632069]: FTCLocalPlannerROS: Switching to state 2
Oct 14 16:10:37 robert openmower_launch[906]: [ INFO] [1697292637.536108948]: GPS quality: 0.913977
Oct 14 16:10:47 robert openmower_launch[906]: [ INFO] [1697292647.536126187]: GPS quality: 0.913977
Oct 14 16:10:50 robert openmower_launch[878]: [ WARN] [1697292650.587979812]: FTCLocalPlannerROS: Could not reach goal position. config.goal_timeout (20) reached>
Oct 14 16:10:50 robert openmower_launch[878]: [ INFO] [1697292650.588433325]: FTCLocalPlannerROS: Switching to state 3
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.237993295]: FTCLocalPlannerROS: POST_ROTATE finished.
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.238459049]: FTCLocalPlannerROS: Switching to state 4
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.287410036]: Action "move_base" succeeded!
Oct 14 16:10:52 robert openmower_launch[898]: [ INFO] [1697292652.297949931]: Clearing Nav Point
Oct 14 16:10:52 robert openmower_launch[898]: [ INFO] [1697292652.298576924]: Map Position: x=3.25704, y=-9.05945
Oct 14 16:10:52 robert openmower_launch[898]: [ INFO] [1697292652.299143251]: Map Size: x=13.3056, y=24.6924
Oct 14 16:10:52 robert openmower_launch[898]: [ INFO] [1697292652.618141022]: docking pose: position:
Oct 14 16:10:52 robert openmower_launch[898]:   x: 1.27453
Oct 14 16:10:52 robert openmower_launch[898]:   y: 2.07937
Oct 14 16:10:52 robert openmower_launch[898]:   z: 0
Oct 14 16:10:52 robert openmower_launch[898]: orientation:
Oct 14 16:10:52 robert openmower_launch[898]:   x: 0
Oct 14 16:10:52 robert openmower_launch[898]:   y: 0
Oct 14 16:10:52 robert openmower_launch[898]:   z: 0.926374
Oct 14 16:10:52 robert openmower_launch[898]:   w: 0.376605
Oct 14 16:10:52 robert openmower_launch[898]: 
Oct 14 16:10:52 robert openmower_launch[906]: [ INFO] [1697292652.618967143]: MowingBehavior: (MOW) First point reached - Executing mow path with 68 poses
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.636605289]: FTCLocalPlannerROS: Got new global plan with 68 points.
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.638178715]: FTCLocalPlannerROS: PRE_ROTATE finished. Starting following
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.638351695]: FTCLocalPlannerROS: Switching to state 1
Oct 14 16:10:52 robert openmower_launch[878]: [ERROR] [1697292652.686695762]: FTCLocalPlannerROS: Robot is far away from global plan. distance (2.54526) > config>
Oct 14 16:10:52 robert openmower_launch[878]: [ INFO] [1697292652.686932278]: FTCLocalPlannerROS: Switching to state 4
Oct 14 16:10:52 robert openmower_launch[878]: [ WARN] [1697292652.687349125]: No velocity command received from controller! 
Oct 14 16:10:52 robert openmower_launch[906]: [ INFO] [1697292652.741431681]: MowingBehavior: (MOW) Progress: 0/68
Oct 14 16:10:55 robert openmower_launch[878]: [ WARN] [1697292655.730517988]: No velocity command received from controller! 
Oct 14 16:10:57 robert openmower_launch[878]: [ WARN] [1697292657.680813803]: The controller has been aborted after it exceeded the patience time
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.719503651]: MowingBehavior: (MOW)  Got status 5 from MBF/FTCPlanner -> Stopping path execution.
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.732797793]: >> MowingBehavior: (MOW) PlannerGetProgress currentIndex = 0 of 68
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.732928829]: >>> State: Aborted <<<
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.732996254]: MowingBehavior (ErrorCatch): Poses before trim:68
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.733058957]: MowingBehavior (ErrorCatch): Trimming 1 points.
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.733143585]: MowingBehavior (ErrorCatch): Poses after trim:67
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.733194937]: MowingBehavior: (MOW) PAUSED due to MBF Error
Oct 14 16:10:57 robert openmower_launch[917]: [ INFO] [1697292657.760013477]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.762312229]: successfully registered actions for mower_logic:mowing
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.772081578]: MowingBehavior: CONTINUING
Oct 14 16:10:57 robert openmower_launch[917]: [ INFO] [1697292657.783463761]: new actions registered: mower_logic:mowing registered 4 actions.
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.785720957]: successfully registered actions for mower_logic:mowing
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.785865733]: MowingBehavior: Path segment length: 67 poses.
Oct 14 16:10:57 robert openmower_launch[906]: [ INFO] [1697292657.785927473]: MowingBehavior: (FIRST POINT)  Moving to path segment starting point
Oct 14 16:10:57 robert openmower_launch[878]: [ERROR] [1697292657.787012090]: getElem() should not see invalid handles
Oct 14 16:10:59 robert openmower_launch[871]: [INFO] [1697289783.471308]: Connected to http://openservice-sapos.niedersachsen.de:2101/VRS_3_4G_NI
Oct 14 16:10:59 robert openmower_launch[871]: [INFO] [1697292658.488051]: Stopping RTCM publisher
Oct 14 16:10:59 robert openmower_launch[871]: [INFO] [1697292658.608608]: Disconnecting NTRIP client
Oct 14 16:11:13 robert openmower_launch[854]: ================================================================================REQUIRED process [move_base_flex-4]>
Oct 14 16:11:13 robert openmower_launch[854]: process has died [pid 878, exit code -11, cmd /opt/ros/noetic/lib/mbf_costmap_nav/mbf_costmap_nav cmd_vel:=/nav_vel>
Oct 14 16:11:13 robert openmower_launch[854]: log file: /home/ubuntu/.ros/log/c8737168-6a94-11ee-bf82-5524e078a334/move_base_flex-4*.log
Oct 14 16:11:13 robert openmower_launch[854]: Initiating shutdown!
Oct 14 16:11:13 robert openmower_launch[854]: ================================================================================
Oct 14 16:11:13 robert openmower_launch[854]: [mower_logic-10] escalating to SIGTERM
Oct 14 16:11:13 robert openmower_launch[854]: ROS_MASTER_URI=http://localhost:11311
Oct 14 16:11:13 robert openmower_launch[854]: 
Oct 14 16:11:13 robert openmower_launch[854]: process[mower_comms-1]: started with pid [870]
Oct 14 16:11:13 robert openmower_launch[854]: process[ntrip_client/ntrip_client_node-2]: started with pid [871]
Oct 14 16:11:13 robert openmower_launch[854]: process[xbot_driver_gps-3]: started with pid [872]
Oct 14 16:11:13 robert openmower_launch[854]: process[move_base_flex-4]: started with pid [878]
Oct 14 16:11:13 robert openmower_launch[854]: process[move_base_legacy_relay-5]: started with pid [879]
Oct 14 16:11:13 robert openmower_launch[854]: process[xbot_positioning-6]: started with pid [884]
Oct 14 16:11:13 robert openmower_launch[854]: process[joy-7]: started with pid [887]
Oct 14 16:11:13 robert openmower_launch[854]: process[joy_teleop-8]: started with pid [890]
Oct 14 16:11:13 robert openmower_launch[854]: process[map_service-9]: started with pid [898]
Oct 14 16:11:13 robert openmower_launch[854]: process[mower_logic-10]: started with pid [906]
Oct 14 16:11:13 robert openmower_launch[854]: process[slic3r_coverage_planner-11]: started with pid [911]
Oct 14 16:11:13 robert openmower_launch[854]: process[twist_mux-12]: started with pid [914]
Oct 14 16:11:13 robert openmower_launch[854]: process[xbot_monitoring-13]: started with pid [917]
Oct 14 16:11:13 robert openmower_launch[854]: process[xbot_remote-14]: started with pid [922]
Oct 14 16:11:13 robert openmower_launch[854]: process[monitoring-15]: started with pid [924]
Oct 14 16:11:13 robert openmower_launch[854]: [monitoring-15] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [xbot_remote-14] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [xbot_monitoring-13] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [twist_mux-12] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [slic3r_coverage_planner-11] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [mower_logic-10] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [map_service-9] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [joy_teleop-8] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [xbot_positioning-6] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [joy-7] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [move_base_legacy_relay-5] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [move_base_flex-4] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [xbot_driver_gps-3] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [ntrip_client/ntrip_client_node-2] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: [mower_comms-1] killing on exit
Oct 14 16:11:13 robert openmower_launch[854]: shutting down processing monitor...
Oct 14 16:11:13 robert openmower_launch[854]: ... shutting down processing monitor complete
Oct 14 16:11:13 robert openmower_launch[854]: done
Oct 14 16:11:13 robert systemd[1]: openmower.service: Main process exited, code=exited, status=125/n/a
Oct 14 16:11:13 robert systemd[1]: openmower.service: Failed with result 'exit-code'.

As said, don't know if it's a different issue, but tested with my work-horse-mower and haven't seen such issue before.

olliewalsh commented 11 months ago

I have a much better version that I'm currently testing that also saves the mow_angle_increment, will update this PR soon

ClemensElflein commented 6 months ago

Thank you for the PR, I like the idea. Slicing each time can be slow in large/complex environments.

What's the status on this? Is it stable / ready to be tested?

olliewalsh commented 4 months ago

Thank you for the PR, I like the idea. Slicing each time can be slow in large/complex environments.

What's the status on this? Is it stable / ready to be tested?

Yes, read to be tested, been running this for some time now.

This doesn't result in less slicing though. It generates a checksum from the output of the slicing and compares to the saved checkpoint, if they match then progress is restored, if they don't then restarts at the beginning. In order to allow this it has to switch from a vector of points that is trimmed to a static vector with a moving index.

Apehaenger commented 4 months ago

Tested today because I still like to see this functionality in main. Merged this PR to current main.

Did a couple of tests via stop/start as well as openmower shutdown during mowing. Nearly all look fine as expected.

But after the second try, I had a docking fault. I never had a docking fault before since I'm on this docking location. So I thought: Lucky punch - shit happen, give it another try... but he failed again docking. By these two tries he simply drove a couple of centimeter beside the correct position and triggered an emergency, because he didn't hit his charging fork (wobbling SA case triggers emergency if the fork doesn't hit the plugs).

So I did a third try with logging open and watched him carefully. By this last try he drove perfect oriented into direction docking station but stopped approx. 15-20cm before the front wheels hit the docking plate. I never saw him doing this before. Also, he only made one try!! In past docking was tried three times (don't know if these 3 tries still exists)

Only interesting stuff I could find in the logs was:

Docking aborted
Error during docking
Giving up on docking

I know, sounds different reasoned, but could it be that these changes have any effect on docking?

olliewalsh commented 4 months ago

I know, sounds different reasoned, but could it be that these changes have any effect on docking?

I don't see how. I've not had a docking failure for months while running this. Don't see anything recent on current main that could affect docking either.

Apehaenger commented 4 months ago

Okay, thanks a lot for thinking/checking about. Will revert to my previous main branch and check docking there. May be I've to re-record my docking position.

Apehaenger commented 4 months ago

Okay, now the same on my old main branch. Looks like the reason for my suddenly failing docking tries has been a grown tuft of grass directly before my dock, which turns the front wheel just before entering the dock. Sorry for suspecting your PR ;-)

Works as expected/great, like to see it merged ;-) @ClemensElflein: Shall we try to motivate more tester or is @olliewalsh and me enough?

ClemensElflein commented 4 months ago

@olliewalsh thank you for the PR and @Apehaenger thank you for testing. I have waited for confirmation, that docking is not broken by the PR (but I also didn't see how) I'll merge to main.

11phc commented 4 months ago

Thanks @olliewalsh, I'll give this a go. After implementing this what is the best way to force fresh restart of the mowing area should you want to (without continuing where you stoppe), and if applicable a new angle offset etc., since container restart wont do this? Abort / Stop mowing and Start anew?

olliewalsh commented 4 months ago

Thanks @olliewalsh, I'll give this a go. After implementing this what is the best way to force fresh restart of the mowing area should you want to (without continuing where you stoppe), and if applicable a new angle offset etc., since container restart wont do this? Abort / Stop mowing and Start anew?

I'll look into adding action(s) to control this from mqtt/HA//app/openmower-gui etc...

In the meantime: If something about the generated mowing path changes e.g map is edited or different mowing angle set in the config, then it will restart the current area. Removing .ros/checkpoint.bag before mowing will completely clear the saved state, starting back at the first area on the map.

11phc commented 4 months ago

Removing .ros/checkpoint.bag before mowing will completely clear the saved state, starting back at the first area on the map.

Ah cool, this looks to be the ticket for now then. Can do a node-red SSH call for now to remove it.

Thank you 🙏