Flexible hexapod....with a problem

Hexapod Robots

Flexible hexapod....with a problem

Postby eriklely » Thu Jan 26, 2012 3:02 pm

So i decided to build a flexible hexapod. I wanted to be able to change the tibia and femur lengths without a lot of fuzz, because i wanted to experiment a little with different leg designs. Because i like matt's hex engine i used a combination of p.Brain and a botboard II with atom pro. I am using an accelerometer (got that pretty much working), ping module (working), foot contact sensors (not pressure sensitive, just a switch) and a camera for now. I must say, even for someone with a very, very basic knowledge of programming the atom pro works pretty good for me.

The hex itself is build out of SES from lynxmotion and actually is the design of the CH3R, so the round body. Only i used the smallest body, longer legs and an angle offset of 30 degrees for the femur (same for the tibia of course). Because matt's engine doesn't allow for a 60 degree angle for the posterior or anterior coxa angle, turned these servos 1 click to make them 45 degrees (max in matt's hex engine).

I am going to make some pictures and make a movie tonight and post it here as well, but for now i am having difficulties getting the settings for the p.Brain right. Strange thing is that for the body move part it works flawless, it even looks very good. But the moment i try to walk i get an servo-overstretched error. I just can't figure out wat is happening. I could be looking over something really simple, so any help is welcome.

(poor quality, but anyway a good impression i guess)


Only clue i can see is that in calibration mode all the servo's are 90 degree angles, but if i wake up the hex it stands in another position. Remember though that all bodymovement is very fluid en Ik seems to check out really good.

Other thing is that i don't really understand the Initial Femur Angle and the Initial Tibia Angle. I can see the description of course, but can't figure out exactly what it does.

Oh and before i forget, is there any 'all = 1500' option in this hexengine? So all servos powered up in neutral, not one at a time.

Any help would be well appreciated......

You will find the body and geometry settings below as wel as the error i get.

BODY CONFIGURATION:

Anterior Coxa X (mm) = 57.00
Anterior Coxa Y (mm) = 95.00
Middle Coxa X (mm) = 107.50
Middle Coxa Y (mm) = 0.00
Posterior Coxa X (mm) = 57.00
Posterior Coxa Y (mm) = -95.00
Max X Rotate (deg) = 12
Max Y Rotate (deg) = 12
Max Z Rotate (deg) = 16
Max X Translate (mm) = 40
Max Y Translate (mm) = 40
Max Z Translate (mm) = 40

LEG GEOMETRY:

Coxa Length (mm) = 29.00
Femur Length (mm) = 105.00
Tibia Length (mm) = 150.00
Anterior Coxa Centre Angle (deg) = 45.00
Middle Coxa Centre Angle (deg) = 0.00
Posterior Coxa Centre Angle (deg) = -45.00
Femur Centre Angle (deg) = 30.00
Tibia Centre Angle (deg) = -120.00
Initial Femur Angle (deg) = 90.00
Initial Tibia Angle (deg) = -115.00
Coxa Servo Range (deg) = 90.00
Femur Servo Range (deg) = 90.00
Tibia Servo Range (deg) = 90.00



!! ERROR !! - Internal Engine Servo Error!
This is probably caused by one of the servos being over stretched!
MIN = 500, MAX = 2500




RAC: 500 RAF: 500 RAT: 2500
RMC: 500 RMF: 824 RMT: 1400
RPC: 500 RPF: 868 RPT: 1447
LPC: 1537 LPF: 1654 LPT: 1789
LMC: 500 LMF: 2108 LMT: 1580
LAC: 500 LAF: 2136 LAT: 1554
AX0: 1450 AX1: 1500 AX2: 1450
AX3: 1500 AX4: 1500 AX5: 1500
Last edited by eriklely on Sun Jan 29, 2012 3:35 am, edited 1 time in total.
eriklely
 
Posts: 37
Joined: Thu Nov 20, 2008 7:57 am

Re: Flexible hexapod....with a problem

Postby eriklely » Sat Jan 28, 2012 10:46 pm

Short update:

At least I know which values cause the problem. Seems there are quite narrow borders as to which values the p.brain accepts. The list with all my settings and the problem ones you'll find below. The biggest problem is the bandwith for the coxalength (CLN). Over 30 mm seems to cause problems. Besides that, I thought that the 45 degree was an option. But a setting of 0 and -90 (which seems pretty default to me) gives me an error as well. If I default to the MSHR01 default settings everything works, I guess that rules out an hardware problem. Only possible conclusion for me at this point is that there are specific ranges for body and geometry that work. So not all the ranges you can put in will actually work?!? I think?!?!

CLN=43 (21) > 35 gives immediate error when trying to walk, bodymovement is fine
> 30 gives error after a while (10 sec) when trying to walk, bodymovement is fine
FLN= 83 (80)
TLN=140 (131)

ACX=57.00
ACY=95.00
MCX=107.50
MCY=0.00
PCX=57.00
PCY=-95.00
IFA=90.00
ITA=-135.00
ACA=45.00 (35)
MCA=0.00 (0)
PCA=-45.00 (-35)
CFA=0.00 0 gives error on startup
CTA=-90.00 -90 gives error on startup

SERVO SETTINGS

RAS=011
RMS=011
RPS=011
LPS=011
LMS=011
LAS=011
CSR=92.50
FSR=99.50
TSR=99.50

GAIT SETTINGS

MFS=20
MSS=20
MTA=5
LZR=20
LLH=35
LLO=30
DLT=0.50
DGD=3
ORG=0

BEHAVIOURAL SETTINGS

DPD=48
DPU=125
APD=1
SLT=30
RET=10
STT=0.60
RTR=0
SRC=1
ASF=5
ADC=DDDDDDDD
DIO=IIIIIOOO
PIP=0
TXD=0
B3D=1
B3R=1.50
B3T=1.50

BODY MOVEMENT SETTINGS

MXR=15
MYR=15
MZR=15
MXT=40
MYT=40
MZT=40
TRF=7.00
PTR=1

HEAD SETTINGS

PAM=1500
PA+=2400
PA-=600
TIM=1500
TI+=2400
TI-=600
TWM=1600
TW+=2050
TW-=1150
GRM=1500
GR+=1600
GR-=1400
HSI=110
AHL=1
LPT=1

SERVO MAP
00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
SMP=16,03,15,02,14,01,13,00,12,23,11,22,10,21,09,20,08,19,05,17,04,07,18,06,

CURRENT CALIBRATION DATA (u Seconds):
Leg 1, RIGHT ANTERIOR : Coxa = 9, Femur = 39, Tibia = 29¬¬¬
Leg 2, RIGHT MIDDLE : Coxa = 1, Femur = 35, Tibia = -43
Leg 3, RIGHT POSTERIOR : Coxa = 83, Femur = 37, Tibia = -23
Leg 4, LEFT POSTERIOR : Coxa = 56, Femur = -79, Tibia = -5
Leg 5, LEFT MIDDLE : Coxa = -26, Femur = 36, Tibia = -72
Leg 6, LEFT ANTERIOR : Coxa = -10, Femur = 16, Tibia = -38
eriklely
 
Posts: 37
Joined: Thu Nov 20, 2008 7:57 am

Re: Flexible hexapod....with a problem

Postby Matt Denton » Sat Jan 28, 2012 11:46 pm

Hi Erik, sorry its taken a while for me to get to this, but I'll take a look tomorrow. From your video the body moves look good, but the leg reset looks odd, the legs barely lift off the ground, and although hard to tell it looks like the wrong joints were moving?? Could you post the complete settings list. cheers.
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1556
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Re: Flexible hexapod....with a problem

Postby eriklely » Sun Jan 29, 2012 3:47 am

I've update the video to a somewhat better video. Matt, i changed the legs so have a good look at the video before looking at the settings. As i can see it it tries to set de left posterior leg first, as it should it thought. Anyway as promised the last list of setting below.

What i did myself was restore the msrh01 settings and step by step took my own settings. I ran in trouble twice as i said; CLN and at first with the CTA and CFA as well. Only the latter two did work after i changed the ITA and IFA as well. So then is was left with a CLN. After changing that it did not walk anymore. At a CLN of over 35 there was and immediate error. With a CLN of around 30, it took a few seconds and than got an error. That's really all i can say about it now, the IK being a blackbox for me of course. This is a movies of an older design, with almost the same dimension femur and tibia, only coxa is 29 mm and offset is 30 or 45 degrees for femur and tibia (+90).



One last thing. What i find especially strange is that i designed the coxa, femur and tibia in such a way that then can actually all have the full motion freedom, they all can move at least 180 degrees. The legs can point straight up and straight down and the coxa can also move alll the way. That was the whole point of the design. Even pant, tilt and twist can all go the full range. So from that perspective there doesn't seem to be any limitation....

Image
Image

I hope we can get it to work, because it works really good; concentrating on other functions and leaving the IK to the p.Brain. I have the accelerometer sort of working. Wel it works, but stil somewhat jerky. I am working on a better averaging routine. Especially of you invert x and y output you get a robot that doesn't want to touch the ground it seems.

First test, accelerometer


And now again an exciting list of the settings of my hexapod:

LEG GEOMETRY:

Coxa Length (mm) = 43.00
Femur Length (mm) = 83.00
Tibia Length (mm) = 140.00
Anterior Coxa Centre Angle (deg) = 45.00
Middle Coxa Centre Angle (deg) = 0.00
Posterior Coxa Centre Angle (deg) = -45.00
Femur Centre Angle (deg) = 0.00
Tibia Centre Angle (deg) = -90.00
Initial Femur Angle (deg) = 75.00
Initial Tibia Angle (deg) = -135.00
Coxa Servo Range (deg) = 92.50
Femur Servo Range (deg) = 99.50
Tibia Servo Range (deg) = 99.50


BODY GEOMETRY:


ACX=57.00
ACY=95.00
MCX=107.00
MCY=0.00
PCX=57.00
PCY=-95.00
IFA=75.00
ITA=-135.00
ACA=45.00
MCA=0.00
PCA=-45.00
CFA=0.00
CTA=-90.00

SERVO SETTINGS

RAS=011
RMS=011
RPS=011
LPS=011
LMS=011
LAS=011
CSR=92.50
FSR=99.50
TSR=99.50

GAIT SETTINGS

MFS=25
MSS=25
MTA=6
LZR=25
LLH=35
LLO=30
DLT=0.50
DGD=3
ORG=0

BEHAVIOURAL SETTINGS

DPD=40
DPU=140
APD=1
SLT=30
RET=10
STT=0.60
RTR=0
SRC=1
ASF=5
ADC=DDDDDDDD
DIO=IIIIIOOO
PIP=1
TXD=0
B3D=1
B3R=1.00
B3T=1.00

BODY MOVEMENT SETTINGS

MXR=15
MYR=15
MZR=15
MXT=40
MYT=40
MZT=38
TRF=7.00
PTR=1

HEAD SETTINGS

PAM=1500
PA+=2500
PA-=500
TIM=1580
TI+=2480
TI-=580
TWM=1580
TW+=2050
TW-=1150
GRM=1500
GR+=1600
GR-=1400
HSI=110
AHL=1
LPT=1

SERVO MAP
00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
SMP=16,03,15,02,14,01,13,00,12,23,11,22,10,21,09,20,08,19,05,17,04,07,18,06,

CURRENT CALIBRATION DATA (u Seconds):
Leg 1, RIGHT ANTERIOR : Coxa = 9, Femur = 39, Tibia = 29
Leg 2, RIGHT MIDDLE : Coxa = 1, Femur = 35, Tibia = -43
Leg 3, RIGHT POSTERIOR : Coxa = 83, Femur = 37, Tibia = -23
Leg 4, LEFT POSTERIOR : Coxa = 56, Femur = -79, Tibia = -5
Leg 5, LEFT MIDDLE : Coxa = -26, Femur = 36, Tibia = -72
Leg 6, LEFT ANTERIOR : Coxa = -10, Femur = 16, Tibia = -38
eriklely
 
Posts: 37
Joined: Thu Nov 20, 2008 7:57 am

Re: Flexible hexapod....with a problem

Postby Matt Denton » Sun Jan 29, 2012 1:42 pm

Ok, some things I should point out with the IK. If we look at the anterior right coxa, the reason the offset angle can only be 45 degrees, is because the coxa range must be within 90 degrees of the X axis, if the leg swings around past this point there is a sign inversion and the maths will break.

Looking at your images with the femur at -90 degrees pointing directly at the floor and the tibia in line, at this point the maths may also break, there are effectively two solutions for tibia angle when it approaches zero degrees, and again there is a wrap around as it crosses the 0 degree boundary which will cause some strange IK results.

There is also a known IK problem if the tip of the tibia ends up directly below or above the coxa pivot point, in this case there are and infinite amount of solutions for the coxa rotation and hence the maths breaks.

I can't see why the CLN is breaking your walking solution, but if the tip of the tibia ends up under the coxa pivot this could be the reason. I'm just looking through your geometry now.
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1556
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Re: Flexible hexapod....with a problem

Postby Matt Denton » Sun Jan 29, 2012 2:01 pm

These were your settings for your new design:

ACX=57.00
ACY=95.00
MCX=107.50
MCY=0.00
PCX=57.00
PCY=-95.00
IFA=90.00
ITA=-135.00
ACA=45.00 (35)
MCA=0.00 (0)
PCA=-45.00 (-35)
CFA=0.00 0 gives error on startup
CTA=-90.00 -90 gives error on startup

try setting the following:

IFA = 45

with the setting you have the femur is trying to start at 90 degrees with the tibia at -135, it may not be geometrically feasible to get the tarsus in this position, with an IFA of 45, the hex should start up with the femur at 45 and the tibia at 90 to the ground.

also make sure your PWM setting is set to 2 to get the maximum pulse width range.

PWM=2

I'm also slightly suspicious of you CLN setting, only because from the pictures you supplied it doesn't look like the coxa and femur pivot points are 43mm apart, could you take a close up picture to confirm?
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1556
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Re: Flexible hexapod....with a problem

Postby eriklely » Sun Jan 29, 2012 3:28 pm

IFA = 45 gives me and an instant error, IFA=75 does work. At least for the body movement, still not walking. I tried untill PWM = 3 by the way. And the phote as promised (below). By the way, the bodymovement looks pretty much flawless, doesn't it? That's why I was thinking that all values should be correct...

!! ERROR !! - Internal Engine Servo Error!
This is probably caused by one of the servos being over stretched!
MIN = 500, MAX = 2500

RAC: 1509 RAF: 572 RAT: 852
RMC: 1501 RMF: 568 RMT: 780
RPC: 1583 RPF: 570 RPT: 800
LPC: 1556 LPF: 2388 LPT: 2172
LMC: 1474 LMF: 2500 LMT: 2105
LAC: 1490 LAF: 2483 LAT: 2139
AX0: 1500 AX1: 1580 AX2: 1580
AX3: 1500 AX4: 1500 AX5: 1500


Image

Also:
CTA=-135
ITA=-150
CFA=45
IFA=90

works a little, it does walk as long as i don't give it full stick. So half speed walking is possible with these settings.
eriklely
 
Posts: 37
Joined: Thu Nov 20, 2008 7:57 am

Re: Flexible hexapod....with a problem

Postby Matt Denton » Sun Jan 29, 2012 3:47 pm

Ok, well it can be seen by the error message that the issue is with the femur servos hitting their maximum range. Now I can see the leg design close up the coxa CLN setting looks correct. What I suspect is that the leg length is too long for the DPD height. So, lets start with some know positions that should work:

IFA = 0
ITA = -90
CAF = 0
CTA = -90
DPU = 140
DPD = 80

Now I'm guessing a bit with the DPD height, but it should be in range and looking at your geometry should end up with the femur approximately at 45 degrees or more when powered down. In the power up position the femur should be at 0 degrees with the foot directly below the femur joint, assuming the tibia is calibrated correctly, this will look as the though the tibia is sloping back slightly due to the geometry of the design. Could you take a picture of the hexapod in the calibration position? Also if your using HS-645MG servos for the coxa joint, you need to change the CSR value to match the servo, currently you have it set to HS-225 range, not taht this will effect the current issue.
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1556
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Re: Flexible hexapod....with a problem

Postby eriklely » Sun Jan 29, 2012 5:04 pm

Tried, no luck...

RAC: 2400 RAF: 1798 RAT: 2147
RMC: 2400 RMF: 1768 RMT: 2108
RPC: 2400 RPF: 1886 RPT: 2381
LPC: 2400 LPF: 1342 LPT: 1157
LMC: 1417 LMF: 1571 LMT: 1493
LAC: 2380 LAF: 1118 LAT: 1462
AX0: 1500 AX1: 1580 AX2: 1580
AX3: 1500 AX4: 1500 AX5: 1500

same problem.

As said before, if i put CLN=21 it walks! Have you ever used p.Brain before on a hexapod with coxa > 30 or 35 mm?

Hex in calibration mode:
Image
eriklely
 
Posts: 37
Joined: Thu Nov 20, 2008 7:57 am

Re: Flexible hexapod....with a problem

Postby Matt Denton » Sun Jan 29, 2012 5:19 pm

eriklely wrote:As said before, if i put CLN=21 it walks! Have you ever used p.Brain before on a hexapod with coxa > 30 or 35 mm?


No, but I can't see why this is causing a problem.

I don't think this will make much difference, but your tibia calibration is wrong. Imagine a straight line drawn from the centre of the tibia servo horn to the tip of the foot, this is effectively your tibia and this line should be at 90 degrees to your femur, not the actual tibia tube as per the picture. I presume from above the femur is aligned 90 degrees to the Y axis of the hex?

One thing you could check with the settings I gave you, go to the servo test screen, and move all the servos to 1500 eg middle position. When they are in this position it should produce something like the calibration position apart from the anterior and posterior coxa servos will be at their +/-45 offsets. Take a picture if possible.

Could you shoot a quick video of the the hex powering up with the settings I gave you, or does it crash during the power up cycle?
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1556
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Next

Return to Hexapods

Who is online

Users browsing this forum: No registered users and 1 guest