Yet another in the series on building a new leg for the quad A1:
In the spirit of my last post on the topic, here is another video-only update on a new leg design for the quad A1:
I’m going to try something new for this effort, and instead of making a bunch of blog posts culminating in a video, I’m going to make a bunch of intermediate progress videos. They may, but may not, culminate in an overview blog post. Here’s the first!
Here’s the approximately annual giant video update:
If you’re interested in any of the topics in more detail, I’ve collected links to individual posts for each of the referenced items below.
Thanks for all your support in the last year!
Announcement of moteus r4.3: Production moteus controllers are here!
Automated programming and test setup: Programming and testing moteus controllers
Continuous rotation: Unlimited rotations for moteus
The virtual wall control mode: New “stay within” control mode for moteus
Handling magnetic saturation: Dealing with stator magnetic saturation
Discussion of the overall design, and details on individual sub-components:
- moteus servo mk2
- moteus servo mk2: Planet Input
- moteus servo mk2: Outer housing
- moteus servo mk2: Front housing
- moteus servo mk2: Back housing
- moteus servo mk2: Functional test
- Making the reduced weight servo mk2
- moteus servo mk2: Reduced weight test
And the pre-production mk2 servos: Pre-production mk2 servos
Ground truth torque testing: Ground truth torque testing for the qdd100
Skyentific’s telepresence clone: qdd100 telepresence demo
kp and kd tuning: Spring and damping constants
quad A1 – Hardware
Lower leg updates:
- The first quad A1 leg: Update leg design for mk2 servo
- The first foam cast foot: quad A0 – Improved foot design
- Longer and with a knee gear reduction: quad A1 leg updates
- A fixture to assemble legs: Quad feet construction fixture
- One of the feet failures: Another foot failure
Cable conduit changes: New leg cable management
quad A1 – Software
Cartesian coordinate control: Cartesian leg PD controller
Pronking: Successful pronking!
tplot2 and its sub-pieces:
- Updated serialization library
- Revised mjlib serialization design
- C++ serialization API
- Log file format
- Video in tplot2
- 3D rendering in tplot
- Video and telemetry synchronization
Simulation: Resurrected quadruped simulator
nrf24l01 transceiver and its sub-components
- Spread spectrum RF control and telemetry
- Spread spectrum protocol design
- Spread spectrum implementation
- Spread spectrum integration
Smooth leg motion: Improved swing trajectory
- Primitive gait balancing – 1D
- Balancing gait in 2D
- Balancing on estimated terrain
- Testing real-life hill operation
Improved stand up sequence: quad A1 stand-up sequence part N
In two previous posts (part 1, part 2) I discussed some changes I made to the gait sequencing on the quad A1. Things are working relatively well now, sufficient that I was able to take this compilation video in one sitting without any gait or mechanical failures! I actually took a lot of the outdoor shots from this video in the same session, so things are definitely getting more robust.
It’s only October, but the weather is what it is and robots will do what they do!
While testing the improved gait sequencing for the quad A1 I got some footage of it traversing a few different types of outdoor semi-rugged terrain.
The first clip shows it walking over some tree roots. In this particular instance, it just uses a high stepping gait, which allows the feet to get on top of the root. The gait sequencing doesn’t handle walking over the taller part of the root very well yet… the robot can get “high centered” on two legs, with the other two flailing in the air.
In the second clip the robot runs across some loose gravel and leaves. Here each foot fall skids around a fair amount and kicks up loose debris, but otherwise wasn’t too challenging.
For the third clip, the quad A1 walks through some grass and over some pavers, which are around 1-3″ raised above the baseline grass level. Here raised steps allow the robot to move at nearly the same speed over the pavers as it can move over the grassy terrain.
In the final clip, it walks over some loose bricks. With each footfall, the gait sequencing is looking for when contact is made with the ground. That allows the robot to stop pushing once contact is made. The current formulation does attempt to get the legs back to their “average” Z position at the end of each cycle, which is sufficient for this type of terrain, although a longer-term outlook would allow it to tackle even tougher terrain.
Now that the quad A1 has been running faster, it has started “running” through its ad-hoc cable management too. After replacing a harness for the nth time, I decided to actually design something rather than just keep re-building over and over again.
My current best effort uses semi-flexible nylon split conduit, captured in 3d printed forms at each joint. Inside that conduit is basically the same harness I had before, with the cables selected to be more robust to repetitive motion. The nylon conduit is only semi-flexible, so it enforces a relatively large minimum bending radius on the wires within, while still sticking to the black quad A1 color motif.
To verify this would be at least a minimal step up, I ran some endurance testing with around 100,000 cycles of the leg moving. With no degradation of the cables in that window, I’m calling this good enough for this iteration of improvement.
In the last post, I described the newer gait engine which takes a desired command and produces a set of gait parameters. At that point, the gait engine needs to implement those gait parameters in a way that is stable with respect to disturbances and keeps the two legs properly out of phase with one another.
The gait variables that the gait selection procedure emits are as follows, each “leg” is actually a pair of legs.
- swing time: This is the amount of time between when a leg lifts off the ground, and when it lands again.
- one leg time: This is the amount of time spent with only a single leg on the ground.
- two leg time: The amount of time with both legs on the ground.
- flight time: The amount of time with no legs on the ground.
I’ve chosen to implement this for now with two controllable variables, when to pick up the next leg to begin its swing phase and how far out to place the foot when landing. When in flight, the swing time is fixed to be exactly what the gait engine selected. When on the ground, the leg position and velocity are fixed in the world frame to match the current command. This results in the other three parameters, one leg, two leg, and flight time, being approximated as best as possible.
When to lift
When there is no flight time, then the heuristic for when to lift the leg is identical to that described in “Balancing gait in 2D“. The trailing leg is lifted when the opposing leg is half of a swing time away from crossing the balance point.
When there is a flight time present, we have to add a corrective term to that heuristic, otherwise the two legs can lose their phase synchronization. If the correct out of phase relationship is being held, then the leg will be lifted when the alternate leg is in flight and has the “flight time” remaining in its swing cycle. The correction for that leg is calculated as a difference in time around that point such that the correction is positive before that point and negative after scaling in a linear manner. This has the desired property that the two legs are kept out of phase, without enforcing a strict leg cycle time.
Where to place
Once again, when there is no flight time, the placement location is the same as before. When there is a flight time, then the placement location is even simpler. Now it is just a position forward of the balance point by one half of the “one leg time”. This results in the machine spending roughly half of its time on each side of the balance point.
I’ve got one further enhancement to this technique to describe, at which point I think I’ll have basically exhausted its promise. Further advances will likely have to come from using an optimization based controller rather than a heuristic driven approach.
As hinted in my earlier video I’ve been working towards some higher speed gaits with the quad A1. To accomplish that, I had to restructure the gait sequencing logic to permit changing cycle times and allow flight phases.
For now, I’ve tentatively broken down the trot gait into 5 regimes, based on how fast the machine is moving:
- At the slowest speeds, the flight legs swing through a step in the configured maximum flight time. The interval between flight times is fixed at a configured maximum. Here the speed is determined by how far the flight legs move.
- Once the flight legs are moving through their maximum allowed distance, then the amount of time spent with both legs on the ground is reduced in order to increase speed.
- At the point when both legs are not on the ground at the same time, then there begins to be a flight phase. Increasing the length of the flight phase increases the speed.
- When the flight phase reaches a configured maximum, then the swing time is decreased until it reaches a configured minimum.
- When the swing time is at a configured minimum, the flight time is at a configured maximum, and the legs are moving through their maximum range, then the machine is moving at its maximum speed.
Depending upon the current commanded rotation rate and translation velocity, the distance available for the legs to travel through may change. This uses the same mechanism from the step selection technique to determine the maximum distance at each update cycle, then selects which of the above regimes is active based on the commanded speed.
For a given maximum distance the legs can move through, that results in key gait parameters changing with speed as in the plot below:
Next up I’ll cover the heuristics used to implement any given set of gait parameters in a stable manner.