LocksleyFox update. It's Saturday, November 14th, and in the last two or three days I made a huge amount of progress, so I'm really excited to talk about that.
The motors
Most importantly, on Thursday, around 3 or 4 p.m., the motors finally came from China. This is a box of eight RobStride RS00 motors, which I had ordered about two weeks ago. They actually came a few days earlier than planned, which was great.
I had previously owned two RS00s, which I had in one leg, but the lack of any more prohibited me from building out the rest of the robot. In the meantime, I had printed all the parts, specifically the thighs, the shanks and the paws, and even got the wiring ready as much as I could.
Assembly
So when the motors finally came, I was super excited to plug it all together. I told myself I was going to have it walking by the end of the day, no matter what. So I started putting it together, putting the motors in the legs, which wasn't too bad, specifically in the knees. There's always some quirkiness there with the screws. I ended up wasting 10 or 15 minutes because I had the wrong screw type, so I had to take it out and put some other screws in. That wasn't too bad.
Then I got to the upper part, the thighs. The way the design works, there are two pipes, one in the front and one in the back. That's where you put in the hip motors, which connect to the legs, one motor on each side: front left, front right, back left and back right. At the top of each pipe there's a little slit to put the motor in. When I first printed it, Claude checked it and I checked it. I put a motor in, took it out, then put the same motor in the other side, and I did that for all four. They all fit in, and I was like, this is a great design.
So now I went to do it for real. The first motor was already in from before. I got the second motor, put it in the same tube and, clank clank, it doesn't fit, because the opening was too small.
At this point it was only maybe 7 or 7:30 p.m. I wouldn't say I panicked, but I was pretty frustrated. I guess the good news is I'd had a similar problem before, where a cable opening wasn't cut in a previous version of the hip part, and I'd used a saw and some other tools to haphazardly cut a hole. This was just a bigger job, because there was much more surface area, it was rounded and there were other pieces blocking the way. That was especially true on the back side, where the tail part was partially blocking the axis of that pipe.
The other fortunate thing is that my son was around and was able to help me. He's a bit handy with the saw, so he sawed his way through the first part using this giant hacksaw we have, plus some other tools like wire cutters and even a wrench to pull pieces out. Even after we cut out a big piece, there were bits sticking out underneath, inside the pipe, that kept the motor from going in, so we had to sand those down. Maybe 20 or 30 minutes later, we finally got the second motor in the first pipe. Then we had to go to the second pipe at the back, which had the same problem. I did that one mostly myself. It didn't go exactly smoothly, but I did finally get it in maybe 20 minutes later.
Lessons from the pipe
Of course, problems come up. In the physical world, the big difference is that a lot of times they're harder to fix, which is a theme I mentioned in a previous post. In this case it was the pipe, and it was frustrating because it was a bit of physical work, not trivial, to fix it. I really want to prevent this kind of thing in the future.
I haven't done this yet, but in future designs I'm going to focus on usability. That means simulating the placing of each of the parts, not just sitting in their final position but also sliding in, with the other parts already there, one at a time, like a step-by-step process. Pretend you're building the machine, right, Claude? Put in this motor. Now put in this motor, and be aware of where all the other motors are. This can apply to anything.
Another idea is that I could have made a video simulating putting the motors in. I didn't think of it, but even if Claude missed the collision there, I would have been able to see it, because the motors would have bumped into or just slid through each other. Either way, it would have been clear that there was a collision.
Screws and cables
Then I moved on to the next part, which is putting the screws in. That wasn't too bad, although I did run into a problem. I was trying to put a screw in and it kept squeaking, and I was like, what's going on? I thought I had the motor misaligned, which has happened in the past. At this point it was probably nine o'clock or so, and I was starting to get tired. I finally realized the screw was too short. I had one screw in the right leg and one in the wrong leg, so I swapped them, and that went more smoothly.
It's still pretty difficult to get the screws in, specifically on the hip side, because they're long screws and there's this long pipe on the side cap. You've got to stick them in and get a screwdriver in there, but I did manage to get it to work.
Then it was time to put the cables in. There are really two types of cables. One is female-to-female and goes from the hip motor to the knee motor, and the other goes from the hip motor to the control electronics in the middle. I was trying to plug one in on, I think, the knee side, and it's a really awkward angle. It's really hard to fit your hand in there, and then you have to fit in the cable. It's an XT30(2+2) cable, it's hard to fit in, and it's hard to see which direction it goes.
I was looking from the side and was pretty sure it was the correct direction. I was trying to shove it in, it didn't work, and then I panicked again. I thought, oh no, this is printed wrong, the design has it shifted. So I pulled out the hacksaw and started cutting at it, and 10 minutes later I realized that I just had the plug flipped. Again, I was starting to get tired by this point. I finally realized, okay, it is printed correctly, I just need to switch the orientation. The problem is it's dark and all the pieces of the leg cover it, so you can't really see. Once I rotated it and pushed it in, it actually went in. It's still kind of hard to push in, and that's something I'm going to redesign the next time I print these legs.
While I was doing all this cutting, I cut my finger a tiny bit. I didn't realize it until a few minutes later, when there were tiny spots of blood on the fox. I tried wiping it, and it just doesn't come off. So I put some tape down, like a little bandage on my baby robot fox. It's kind of funny, because it's like he's going through some of the same pain as me, so I felt bad for him.
Calibration and the first stand
But I got that all in, and everything was great. At that point I wired it up, plugged it in and did some tests, and I actually finally got it to stand. The thing required before that, which was a bit tedious, was doing calibration on each of the legs. That's basically showing it the limits of each joint, bringing both the knee and the hip motors to their fullest extent back and forth. It also means telling it which motor is in which position, because of course it doesn't know.
The other annoying thing is that each of the motors starts with a default ID, I think 255 or 1, I forget which. So if you plug in all the motors at once, not only does it not know which is which, but it can't really talk to just one of them, because all the new ones answer. So I had to unplug everything again except for one new motor, and then do them one at a time. That by itself probably took 20 minutes to get right.
Then I assigned them and did the limit testing. After that I did the stand command, where it stood up very slowly, and I did a sit. Sitting is where its legs are bent and nestled against its body in kind of a cute way.
The balance problem
But the problem is it looked really bad, because there was a balance issue. The left leg was kind of coming up, about an inch off the ground when it was standing, which just looks bad. I mean, it was good to get it sitting and standing, and good to get all the control working. I was very satisfied by that point. It was probably around 9 or 9:30, and it was really great, but I was frustrated about that difference.
So I went back and forth, trying to see if the part was longer. Some of my quick measurements showed me that the leg was a different length from the others, although I might have measured it badly. Then I realized later that I had printed that one with a slightly different design, so it's possible that it was a different length. And the foot is kind of bendable, since it's made of TPU, which is a little bit rubbery. So even the foot can sit at a different angle, or be put on a different way. There are different aspects there, but it didn't look that much longer.
After some time, I realized that it's more of a problem with the center of gravity. If you think about how it was trained, the algorithm was just assuming that all the weight was even. But the way I had it, I have three cables. There's the power and the ground, which go to the power supply as these long red and black cables, and then there's the USB cable. All of those trail behind it, and as a result they pull down. And when it eventually moves, that might even change the direction of the pull. So the point is, there's a shift of weight to the back, and it might even be a dynamic shift.
That's something I actually started working on today, and I tried some other ideas yesterday as well. Basically, I'm working on training it so that it understands where the weight is, in terms of the center of gravity.
But back on Thursday, what I did was ask Claude to adjust it so it thinks that leg is shorter. That changes the algorithm so it makes that leg touch down. At that point it only worked halfway, and the leg got to about half an inch off the ground when standing. Then on Friday, I had it change the algorithm so that it feels the force. It can tell how much force is on each motor, so when it's standing, it tries to balance things out based on where the force is. That way it can tell if a leg is not touching the ground. When I finally did that, late Friday, it was able to stand with all the legs touching the ground.
First walking tests
As for the next step, that's moving and walking. To be honest, I don't want to talk about it too much, because it's not working great yet. It's kind of stuttering, and I think again it's because of the weight problem. It's not really moving effectively. One of the walks that would probably work, though I wasn't that interested in it, is where it moves one leg at a time. I tested that walk, along with several others, while it was on what's called a belly bench. That's where it sits with its legs not touching the ground. I tried different types of walks there, and they all looked pretty good.
One problem I did have is that one of the buses the motors attach to, bus B on the back end, kept going in and out intermittently, getting errors. Then the robot would just die and sit down midway through a movement. The problem there was the Waveshare board, which is what I use to connect between the Teensy and the CAN bus. It was plugged into the breadboard, and if you shifted it at all, the wires would go intermittent.
So I took out that little part of the breadboard and used these ELEGOO jumper wires, which go directly from each of the pins of the Waveshare CAN board to the Teensy. There's still some breadboard involved, but it's a lot more stable. After that the errors went away, and it was able to move a bit more. So again, the walking is still awkward, and I'm training that. I hope to be able to talk about it more and show a nice video of it. But I did get satisfactory sitting and standing.
The control panel
The other thing, which I don't think I mentioned in the last post because I hadn't done it yet, is that I asked Claude to make me a control panel, the LocksleyFox Control Panel. It's basically a web page that lets me see all the motors visually: what's online, what their position is, how much torque, the temperature, and do all these other things. Which is really cool.
Now, most of the time I can use Claude, which is great. But I thought to myself, what if I don't have internet? Sometimes we shut down the internet at night, just to go to sleep, and sometimes the internet might be flaky somewhere. So I wanted it to work without the internet. Then I realized there's an even more important concern, which is that doing queries with Claude can take seconds, and sometimes minutes when it gets slow. So it really helps to have this all on the screen, in your face. For example, when I was troubleshooting the intermittent connections, I would touch a piece and look at the error count on the screen, which updated live in real time. That was great.
I also added a camera feed from one of my external cameras to that page, so I can see everything at once on the screen on my Mac. That's really great, because it's super useful for the calibration, for the different types of walks and for the number of steps to walk. I even put in a little trackpad, so when I do have it working well, I can control it as if I was controlling a remote control car or something like that.
The IMU
The next step is trained walks, which again I'll talk about more next time. But to do that, I needed to make a hardware change. There's a piece called the IMU, which stands for inertial measurement unit. It's a really tiny chip that you plug right into the Teensy board by cable, and it tells you things like how you're rotated and the acceleration, that kind of stuff, which iPhones and that kind of thing have. That's an important part of a trained policy.
A trained policy walks in a dynamic way. Instead of just saying the legs always do this, it looks at the pitch, the yaw and the angles, where the robot's sitting and how fast it's moving, and then it adjusts everything based on that. So to do any trained policy I needed that, and to get it, I had to actually plug it in. The other thing is you have to fix it in place, meaning it can't be floating around. It has to represent the location of the actual body. So I got that in there and taped it down.
Then I had Claude add a section on the top right of the panel that shows the IMU state. It's really cool. It shows kind of a horizon, so you can see which way the robot is turned, left, right, forward or backward, and even the acceleration and stuff like that. So now I'm working on getting the trained policy plugged in and getting the walking to work. Hopefully in the next day or two, before the weekend's over, it'll have some great walking.
Pacing myself
I ended up working on the robot until nearly 11:30 p.m. that night (for a total of nearly 5 hours straight), and it took me quite some time to get asleep. Being driven towards a goal is good, but I think I overdid it a bit. Getting LocksleyFox built to the point where he can stand was a huge milestone and I think the effort was worth it, but in the future I am going to take it a little slower, to avoid getting burned out.
That's it for this time. Thanks for reading.
Videos and pictures