D.A.G.R. - Quadruped Robot

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

Gravity compensation/ 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 reproduces the effect of a virtual spring that is produced by a brushless motor trying to hold it's position. 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:

Where:

  • 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 brittle and no better than 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 stronger 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; I encourage doing a few tests before printing a final part because hitting the perfect size for these inserts can take a few tries.

April 17, 2021

Re-arranging the body

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 final 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

Second actuator torque test

Last time I did a torque test that measured torque vs. supply current and got a non-linear response. This time the current loop is closed in the FOC algorithm and we compare torque with the Q-Axis current (Iq) obtained with the Clarke-park transform. The Dagor Controller of 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 equation obtained from the graph it is possible to command the actuator in terms of torque.

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.