Hey everyone.
I'm working with the biped engine and am not really a C coder, but I think i've found a problem, or just don't understand actually what's going on.
To process the gait, an array is defined for each servo to set the amount of movement:
long signed int forward_left_foot[7]= {100,150,250,150,100,0,-100};
long signed int forward_left_ankle[7]= {100,150,250,150,100,0,-100};
The 'walk_forward' routine loops through these arrays to update the various servo positions:
left_foot=forward_left_foot
;
left_ankle=forward_left_ankle;
The move_biped routine adds these values to the established home position for each servo so all movement is relative to the home position:
left_foot(left_foot+home_left_foot);
left_ankle(left_ankle+home_left_ankle);
So if the home position for left_foot is 300, the servo should move to 400 as the 1st value in the array is 100 and it's being added to the home position, and so on as it loops through the array.
What I am finding in the code by adding rprintf statements is that the addition is not actually taking place, so when you execute the 'walk_forward' routine, the servo is actually moving to the values in the array, NOT the home_position plus the value in the array.
Based on the snippets above, can anyone tell me what I"m missing?
If you want to see the whole code, it's available http://www.societyofrobots.com/sor_biped_engine.shtml
THanks,
Marc