This log covers November 18. Most of the day went into one question. How fast is LocksleyFox really going, and why is it slower than the simulated robot? Along the way I found some loose parts, lost a Teensy to a spark, and tried a new walker that fell over.
A speedometer that works
At the end of Log 22, the IMU distance was off by anywhere from −33% to +13%. The fix came in a few steps. First, the IMU now collects its readings in its own buffer, about 440 times a second for both the accelerometer and the gyro, instead of the Teensy reading it 100 times a second. That catches the sharp jolt of each paw strike. Before, the gyro was still sampled at half that rate, and the shaking of the body got mixed into the tilt. That alone made the distance swing by around 10%.
Second, the robot keeps measuring after the walk ends, until it's standing still. At the end of a run it creeps forward a little as it settles. The old code took that creep for sensor drift and subtracted it, so it read a few percent short. Now it waits for 0.3 seconds of stillness, up to 4 seconds.
Over eight tape-measured garage runs at 1.0 to 3.0 m/s, the IMU distance came within about 2% on average, and never worse than 4.6%. On a wet road run of 61 feet 8 inches (18.8 m), it read 3.7% high. The old leg-based estimate read 39% high on that same run.
Starting a walk with a push is harder. The shove itself looks like a tilt to the accelerometer, so the robot now remembers which way was down from the last moment it stood still. The one taped push start read 7% high, so that still needs work.
Why is the real robot slower?
The simulated robot, running the exact same walker and the exact same speed commands as the real one, went 7 to 38% further. The faster the run, the bigger the gap. So I went through the possible causes one at a time.
The motors weren't it. I replayed the real robot's joint targets in the simulator, and the simulated joints followed them within about 2°, with the same lag as the real ones. The motors never hit their speed limit either. Foot friction made no difference.
The difference was in how much the body shakes. The real robot's body rocks two to five times more than the simulated one, especially side to side and in yaw. You can see it in the slow motion videos too. The simulated legs are perfectly rigid sideways. When I let them flex sideways like a spring, the simulated robot shook like the real one, and its distances came within 2 to 7% of the tape.
The best match was a springiness of about 50 N·m per radian. That's about 1 cm of give at the paw for every kilogram of sideways force. The printed PLA parts on their own are 20 to 30 times stiffer than that, from a finite element check. So the give has to be in the joints and mounts, like the hip mounts, the bearings or the body tube.
Loose parts
That evening I checked the legs by hand. The rear-left thigh was quite loose and had a lot of give, and the front-left shank moved back and forth a little. I tightened a lot of screws and recalibrated the legs.
The rear-right leg came back from calibration 61° off at the hip and 120° off at the knee compared with before. Its joint limits were still set for the old position, so a Stand would have left that knee nearly straight while the others bent. I updated the limits to match before standing it up. After that, all four legs stood within 1° of each other.
A spark
While I was carrying the robot with it powered on, my laptop touched it. There was a spark, and the robot shut off. When I turned it back on, it ran, but the Teensy no longer showed up on USB at all.
I worked through it piece by piece. The Mac's USB port, a different cable and the USB isolator all worked fine with my older Teensy from the bench, so the robot's own Teensy had lost its USB. Luckily the Teensy plugs into the SK Pang CAN board, so I swapped in the old one. It doesn't have the small 2×3 header for Ethernet, but LocksleyFox doesn't use Ethernet. After flashing it and reconnecting the motor wires and the IMU cable, all eight motors and the IMU came back. I ordered a spare Teensy. The lesson is to keep the laptop off the robot while it's powered.
Before and after tightening
With the parts tightened, I repeated the taped garage runs at 1.0, 1.5, 2.0 and 3.0 m/s. The distances were the same as before, within the usual spread from run to run. At 2.0 m/s it went 215 inches (5.46 m), right between the two earlier runs of 210 and 221 inches. The side-to-side rocking dropped by about 20 to 30% at 1.5 and 2.0 m/s, so it probably looks steadier. But the robot wasn't any faster, and fitting the leg springiness again gave the same 50 N·m per radian. The loose parts were real, but they weren't what's holding the speed back.
A walker trained on springy legs
While all this was going on, I trained a new version of the walker in a simulator with springy legs, with the springiness varied between 35 and 70 so it wouldn't depend on one exact value. In simulation it was faster on springy legs, and with the robot's own speed commands it was expected to go about 9% further at 2.0 m/s and 20% further at 3.0 m/s.
On the real robot it went the other way. At 2.0 m/s it went 194 inches, 10% shorter than the old walker a few minutes earlier. At 3.0 m/s it tipped over within about half a second. The walker kept driving the legs for about two more seconds while it lay on its side, and the kicks bounced it up off the floor once or twice before the auto-stop ended the walk. I put the old walker back on.
So the springy-leg simulator matches how the real robot shakes, but a walker trained on it doesn't carry over to the real robot. The firmware also needs a rule to stop the legs when the robot has tipped over during a walk.