• aditya mehrotra.

chip updates: let's test funny walking algorithm [updates]

In the last chip post: https://www.adim.io/post/chip-updates-a-whole-new-world-of-guess-and-check-updates we looked at a slightly more trusting way of making the platform walk which is, just make it walk. In that if we walk by falling why don't we just ask the robot to try to fall forward onto its feet two at a time.

https://www.discovermagazine.com/planet-earth/walking-really-is-just-falling-and-catching-yourself According to Discover Magazine we basically FALL onto the other foot as we walk. And then we make slight stability corrections to the foot moving and the other foot. We can add these stability corrections later for now we'll try two falling patterns.

The first falling pattern is a "square step," and the second removes that top right corner point and produces a "triangle" step. Now in both of these examples. The stepping feet raise slightly and move forward but the stationary feet don't stay stationary they MOVE DOWNWARDS in an effort to kinda "launch/push" the platform off the ground. So maybe we actually in the future want the legs to do exactly the opposite things in that the legs on the ground move down and backward. Intuitively the triangle path might work better because of the shorter time the lift and forward move would take. But we'll try the square path first anyways as it might work. And then we'll try the triangle even if it works to compare the stability between the two.

So this morning we programmed in the path and set it to activate in "WALK mode" when we push the "LB." So we're going to try that on the stand, just as a sanity check that this will work with the trajectory and etc, and then place the robot on the floor, re-zero everything properly, stand up, and then activate this stepping and see what happens. So here we go! The theory/idea here is that since the steps are so small, the robot won't have time to fall onto another leg after then upwards push giving us time to STEP the platform a very small amount. At least, that's the idea and maybe with a small enough gate that can actually work. So we're going to try that let's see if it happens.

test ONE: just keep stepping (on the stand)

Test ONE involves making the robot follow the step-trajectory ON the stand and visually inspecting the step trajectory.

And I honestly cannot tell if this will do anything the idea is for it to jump. So let's put it on the floor.

test TWO: on the floor?

No comments, let's just try it... this is with the SQUARE WAVE.

Well it was much more promising than any of the other times we tried to get it to walk and -it kinda shimmied backwards.

Okay so what if we try the same strategy but ONE FOOT AT A TIME? We're going to use the SQUARE trajectory as it had much better results than the triangular one. Let's try this as a trajectory:

test THREE: the new kid in town

Yes let's try the new one leg at a time step and see if that works.

Okay so that didn't work. It seems like the feet are moving in the wrong direction here. I'm going to put this boi back on the stand and see what happens. I'm also thinking we need to go even smaller with the heigh 0.05 is a lot and the we move the other legs back while we're moving the leg forward, but let's try just making the "jump height" a little smaller.

So here's the problem. Controlling the XYZ commands like sending those does not allow us to move the leg straight up or down. the inverse-kinematics alone is not powerful enough for that. So what we really need to do is control the commands directly going to the motors but that's going to cause us to re-write a good bit of CHIP's framework. In fact there's a lot of unnecessary nodes in the system and having the master publish directly to the legs might be worth a shot. Now here's the problem though, right, we need to run a few more tests to get this idea to work. We need to find the balance point of the platform, the point where if the feet are in this position then the platform is essentially balanced and it can tilt forward and backward that way when we push forward we can be at a point where the platform could likely momentarily balance. We're going to switch into TEST mode and start trying this but FIRST! A note on Code.


After today, we're going to MERGE all of IK and BALANCE into master so we can program some finer control over the platforms individual motors. For today we'll leave it because we really don't have too much time!

Yea so let's adjust X_POS until we're getting kind of like a nice balance on the two legs that are down.

DAMN FIRST TRY!!!!! We set X_POS to 0.02 and what do you know, there's really not much weight on the legs that are not on the ground, I can move then around with my hand. Which tells me that this two leg at a time walking might just be possible if we set this to our new walk-home! So now I wonder what would happen if we tried to set this new position. we just found as the platform's new home position when standing but the other thing I want to do is test the other two legs and see if we keep the lifted two down and lift the other two if you get a very similar if not the same balance act. We won't film it but we'll run the same exact test.

I'm kinda wondering because the weight is FULLY off the front foot but there's some slight weight on the back if we make X_POS 0.015 instead of 0.2 if that will achieve the perfect level of balance. Let's try it but in theory this works for both sets of legs!

So close so close so close... let's try 0.01--> balancing will never work if we don't try to balance about the balance point you know! I can't really tell, I need to try lifting the feet a little higher like 0.1 or 0.15! Yea now that we lift by 0.1 it's clear we need to bring the legs back more, all four of them. Let's go back to 0.02, also I think we're shifting the wrong way oops. We should've been sifting backwards oh noes. Well let's try 0.02 with the 0.1 step height again!

Now we really are so so close. I'm going to move X_POS to 0.025 because as we can see here it is really at that balancing stage. The only difference is it takes slightly more effort to push the platform onto the forward foot than the rear foot. But this also gives us a strategy on how to take weight off of an individual front or rear foot. Either way, I want to try the 0.025 and try the balancing. We're going to test this, find this balance point, and then get to doing the 2.12 Lab that's due tomorrow, oops.

At 0.025 the robot leaned on its front leg. So now we know how to take weight off the back legs if we aren't moving the legs too far!

This is all very good to know as it will allow us to develop steps you know. Let's try 0.022 to see if we can get that perfect balance point. Now it's very slightly (I think) front heavy. 0.021? I don't think that 0.001 will make a difference because of the lack of precision of the system but let's try it. We're going to bring it back to 0.02 because at 0.021 the platform falls on its front foot. Maybe 0.015 again? I'm trying to get it to not fall on its front foot so quickly.

Now it's doing a weird thing where when I take the weight off the front foot it simply falls forward. Maybe we now know that X_POS > 0 takes the weight of the rear legs. Let's try X_POS < 0 to take the weight off the front. The balance point is around where the platform switches from front to back weighting maybe that's around 0.0! At 0.0 it falls towards the front leg, at -0.01 it falls towards the back. So let's try -0.005! -0.005 fell on the back foot.

-0.002? Nope - falls too hard back. -0.001? ... And now at 0.0 we fall on the back foot which tells us we need to do a shift of 0.01 forward or backward to get this thing to take weight off of the front or the back foot.

BUT THAT'S GOOD INFORMATION TO KNOW Let's TEST THAT theory. Let's set X_POS to 0.025 reset the platform, and see if that takes weight off the back foot. The make X_POS -0.025 and see if that takes weight off the front. We probably need more like a -0.03 or -0.035 for the front but we'll tune that later. For now, here are videos.

So as we can see, we can now take weight off the front or the back. And we can kind of learn where the CoG is at any time. What makes this really hard with this platform is the slack on the gearboxes. The slack means this position changes so we need to come up with a much better/more exact zeroing technique. We will work on that but now, from the next time we work on this. We know how to take the weight off of a foot. And in that second video we might have even managed to take the weight off of BOTH.

Let's do the one-leg-at-a-time trot now that we know how to take the weight off and see where exactly we get with it.

#updates #omgrobots #weight_balancing

0 views0 comments
© copyright 2019 | aditya mehrotra