Ground Contact Switch "Next steps"

lol. Well yes.

iv still not got it working yet. when i was testing the codes, i only had one leg operational. with the code i was using (shown below) was actually making all the legs stop at the sametime and not just the one that was detecting ground.! :confused:

Algorithm:

[code]IF xx_FSR THEN ;No Sensor Detection
SLLegY(cxx) = SLLegY(cxx)+1 ;Lower Leg

ENDIF
IF NOT xx_FSR THEN ;Sensor Detection
sound p9, [50\4000]
SLHold(cxx) = SLHold(cxx)^1 ;Foot Will Remain in Place
ENDIF[/code]

iv even tried to use the InitPosY as a variable but this too didn’t work.

Have you managed to code the foot sensors yet?
Do you think this is possible with the roboard instead of using ssc-23?

No unfortunatly not yet. When i get more time i will try again but iv been rather busy at the mo. :frowning:
the ‘botboard’ or ‘ssc-32’ can be used this way. My setup has the wiring going to the input pins on the ‘botboard’. Lol

I am currently using the Roboard running linux connected to ssc-32 its all working fine but adding foot sensors is more difficult than I thought so now I am playing with the roboard’s pwm ports to see if I could connect the servos directly and have more control over them also I have ordered some hitec hsr 5990 digital servos hoping they will help.

Jonny,

I’m working on adding my body offsets. What is the orientation or the axis (X,Z) That the coordinates are using? My signs are all the reverse to what you’ve put in. Also, I’m seeing 0’s in the table, Which don’t seem right!

Alan KM6VV

[code]cRROffsetX con 63.5 ;-50’-38 ;Distance X from center of the body to the Right Rear coxa
cRROffsetZ con -88.9 ; 0’40 ;Distance Z from center of the body to the Right Rear coxa
cRFOffsetX con 63.5 ;-30;-60 ;Distance X from center of the body to the Right Front coxa
cRFOffsetZ con 88.9 ; -75;-40 ;Distance Z from center of the body to the Right Front coxa

cLROffsetX con -63.5 ;50’38 ;Distance X from center of the body to the Left Rear coxa
cLROffsetZ con -88.9 ; 0’40 ;Distance Z from center of the body to the Left Rear coxa
cLFOffsetX con -63.5 ;30’60 ;Distance X from center of the body to the Left Front coxa
cLFOffsetZ con 88.9 ; -75’-40 ;Distance Z from center of the body to the Left Front coxa
[/code]

hi alan:
yes well
X is side to side
Z is front to back

the reason you might see 0’s is that i acts as a stopper so the leg wont go past its Z center point. what iv done here is iv given my rear legs the same coordinates as what the middle legs as would be set at on a hex.

the reason i did this was to compensate for my chassis dimensions so “as explained” the rear legs wont move too far forward, making it topple backwards." but you can try adding the true values and see what happens. :wink:

OK,

I guessed X was side-side, and Z fore-aft. Assuming 0,0 is the center of the 'bot, which way are the axis running? up and left, one would assume, would be +,+. But maybe not in this non-standard coordinate system (I’ve complained in the past on this already).

I see now why you’d use 0, as is used in the hexapod for the center leg pair.

I’d better ask about the starting leg offsets as well. They are relative to the coxa axis?

My first leg position after pressing start has two diagonal legs with the Tibias of the two rear legs.

I redefine the SSC pins for the servos, but that shouldn’t have any effect.

[code];[SSC PIN NUMBERS]
cRRCoxaPin con P3 ;Rear Right leg Hip Horizontal
cRRFemurPin con P2 ;Rear Right leg Hip Vertical
cRRTibiaPin con P1 ;Rear Right leg Knee
cRRTarsPin con P0 ;Rear Right Foot

cRFCoxaPin con P12 ;Front Right leg Hip Horizontal
cRFFemurPin con P13 ;Front Right leg Hip Vertical
cRFTibiaPin con P14 ;Front Right leg Knee
cRFTarsPin con P15 ;Front Right Foot

cLRCoxaPin con P16 ;Rear Left leg Hip Horizontal
cLRFemurPin con P17 ;Rear Left leg Hip Vertical
cLRTibiaPin con P18 ;Rear Left leg Knee
cLRTarsPin con P19 ;Rear Left Foot

cLFCoxaPin con P28 ;Front Left leg Hip Horizontal
cLFFemurPin con P29 ;Front Left leg Hip Vertical
cLFTibiaPin con P30 ;Front Left leg Knee
cLFTarsPin con P31 ;Front Left Foot
[/code]

Thanks!

Alan

OOPS, the wrong thread for the 'quad questions.

Hi Jonny,

You’re still experimenting with Method 1? I really think this isn’t the way to go, so I’m not planning on putting more effort in it. Although it is always good to do some tests yourself. Maybe you get a better result.

As for Method 2, This involves about double the math comparing to the existing code. I’ve done the major part in my rare spare hours over the last few months. Currently I’m stuck on some matrix calculations for the body. I’ve got some leads out to get more information about it. I think I will get some more free time in about a month or so. Hopefully I will be solving the last 20% of the riddle :wink:

Hold on!

Xan

hi Jeroen

well im trying many method i can at the moment. but yes im starting with the simplest parts first.
i understand that there is a whole load of math involved but im kinda thinking that if i can just make the legs fall below there set InitPos during gaitstep in till the tars detect contact.

how did you do it with the hybrid.?

As before, when looking at your robot from above with the robot’s head facing you…the Z-axis is front to back and the x-axis is side to side. The robot’s right front leg is (-,-) on the axis and it’s rear left leg is (+,+). Additionally, the Y-axis is the vertical axis down toward the ground is + and up toward the sky is -.

Hi Jonny,

With method 1 you need to pick (or make) a gait where the leg travels down in a strait line. Then if the leg is moving down divide it in to small steps and check every step if the switch is hit. That’s the method I used on the YouTube vid.

I’m not quite sure I answered your question correctly…

Xan

yes that is my intention. :wink:

what command did you use?
do you have a copy of the code i could look at to get more of an idea?

this is the other thing im stumped on:

the code i wrote previously was hung but the way i was understanding it was that the RF_FSR=0 meant no connection made and RF_FSR=1 was connection made. iv learned this not to be true, there for i was them writing it as

if RF_FSR then…

This worked but if im just simply writing RF_FSR does this mean contact made or no contact made. just need a bit of guidance on how to show if the sensor is on or off.

also why wouldnt changing initpos to a variable do the trick, and have them automatically drop slowly e.g: (+1) as soon as the sensor is off the ground.

the reason i ask this is i would have liked it to be written like this:

[code]RightFront:
IF RF_FSR = 0 THEN RightFront ;check sensor state
IF RF_FSR = 1 THEN RFDown ;check if switch is on if so goto label RFDown
goto RightFront ;will continue to loop until switch active
RFDown:
cRRInitPosY = cRRInitPosY-1 ;Lower Leg

goto RightFront ;goes back to main loop and starts over again
END[/code]

Been in contact with Active and due to the plain crash in Dubai my sensors have been delayed but it is scheduled to arrive on the 13th September !! Hooray

Are you sure it was just a bunch of “sensors” you’ve ordered? :wink:

About the piece of code you posted. You’re not doing IK and updating the servo positions in your loop.

Lol. Well you know me, i cant help it if a few extra items make it to my shopping cart! Lol.
IK… Yeah at the moment im just looking at getting the legs to drop in till contact is made, then stop. Not worried about the waking part yet. Solveing the little things first. Not my usual way of doing things but thats my approach. :slight_smile:

Ok, you’ve got me confused now. Are you trying to lower the leg in small steps or all the way and use the stop command?

“at the moment im just looking at getting the legs to drop in till contact is made”
so yes i guess either approach is what im looking for. id like the legs to move at normal speed.

What is the movement command you are giving the leg when the leg is commanded to move down until it makes contact?