D.A.G.R. - Quadruped Robot
Sneak peak for blog readers
January 31, 2023
In this episode I explain that I followed a parallel design methodology for this project. I worked simultaneously in the following items:
Mechanical design of the actuators and the robot body.
Minor Brushless Controller revisions.
Inverse Kinematics Model.
Open-loop trajectory generation.
This episode is a collection of clips that were taken throughout the whole development of the actuators. The updates revolving the actuator design and optimization done with the test-stand were finished around June of 2021. In this blog, there are more details on the other items I worked on thought this time.
October 2, 2021
Brushless motor comparison
From the jumping HALT testing it was evident the knee actuator was a little under-powered for the application as I struggled to get the expected height from the jumps and the knee motor would over heat after continuous jumping. In this episode of the Quadruped Robot series I explore and compare two different brushless motors and different reduction ratios for the knee actuator.
June 8, 2021
Inverse Kinematics Model
I've been 3D printing non-stop for the last few weeks and building/ testing each actuator. Currently, I'm half way done with printing, but I'm still messing with the knee actuator (more on that later). At the same time, I've been working on the Inverse Kinematics Model of a single leg, which is almost the same as the model for the whole robot, just without the adequate translation for positioning the Cartesian coordinate system in the axis of symmetry of the robot. The model shown in this post will follow the coordinate system shown in the picture to the left. Visit the Github repository to find a simple C program to calculate the inverse Kinematic model of a single three degree-of-freedom leg.
A 2D analysis is done for a 2 degree-of freedom leg. Knowing the length of the femur and the tibia is enough to start calculating the model. The first thing to calculate are the angles theta and phi given a leg_length input, which in this case is equivalent to the position in the Z axis. With this part of the model you can control the position of the foot in the Z axis by changing the value of leg_length, remember to multiply the angles calculated by the reduction ratio of your actuator.
To properly control the foot in the X,Z plane, the new_leg_length has to be the input of the first part of the model (instead of the position in Z) and the angle to send to the hip actuator is theta - extra_theta. The angle to send to the knee actuator is simply phi.
For the X axis the part of the model shown above has to be done and tested. For this next part, there are two inputs: the position of the foot in Z and in X; and there are two outputs: a new_leg_length and a extra_theta.
May 20, 2021
Active compliance mode
One of the main reasons to have a 9:1 reduction ratio in the actuator is to have a Quasi-Direct-Drive system, which, by working with a brushless motor in position control mode, behaves like a virtual spring-damp system. Another huge benefit of such a system is that it has a high torque transparency and thus, external forces applied to the actuator's output can be easily recognized and measured (once current sensing is working). With this in mind, I've designed a controller that produces active compliance in such a way that it allows a person to position the actuator in space by applying a force to the output of the actuators. I've also called this mode gravity compensation mode because the torque generated by the gravity on the actuator's output is not enough to make it move. This controller is in cascade to my position PD controller, which is also in cascade to the two current PI controllers; the output of this compliance controller is an angular position in radians. The control law is as follows:
current_q is the current through the Q vector. In the QD space the Q component is the one that generates torque.
current_q_threshold is a threshold in [amps] that is set to recognize an external force being applied to the actuator. Too low of a threshold value (closer to 0A) can back-drive the actuator output by the own weight of the attached load.
actual_pos is the actual position of the actuator reported by the magnetic sensor.
hold_position is the output of the control law and is what is going to be the input of the PD position controller.
position_threshold is set to make sure a big current draw is actually moving the position of the actuator's output.
kgc is a gain that makes the actuator comply faster or slower. By multiplying this constant by the difference between the measured current_q and the current_q_threshold it will comply faster when a bigger force is applied to the actuator's output.
May 5, 2021
Updated BOM of the actuator
I've started with the production of the 12 actuators that will make up the body of the robot and the 3 degree-of-freedom legs. I've moved away from the blue Solutech PETG I was using for the prototypes because it was surprisingly brittle and mechanically comparable to regular PLA, which I don't intend to use because sometimes the motors get hot and PLA deforms easily at low temperatures. I got RED Hatchbox PETG and I'm honestly impressed, the walls feel much sturdier than the blue PETG and even though it's harder to print it has a very nice finish and feel to it. The change from using nuts to the M2.5 inserts has been very great, it's much nicer to assemble/ disassemble the actuator. The inserts are pushed to it's place with a soldering iron; if using inserts, I encourage doing a few test prints before printing a final part because hitting the perfect size bore for these inserts can take a few tries.
April 17, 2021
Re-arranging the actuators
Aside from the obvious color change there are some key differences from the first actuator arrangement (left) and the one I settled with (right). The original arrangement has two shoulder actuators in the center of the robot and one actuator at each front of the robot (there isn't really a front and a back because it's symmetrical), this allows to move the hip actuators closer together and thus move the feet closer, making a more slim robot. However, this comes with some complications and disadvantages: having two motors on the outside of the robot exposes them to harm easier, the actuators on both fronts on the robot adds mass further from the center of mass, the space between the hip actuators, which should serve as a place to store the batteries and power distribution, is small.
The new arrangement is much closer to the ODRI Solo 12 design. If you're not familiar with ODRI's work and the Solo 12 robot I encourage you check them out. This arrangement keeps the fully symmetrical design and has a few advantages: most of the mass near the center of mass which is ideal, there's more space between the hip actuators for storage, there are no motors exposed, leaves both fronts of the robot open in case I ever decide to try vision and automated navigation.
April 10, 2021
Base actuator updated dimensions
After several iterations I've come to the final dimensions of the base actuator while prototyping around the actuator that is going to power the knee of the robot. The knee actuator is going to have a 155mm section length, a very nice height under 46mm and a width of around 42.5mm.
This final prototype (right) has a 12% reduction in mass, which is always appreciated. One last change is that I'm no longer using a XT30 connector mounted directly on the Dagor Controller's board, now I'm having the power cables come out of my *universal connector* and using the bullet connectors that come with the motors. This connector is subject to be changed, but it's what I have handy at the moment.
March 27, 2021
Torque vs. Q-Axis Current
Last time I did a torque test that measured torque vs. supply current and got a non-linear response. This time the current loops are closed, for actual FOC control, and we compare torque with the Q-Axis current (Iq) obtained with the Clarke-park transform. For this test the Dagor Controller inside the actuator is set to torque mode. Spoiler: the response is linear.
The video shows how I did the torque test. I sent to the actuator a current command, with my ESP-NOW wire-less controller, for a brief period of time and registered the force applied to the scale in grams. I later converted the force into torque considering a lever length of 170mm and graphed the results. Given the characterization presented in the equation obtained from the graph it is possible to command the actuator in terms of torque [Nm].
Having unlocked current sensing in the actuator it is possible to achieve higher acceleration profiles, AKA a bigger burst of energy. Updating the firmware of the actuators of the testing leg resulted in a new high jump record, coming in at 15 cm, measured from the point highest point when the leg is straight (right before flight), to the highest point in the flight. If you want to learn more about what I had to do to get current sensing working please visit this Hackaday blog post.
March 16, 2021
Actuator torque test
This video shows a torque test done with the Dagor Controller set to voltage control mode. This test shows the non-linear behavior from the power supply current and the torque.
This non-linear behavior confirms that it is not efficient (or accurate) to command the actuator in terms of torque by measuring the supply current while operating in voltage mode. More so, controlling torque in terms of voltage is a very conservative.
December 29, 2020
Quadruped robot build
This project is going to be accompanied by a YouTube video series.
The idea behind this projects is to design of a low-cost and low-mechanical-complexity quadruped robot as a scalable platform for torque-controlled robotics.
The project has a few key objectives:
Design a torque controlled 3D-printed actuator powered by the Dagor Controller.
Implement master(s)-slave(s) communication of the robot via a wireless protocol, resulting in a wireless actuator.
Deploy a robust gait and controller.
Scalability; ability to implement autonomous navigation, computer vision, voice commands, etc.