Inspired by Nature, Boston Dynamics Spot Mini, and Netflix Metalhead, I'm building a robotic dog of my own; but unlike Spot and Metalhead: not built to kill people.
1. To build a functioning open source robotic dog using low-cost components (a couple of hundred dollars max), but is also quite capable.
2. To use it as a platform to experiment with Reinforcement Learning AI control system using OpenAI and Mujoco.
3. To sell it as a kit.
I've worked on the shoulder/torso assembly and made some refinements to the legs and shoulder. I've replaced the 4mm smooth shaft that had to be cut with M4 socket screws and lock nuts. This requires a bit less effort and is cheaper.
The shoulder joint is M6 threaded rod that will have to be cut with a hacksaw. The shoulder to hip rods are M8 threaded and will also have to be cut from 1m stock.
The mechanical parts (rods, screws, lock nuts) have been ordered from RS.
I'm getting the 3mm plexiglass today and having it laser cut:
Except I just realised forgot something :/
Next update will be when I've assembled this version...
I've made some progress in writing code for converting from the Autodesk Fusion design to Mujoco for physics simulation.
Here's the Fusion design:
and the Mujoco simulation:
The Fusion design has to follow some restrictions and naming convention for conversion, but I'm confident I can proceed to a more complex leg design, then a simulation of all 4 legs using OpenAI reinforcement learning.
This implies that I will be able to modify the design in a high-level tool like Fusion and automatically do the reinforcement learning for walking. Because Fusion is parametric, it also implies I can write code to vary the design within certain parameter ranges (e.g. leg upper and lower leg lengths), and optimise the design using the simulation output.
After the last update I put some effort into the linkages. I bought a bunch of different hobby ones to see how they might work:
The one on the right, where you can make your own length link seemed ideal.
But I realised there's a problem. Version 1 had both servos in the "shoulder", but that severely limited the range of motion of the lower leg. I designed it like this initially to reduce the mass of the leg. It might still work but I need to carefully do a simulation to ensure proper range of motion.
So I moved the 2nd servo to the top leg in Fusion. I also added links with ball joint, and experimented with the "Motion Study" feature.
Sadly this seems to be pretty buggy... :/
With the new servo position, I updated the laser cutting drawings and got the parts back today.
Assembled. Eyeballed how long the top link should be:
Repeated for bottom link.
Now it's assembled and ready for Arduino:
Looks decent. Hopefully I can now hook up an Arduino and experiment with controlling the leg. Easter weekend project...
Use readily available manufacturing methods (3D printing, lasercutting, CNC routing)
Use off the shelf components (servos, Arduino, Raspberry Pi)
Use readily available materials (carbon fibre sheeting, 3d printed plastics)
I do want to make this into a kit, but anyone should be able to gather the components and make one themselves with the help of a makerspace.
I've been using Autodesk Fusion for the first time to design this robot, it's taken a bit of getting used to but I do like the parametric design capabilities (I'm used to using Rhino). Version one of the robot looks something like this:
It has 4 legs
Each leg has 2 segments, with a servo and link each
The shoulder can rotate
So we have 3 degrees of freedom for each leg, 12 in total. Servos are relatively cheap compared to torque motors ($15 vs $3000) so I'm going with servos for now.
Some people who have built similar projects actuate the legs with the servo directly. I'm not convinced by this. I'm also not convinced that using a linkage is the right approach. Each has its advantages and disadvantages. In essence though, I don't like putting the servo under strain perpendicular to the servo axis, so in this design the leg segments have their own joints based on a metal shaft (more on this later).
I had the prototype parts lasercut from acrylic (NB the thinking at the moment is to use CNC routed 3mm carbon fibre sheets, NOT 3mm acrylic sheets, but I have some acrylic handy and it's cheap so I'm using that for now)
First set of parts:
And the first problem:
I didn't take into account the insertion angle of the servo :/
Took out the file and started filing... and here's the two servos embedded:
You can see I used 25mm standoffs. The nice thing here is the servos are 28mm from bottom to where they meet the acrylic, which is 3mm thick. So they fit snugly against the opposite layer:
Then I hit my 2nd snag :/
In the one corner, a 4mm Precision Round Bar with a hardness of HRC60-62.
In the other corner, a small hacksaw.
Hacksaw lost badly. It didn't even make a scratch!
What to do.... I went to the hardware store to find a 4mm wooden dowel to use temporarily... but got a 5mm one instead. Fail.
Then I thought about something.... I have a little drill that also has tiny grinding discs. Which I've never used... Will it work?
Sparks! Here's to buying unnecessary tools. Got some safety glasses and set to work.
Shout-out to Zortrax who supplies a set of safety glasses with their M200 3D printer! That machine is fantastic. Highly recommended.
The world tiniest angle grinder did the trick. 1 times 4mmx44mm shaft:
I'm using 4mm shaft collars for the joint. Nothing fancy at this point. No bearing(s):
3rd issue (3rd? I've lost count):
The 4th standoff support is too close to the joint. I removed it. I don't actually think it's necessary since the shaft itself is fairly rigid.
I have not idea how to create the link between the servo horn and the femur yet. Ball joint? It needs to be rigid...
Front and right views:
I'm pretty satisfied with this, considering it's the very first iteration. As soon as I've made a plan with the linkages I'll put an Arduino onto it for a bit of a demo.
Please add questions and suggestions if you have any!
This is really an AI project, not a hardware project.
What I'm trying to do, is to create an economical physical robot by utilising simulation as far as possible. Building a hardware prototype, then working on the control system, then iterating on the hardware, etc. etc. is a very laborious, expensive process.
I want to build a robot dog, but my budget is very close to zero (relatively speaking, compared to a company like Boston Dynamics), and I'm interested in using machine learning to achieve this goal.
i’m using OpenAI Gym as a starting point, together with Tensorflow and Mujoco. Mujoco is a physical simulation environment, designed for simulating robotics.
Essentially, I need to create a simulated environment that is close enough to the real world physical properties of the mechanics, actuators and sensors of the robot so the controls mechanisms can be transplanted to a real robot.
Lucky for me, there is a good starting point in OpenAI Gym — half a cheetah. I found the best listed solution in the OpenAI gym, written by a certain generous Mr. Pat Coady: