4dof Quadruped robot (T-Hex type) AXIS

Yep, this is the same conversation we had on a different thread… You have a very specific idea for the use of the SSC-32 offsets, and that is to once you adjust the position of the servo horn, by removing it and rotating it be within 15 degrees of the standard 0 location, you can then use the SSC-32 registers to do the final tweaking to get it zeroed. Zenta took a different approach and that was to leave the servos with their servo horns in the default horizontal/vertical alignment and then found the right logical zero point without adjusting the hardware. As this turned out to exceed 15 degrees he could not use the SSC-32 offsets for this and thus had the code simply add/subtract it in the servo driver code.

It is just two different approaches. Each have their pluses and minus. With the way the SSC-32 is defined, doing it the way Jim mentioned, gives you the benefit that once you adjust the servo horn to near 15 degrees of the desired zero point, you have more or less 90 degrees in both directions from the zero point. If you do without adjusting the servo horns and lets say your zero point is near 30 degrees from zero (1500 pulse), then you will only have something like 60 degrees in one direction and like 210 in the other. That may be good or bad for you… The benefit of Zenta’s approach is that it is a lot easier to prototype and try out different zero angles as you don’t have to change the hardware if you want to go a little farther… Also it helps minimize making the error of forgetting to move the servo horn by 1 or 2 clicks… But again both ways work!

So in Zenta’s code yes the 183 was probably specific to his setup, yours will probably be different.

Good Luck

That’s the way I’m seeing it. Kåre’s offsets will need to be removed.

We also have two leg joints that get an extra click (15 degrees) as noted. I wonder if anything else has to be done to account for this new “zero” of the servo. The range is shifted. No doubt, to better cover the range of motion wanted. Maybe that shows up in Kåre’s offsets as well. I think I’ll study Kåre’s offsets for these joints.

Any other observations?

Alan KM6VV

Kurt pointed out the essence in what I’m doing.
Also, read some posts from this one: lynxmotion.net/viewtopic.php?f=8&t=5723&start=62.
If you choose to calibrate using the internal offset registers in the SSC32 you’ll have to add some offsets in the code after snapping out the servo horn. Ex: the femur for T-Hex would get the range -105 deg to + 75 deg after a 15 deg snap upward. Define a constant in the cfg file called: cFemurOffset con 150
In the LegIK sub you’ll have to change the final femur calculations to this: ;IKFemurAngle FemurAngle1(LegIKLegNr) = -(IKA14 + IKA24) * 180 / 3141 + 900 +cFemurOffset
I used this method for Archer since I’m using the calibration part Kurt made for the ARC-32 code.

Hi Kåre,

Thanks. That sounds like what we should be doing.

And your suggested change for the two “offset” joints will now be visibly accounted for in the calculations. I appreciate that.

I am working towards a drawing to show the various joint angles of a 4DOF leg and their ranges, as we have done before for the CH3. I think I need that before I fully understand the relationships of the leg joints.

Apologies if I’m the only one not already intimately familiar with these servo offset accommodations.

Alan KM6VV

Thanks Kurt and Kåre for your comments (Jonny too!).

As I suspected, my errant leg had its servos in the reverse order. It helped when I put another SCC-32 along side, and was able to read pin numbers better. Now the legs move reasonable, although the 'bot is running somewhat, it could be said to be dragging it’s tail. So the offsets and such are not working for me.

I guess I’m still not clear on all this.

The T-Hex code works for Kåre, and his particular leg adjustments. We have to remove Kåre’s custom offsets, which I believe are here:

;[SERVO Offsets] cRRTibiaOffset con 650+438 ;Rear Right leg Knee

Unless we want to work out and put our own offsets into these lines.

I’d like to see the code “upgraded” to use the SSC-32 registers.

cCoxaOffset is currently applied at the end of the SSC-32 commands.

Kåre is saying add the new correction into FemurAngle1. Maybe that’s just the 150 for the 15 degree snaps?

Kåre’s 650+ offsets are much bigger then a mere 150. and I tried just zeroing out these C???Offsets, but that didn’t work. Are we talking about different units here? Servo counts vs. degrees? So, then the joints with the 15deg offsets should be translated to servo pulses, and replace Kåre’s C???Offsets? Something like

(15 * 10) * (1000/1059) = 142 for femur and tars?

cRFCoxaOffset con 0 ;Front Right leg Hip Horizontal cRFFemurOffset con 142 ;Front Right leg Hip Vertical cRFTibiaOffset con 0 ;Front Right leg Knee cRFTarsOffset con 142 ;Front Right leg foot

But it’s not that simple. I tried that, certainly wasn’t correct, and the left legs came up different from the right. OK, maybe a sign problem. So what is the position of the legs after “start” is pressed?

OH, I did work out the P0 problem. Jonny, remember when I was first trying to compile the code with Studio? Wouldn’t compile. Missing various pin defines, offsets, etc. The original BASIC allowed variables to be defined “on the fly”. The BasicAtomPro IDE also allows this. Trouble is, if you don’t initialize a variable, you probably get a 0. It it gets used as pin #, then I’m guessing we clobber the other commands to the pin. Studio would appear to follow other language (Fortran, C, others) conventions in this regard, and not allow it. Hence, Studio would not compile without the missing variables and constants. Nathan can probably verify/speak more to this.

Any thoughts? corrections?

Alan KM6VV

Alan, i think you might be confusing the situation here. i down loaded the T-hex code and all i change was the Body dimentions. everything else in the config file was as zenta wrote it. uploaded it to my atom and made additional changes to work for a quad. the code i last posted somewhere around here.

i would have thought that seeing that the legs will be the same and only your body dimensions would be different, that you wouldn’t have much to do. the code is T-Hex to Quad verified and will work with only minor adjustments.
you should have it walking. :confused:

That was my understanding, that you’d made minimal changes. So you’re somehow working with Kåre’s offsets? Must be lucky!

My body should be similar. I did use Lynxterm to set the resisters with the offsets.

I hoped that the notes on the compiler differences would be useful sometime. I believe it explains why your (and my) P0 was initially messed up. (if it matters).

I thought I found a real discrepancy in how the offsets were applied. And I mention that I’d like to see them resolved to using the registers; I haven’t quite figured that out.

Yeah, I should have it walking. It kinda looks like it wants to walk (on rug), but it’s not high enough off of the rug to be able. I can only imagine that Kåre’s offsets are getting in the way for me. Why they don’t bother your 'bot, I don’t know.

Hope I’m not bothering you. Perhaps I can get some answers from Kåre.

Alan KM6VV

Yes it is strange. I do remember that i used lynxterm to set my offsets but now i also remember that once i powered it up i remember having to pull out most of the horns and reposition them as much as 30 degrees. Once i had re set then horns they were perfect. Might have been me when i assembled it, i just assumed that was the case with little cat. I think you are right about P0. Well done, sound considerable.

Regarding your body height, after pushing start, (power up) are you pushing triangle, (walk position)? If you are and its not lifting much, id try and do what i had to do and remove the horns while powered up and moves then all to the 0 degree position we spoke about a while back. Hope this helps. Jonny.

My horns look good, I’ve even checked it often by putting in a little loop to set all servos to 1500 (can be commented out).

I’ve played with the triangle button, but didn’t realize it was required before walking. It does shift positions. Just tried it, but no real walking. I’m sure I tried it before. 6V battery needs recharging again, so I’ll repeat later.

I often get the horns off when first assembling. I move a servo to get it in, or change a leg build, and have to re-set one or more times after the 'bot is together.

Kåre’s offsets would seem to be a problem still, but I haven’t worked out how to replace them with a “null” value, or a 15 deg (150) value for Femur and Tars. Should be some nominal value that just adjusts for the “snaps” (with the 1000/1059 ms/degree scaling).

Kåre, where do your legs go if you just put in 1500 to all servos? I’m trying to figure out the offsets you’re using (650+ ??). Just put in:

cLRCoxaOffset con 650+0 ;Rear Left leg Hip Horizontal cLRFemurOffset con 650+142 ;Rear Left leg Hip Vertical cLRTibiaOffset con 650+0 ;Rear Left leg Knee cLRTarsOffset con 650+142 ;Rear Left leg foot

OK, now looks a little more reasonable, startup is hitting a little, but “in the ball park”. Haven’t tried walking again, I’m running off of the bench power supply.

Thanks!

Alan KM6VV

Yeah, I’ve been looking at those pix probably every day!

I should be close. I’m talking about the start-up posture, probably from
;[START POSITIONS FEET]

Two of my legs are compressed a little too much, i.e., femur up against tibia. I would have thought the limits would have caught that.

Alan KM6VV

Hi Jonny,

where does the time go!

I know, two Table-Top bots and RoboGames!

Where are you on your 4dof Quadruped robot AXIS build?

I should get back to my 'quad.

Alan KM6VV
P.S. I was reminded of this thread by your hexapod link to it.

Sorry Alan, missed this post.

Well at the moment with the Animatronic projects im currently working on i dont have time to update the AXIS quad. I stripped it down and so at the moment the SES is used in the *Stalker quad, but i do often think about building up the AXIS as i really liked it.
I think once TA becomes simpler or easier to integrate than the AXIS will be re-built.

*on hold due to other works.

Hi Jonny,

Don’t let the animatronics take you too far from the 'bots!

I like the AXIS. Maybe after I get the Table Top 'bots running with a new driver board, I’ll get back to my walking robots.

Alan KM6VV

Yes, old post.

But I’ve gotten back to my walking robots. I’ve forgotten much of what I was doing. I bought a QS3 chassis and pulled servos off of one of my quads to get a "proper’ 'quad built.

Getting close to seeing it run.

How’s AXIS doing? I need a name…

Alan KM6VV