Skip to content

Stuck, and on film

An evening of ways the robot got stuck, and how each one now gets caught: a dock that faces a wall, a lidar that looked at ground it can't see, and a mower that stopped at an angle to its line and waited forever. Plus a new coat for Clover, and a tool that turns every run since day one into film.

Clover's new coat

Chris sent better photos of Clover, and her first model didn't hold up. Her body was a stack of ellipsoids, and where they met, the back end went lumpy. Her spots were grey patches, and her real spots aren't patches at all. They're fine dark flecks all over, thickest across her back.

The new model has a lofted body: one smooth skin, stretched over eleven cross-sections from chest to tail, with no seams. The flecks are hundreds of tiny dark and mid-grey specks, scattered thickest over her back. There's a fawn wash over her rump and head, and her tail now hangs low and tapers.

Clover's sim model, second version

The photos still aren't kept anywhere. The script keeps colours and proportions, nothing else.

Did the detector notice? A bit. Side on at 4 m she's now a dog (0.45), where she used to be a bird. At 2 m it's a toss-up, bird 0.40 against dog 0.39. At 6 m she's still a bird, and head on at 3 m she's a person. Moose, for comparison, is a dog side on at every distance we tried. A smooth sim dog with a white coat is a hard case. The real test is still real photos.

Clover side on at 2 m, through the robot's camera: dog 0.39

A dock that faces a wall

We built a model of a real yard to test against: the lawn's shape, the beds and paths, the house, and a dock pushed up against the house wall the way it really will be. (That model stays private: no pictures or maps of it here.)

The first run there sat at the dock for an hour and did nothing. To leave the dock, the robot backs off it. But the house wall was 8 cm in front of its nose, inside its safety stop field. So the safety gate stopped everything, and the gate only let a reverse through after a drop, a slope or a tilt, never after an obstacle. Worse, the mission's "am I making progress?" clock reset itself every tick while leaving, so nothing ever gave up.

Two fixes:

  • The gate now lets a slow, straight reverse through after an obstacle ahead, but only when the robot was driving into it. A pivot that swung into something gets no such pass, because backing up while turning could swing the back end into it.
  • Leaving the dock gives up after 60 s, with a clear reason ("couldn't back off the dock"), instead of waiting for ever.

Asking the watchdog to notice

An hour of nothing should have been caught by a machine, not by us reading logs. Chris asked the obvious question: can't the watchdog check that too? It can now. The mission prints a heartbeat every 30 simulated seconds: its phase and where it is. The script that babysits every run (launch_watch.sh) already caught runs that never started. Now it also stops a run if:

  • the heartbeat goes quiet for 10 minutes, or
  • the robot hasn't moved 30 cm in 10 minutes when it should be moving. (Charging, night, waiting and paused don't count.)

A stalled run exits with its own code (125). It isn't retried, because a retry would only stall the same way.

Photon's tilted lidar

Photon is the tall platform: a 3D lidar 1 m up, tilted 30° down to see the ground close in front. At start-up the robot checks its lidar by looking for ground in each sector around it. Photon failed that check in every run: "sector 4: 6% of ground returns".

The bug was in how we handled the tilt. The code subtracted 30° from every beam alike, as if the lidar looked down behind it too. It doesn't. Tilting it forward raises the beams behind it, so behind the robot it sees no ground at all. Now the beams are rotated properly by the mount's pitch, and Photon starts, mows and docks like the rest. A correction for the record: an earlier commit message said all six platforms docked. It was five. Photon had never started. Now it's six.

Stopping at an angle

Back in the real-yard model, the next run got further and then stopped dead, facing the house wall at an angle to its mowing line. It had come off its line, and the way ahead was blocked. The gate held it there, and the line follower kept steering for a line it couldn't get back to.

The fix is a new mission phase, REALIGN. If the robot makes no progress for 6 s and it's more than 20° off its line, it backs off 25 cm, pivots onto the line's heading, and carries on. It gets two tries per metre of line, so it can't loop forever. (The first time it fired it crashed the mission, because one value was passed twice. It's fixed now, and there's a test for it.)

It helps, but the real yard isn't solved. The latest run realigned seven times and still got stuck in one tight corner by the house. It covered 14.6% of the lawn before giving up. Tight corners next to hard surfaces are the next job.

Every run, on film

Then the fun part. Chris wanted milestone videos: picture in picture, with the overhead view, the lidar, the point clouds, the robot's camera with its labels, the dogs, the blade, the motors, the speed and the mission state, all at once. And then a twist: why not go back in time and make progress films from every run since the start?

That's now a small separate project (it only reads the robot's repo). Every run since day one left a recording behind: odometry, the 2D lidar, telemetry, and on some days the 3D point clouds. The film tool reads those recordings without needing ROS, and draws each frame with:

  • a big view that switches itself: the chase camera when things are calm, the 3D lidar for a few seconds after a safety stop, and the robot's own camera while the detector sees something;
  • smaller views of whatever else the run recorded: the overhead with the cut trail, the 2D lidar, the cameras;
  • a strip of gauges: mission phase, safety state, blade, both wheels, speed, battery, power, sim time;
  • a timeline with the run's events marked on it. Quiet stretches play faster, with a badge saying so.

A frame from a film: the 3D lidar takes the big view while Clover is near; chase camera, overhead and robot camera
on the side

The progress film picks the most interesting run of each day (or each hour) and cuts a short clip around its best moment. A title card before each one gives the day's devlog headlines and what the robot could "see with" that day. The early days have only the lidar. The cameras join in as they were built.

Each video gets a description file next to it: the title, a summary, chapters and tags, in the shape YouTube's upload API wants. That way posting them one day will be a short script, not an afternoon. Nothing gets uploaded on its own. The dogs appear only as Clover and Moose, and runs on the private yard model are never filmed.