Good Morning All
Just pushed a minor change to @kurte’s lss_test_servos sketch. I incorporated a ‘c’ to config the servos for the session only to what I am currently using. Values are defined at the beginning of the the sketch.
Cheers
Good Morning All
Just pushed a minor change to @kurte’s lss_test_servos sketch. I incorporated a ‘c’ to config the servos for the session only to what I am currently using. Values are defined at the beginning of the the sketch.
Cheers
Good morning all,
I just synced and will try to play later. Been busy with other distractions. Like PS4 clones.
More later on other forum/thread.
FYI the communication issues are being investigated based on the feedback / results provided here. We’ll keep you posted. Keep chugging along and great to see the increased activity in the thread.
Happy Memorial day for those in the US otherwise Happy Monday. Ok did some more playing with that crazy pseudo gait that I am using for testing and Servo timing and communication. Found one interesting thing:
Now this is really going to be contigent on the gaits but more on that later first there is the LA trace:
First group on the first line is the tx of the movement commands the next set of traces on the 1st line are the check status for the 3 servos. The second line is the response - notice (not easy) but all three response come back as holding right away.
Now this is all contingent on my test case for actual movement which no one seems to be able to give me a good gait sequence yet. But here are the particulars for the servo setups and commands:
//====================================
//set MJS RF config Gait Test Values
//====================================
#define RF_COXA_MaxSpeed 600
#define RF_COXA_Gyre LSS_GyreCounterClockwise
#define RF_COXA_Offset 0#define RF_FEMUR_MaxSpeed 600
#define RF_FEMUR_Gyre LSS_GyreCounterClockwise
#define RF_FEMUR_Offset 700#define RF_TIBIA_MaxSpeed 600
#define RF_TIBIA_Gyre LSS_GyreCounterClockwise
#define RF_TIBIA_Offset 190//Time delays for Gait MoveT commands
uint16_t delay1 = 450;
uint16_t servo_move_time = 250;
//================================================================================
// RF leg array pins
uint16_t rf_ids [] = { RF_COXA, RF_FEMUR, RF_TIBIA };
int16_t rf_rip6_gait [5][3] =
{
{-48, 11, 110}, //Start position 1 - start position
// -4.8, 1.1, 11 degrees
{-26, 3, 51}, //position2
//-2.6, 0.3, 5.1
{ 0, 0, 0}, //position3
// 0, 0, 0
{ 31, 3, -44}, //position4
// 3.1, 0.3, -4.4
{ 67, 10, -82} //position5 - end position
// 6.7, 1, -8.2
};//=================================================================================
void generateGait()
{
for(uint8_t count = 0; count <1; count++) {
for(uint8_t position = 0; position < 5; position++) {
for(uint8_t ids = 0; ids < 3; ids++){
myLSS.setServoID(rf_ids[ids]);
myLSS.moveT(rf_rip6_gait[position][ids], servo_move_time);
}
delay(delay1);
checkStatus();}
}
//leg up start position
//6.7, -31.2, -34.3
myLSS.setServoID(RF_COXA);
myLSS.moveT(67, servo_move_time);
myLSS.setServoID(RF_FEMUR);
myLSS.moveT(-312, servo_move_time);
myLSS.setServoID(RF_TIBIA);
myLSS.moveT(343, servo_move_time);
delay(delay1);
//Serial.println("Position Start Leg Up: ");
checkStatus();
GetServoPositions();
}void checkStatus()
{
int8_t status1 = -1, status2 = -1, status3 = -1;
uint32_t statusTime = 0;
while(status1 != 6 || status2 != 6 || status3 != 6) {
myLSS.setServoID(RF_COXA);
if(status1 != 6) status1 = myLSS.getStatus();
myLSS.setServoID(RF_FEMUR);
if(status2 != 6) status2 = myLSS.getStatus();
myLSS.setServoID(RF_TIBIA);
if(status3 != 6) status3 = myLSS.getStatus();
delay(2);
statusTime += 2;
}
//Serial.printf(“Status: %d: %d, %d, %d\n”, statusTime, status1, status2, status3);
}
Part 2 of the message:
One good thing I did not see any errors popping up in the LA during the movement.
Next question I guess for @cbenson do you have a 3d model for the frame or a dimensional diagram so I can pull some dimensions off of.
@madmax - think you have an assembled version have you tried anything yet with it? Any recommendations for starting position for the legs like ground then stand before gait or other movement?
Really going to try and incorporate this into generating a real gate sequence or try the whole Github repo sketch - maybe
Hi @cyberpalin - Will have to try out your recent changes.
As I mentioned in my first quick and dirty first pass Phoenix code in my test project, I believe I had the ability to stand…
The other things I keep meaning to test. include things like:
If I tell the servo to move to position X in time T. how close is the timing?
I have not played with them enough yet to know how it does the ramp up timing, ramp down…
Will also be interesting to compare the smoothness of using the servos to control this, especially on large granularity. Versus have our code do the interpolation and output as many frames per second as we can to the servos. As I mentioned I believe the one ROS Hexapod code base I played on, he tried to output at least 100 frames per second.
Then depending if generating lots of Servo output is smoother, than having servo do it. Than to go even smoother we may want to do like @madmax mentioned and do break arc up into lots of small segments…
But That was with an 8 bit AVR. Can do lots more on 32 bit 600mhz processor that has hardware floating point.
Well now back to playing!
Again Sorry, not sure I am explaining myself very well… One thing I am wondering is how the PID like setups work with the servos with things like Timed Moves, especially when the moves are not in isolation.
That is I am not just moving from point X1 to X2 in time T1, but may likely want to continue to move to X3 in time T2… So how does the Ramp up and Ramp Down stuff work with this. That is
if I am moving from Position 100 to 200 in 100ms and then continue on to 300 again in 100ms. In this case you don’t need and probably don’t want the servos to slow down as it nears 200 (let alone stop) but you would probably want a continuous smooth movement of the servo.
But if T3 is back to 100, then you do need to slow down to zero to speed up in the opposite direction.
So question becomes how doable is this with the smarts in the servo? If you are trying to do this with the servo. again are you better off assuming that if you asked for it to get there in 100ms it will get there. and if you are using something like the Q command, should you cheat? If so how?
Set different values for AA and AD? If we know that next position continues in same direction cheat and not wait for state 6 but also maybe state 5 to set the next move? …
Again it would be interesting to see if anyone has done even a simple setup, like a 3DOF arm and have the have it move in some circular path with different ways of doing this and look to see which one feels more right?
@cyberpalin Indeed. You can download the CAD here (sounds like you already found it though):
@kurte
Just pushed the changes I mentioned and also added a cycle stance command that cycles through the stances - low/med/high (approximately) based on this picture that was posted:
Have fun playing.
@cyberpalin - Thanks, Looks great!
It builds… On the hexapod, one of the moves caused the leg to go all the way under the body and then the femur servo to start blinking… I will have to play some more. And figure out what I did…
In my VERY initial tests here with the hexapod, i had issues with the rubber feets sticking too much to the ground which cause over current like you pointing out.
Interesting. Most of my tests have been with the leg assembly clamped to the desk with the servos hanging off the edge. So… I just unclamped it so it could rotate freely when I tried the stance command and it did work but once or twice it seemed like the foot was sticking to the ground like @dialfonzo said in his message, but I moved it slightly to another position and it rotated up nicely - working with just the one leg may not be indicative of when its used on the whole hexapod.
Darn it I just thought of something that may be the cause of the problem. Remember that my servos are pre-configured for offsets and gyre - my bet is that yours are configured differently. Try doing a ‘c’ command to configure your servos (2,4,6) the same as mine then try the ‘i’ command again for the stances.
My bet is that yours are configure for CW which would definitely cause the leg to go underneath the hexapod.
On todays to do list was to change the orientation of the servos to match what’s in the hexapod code base and try and figure out the coordinate systems for each leg. I like working from first principles - I know its more work but helps me understand wants going on better.
@cyberpalin - You are probably right. I did not use the configure command. Will try that again soon.
@dialfonzo - Mine is actually sitting ontop of a Costco NUT container with a book under it as to keep most things off the ground.
@cyberpalin - You were asking me about how the output compare on the Dxl servos… I have not ported it yet to that setup. But I did pull out the XL430-W250 configuration of PhantomX, and hooked up LA to TTL line…
And loaded up an earlier port of Phoenix code to run on the $20 OpenCM 9.04 board …
Right now I have it configured for 20 frames per second, which you can easily see can be increased:
I am also running at 1MBS often with these servos and controller run at 2mbs. Here is more of a closeup of the output for one frame: Note in the current configuration I am also doing the interpolation so I am only sending the new goal positions. The data is shown both the the Serial Analyzer as well as my Dynamixel Analyzer.
Now back to other playing…
Ok - Just trying to be helpful (lol)
One thing you guys might like, and not sure you already seen it, is the Current Hold feature where you can add a modifier to have it stop. At the moment it’s quite useful for our arm Gripper.
'Thanks:
Here is my high priced stand:
Wondering if my leg is matching your leg? I.e. left legs versus right legs?
Since I am one legged who knows still working on that left vs right - I am using 2,4,6 as IDs but shouldn’t really matter with your test sketch if you use the config. Anyway think leg assemblies are the same:
PS> that green box is an PS4 box
Body and Leg Axes
Ok folks been through @madmax blog and then read through Oscar LIang Blog on hexapods IK/FK and still kind of confused on what orientation are the axes for the servos - body etc. For me this is basic that I think is taken for granted sometimes but since I am a new comer have get this straight in my mind.
From a paper I found: (PDF) Gait Kinematic Modeling of a Hexapod Robot (researchgate.net) I found the following figure that I think can be used as reference:
So x is forward, y is to the left and Z is up?
One reason I am asking is I am trying reorient myself from what I did for my robotic arm which has slightly different axes orientations depending on the joint type. In case you are interested: How to Assign Denavit-Hartenberg Frames to Robotic Arms – Automatic Addison
I do see a difference. Notice our ST1 lables on the tibia servo… The one where my LED is on. Notice the orientation of my ST1 sticker is going in the opposite direction. I should probably double check that my servos match what others did…