Lynxmotion SES V2 Hexapod Robot

Ok now it all makes sense at least to me - you might want to check out that instructable ( . Hexapod : 14 Steps (with Pictures) - Instructables ) from what I saw he is using a modified version of your code but he converted it to using a PS3 so the commands look almost the same:

//Project Lynxmotion Phoenix
//Description: Phoenix, control file.
//The control input subroutine for the phoenix software is placed in this file.
//Can be used with V2.0 and above
//Configuration version: V1.0
//Date: 03-10-2017
//Programmer: Frank Friedhof port to PS3 USB/BT, Jeroen Janssen (aka Xan)
// Kurt Eckhardt (aka KurtE) - converted to c ported to Arduino

//
//Hardware setup: PS3 version
//
//NEW IN V1.0
//- First Release
//
//Walk method 1:
//- Left Stick Walk/Strafe
//- Right Stick Rotate
//
//Walk method 2:
//- Left Stick Disable
//- Right Stick Walk/Rotate
//
//
//PS3 CONTROLS:
//[Common Controls]
//- StartTurn on/off the bot
//- L1 Toggle Shift mode
//- L2 Toggle Rotate mode
//- Circle Toggle Single leg mode
//- Square Toggle Balance mode
//- Triangle Move body to 35 mm from the ground (walk pos)
//and back to the ground
//- D-Pad up Body up 10 mm
//- D-Pad down Body down 10 mm
//- D-Pad left decrease speed with 50mS
//- D-Pad right increase speed with 50mS
//
// Optional: L3 button down, Left stick can adjust leg positions

// or if OPT_SINGLELEG is not defined may try using Circle

//
//
//[Walk Controls]
//- select Switch gaits
//- Left Stick (Walk mode 1) Walk/Strafe
// (Walk mode 2) Disable
//- Right Stick (Walk mode 1) Rotate,
// (Walk mode 2) Walk/Rotate
//- R1 Toggle Double gait travel speed
//- R2 Toggle Double gait travel length
//
//[Shift Controls]
//- Left Stick Shift body X/Z
//- Right Stick Shift body Y and rotate body Y
//
//[Rotate Controls]
//- Left Stick Rotate body X/Z
//- Right Stick Rotate body Y
//
//[Single leg Controls]
//- select Switch legs
//- Left Stick Move Leg X/Z (relative)
//- Right Stick Move Leg Y (absolute)
//- R2 Hold/release leg position
//
//[GP Player Controls]
//- select Switch Sequences
//- R2 Start Sequence
//
//====================================================================

Look familiar. Was beginning to take a look at it before I got sidetracked with other chores. Anyway if you don’t use XBEE’s there are several options available - I always like the 3dr radios. Use them in most of my robots now. Although the HC-12 isn’t bad but a little more confusing to setup.

1 Like

Sounds great and looks familiar.

Also building your own DIY controller for people like me, who are all thumbs, not sure I get enough added bang for the buck.

So again many options
 These game controllers are probably good enough for stuff I do. That is I am no way near coordinated enough to move two joysticks at the same time while twisting the knobs on top and using other fingers to move sliders and or push buttons


But if going that way, an issue we would run into is when you decide to send messages both directions, there are times with large gaps of time with no messages
 So would maybe put two cheap radios on both remote and receiver.

But back to other subject

I updated the test sketch, that when you are just after the time you said that the move should take, it asks all of the servos for their current position. And at the end I now don’t call the getServoPositions, but instead have it’s own loop that prints out for each leg and servo, the goal position, the position at the time we expected and at the end
 I also toggle an IO pin so you can see where that is in the stuff



Again every cycle through this run at least one servo failed to properly form a response message.

And sort of interesting in the timings and values
 Output from this run:

Cmd: c
Servos for Leg Left Front **found**
Servos for Leg Left Middle **found**
Servos for Leg Left Rear **found**
Servos for Leg Right Front **found**
Servos for Leg Right Middle **found**
Servos for Leg Right Rear **found**
...
Cmd: i
Checks Status wait loops 1 in us: 15423
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 1)	F:3(-900, 0, -901)	T:5(-600, 0, -603)
C:13(0, 0, 1)	F:15(-900, 0, -902)	T:17(-600, 0, -603)
C:1(0, 0, 1)	F:9(-900, 0, -903)	T:11(-600, 0, -601)
C:2(0, 0, 0)	F:4(-900, 0, -902)	T:6(-600, 0, -597)
C:14(0, 0, -1)	F:16(-900, 0, -900)	T:18(-600, 0, -601)
C:2(0, 0, 0)	F:10(-900, 0, -901)	T:12(-600, 0, -599)
get status for Tibia servo:18 for leg:4 failed on loop: 14
get status for Femur servo:3 for leg:0 failed on loop: 23
get status for Femur servo:15 for leg:1 failed on loop: 45
Checks Status wait loops 46 in us: 688400
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 1, 1)	F:3(0, -759, -10)	T:5(0, -424, 11)
C:13(0, 1, 1)	F:15(0, -708, 17)	T:17(0, -432, 9)
C:1(0, 0, 1)	F:9(0, -699, 18)	T:11(0, -438, 7)
C:2(0, 1, 1)	F:4(0, -697, 15)	T:6(0, -454, 3)
C:14(0, -1, -1)	F:16(0, -705, 13)	T:18(0, -428, 10)
C:2(0, 0, 1)	F:10(0, -704, 16)	T:12(0, -403, 13)
get status for Tibia servo:18 for leg:4 failed on loop: 7
get status for Tibia servo:17 for leg:1 failed on loop: 18
Checks Status wait loops 109 in us: 559850
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 1, 1)	F:3(450, 93, 407)	T:5(450, 118, 456)
C:13(0, 1, 2)	F:15(450, 123, 455)	T:17(450, 234, 452)
C:1(0, 1, 1)	F:9(450, 248, 457)	T:11(450, 231, 453)
C:2(0, 1, 0)	F:4(450, 237, 453)	T:6(450, 236, 452)
C:14(0, -1, 0)	F:16(450, 246, 454)	T:18(450, 232, 452)
C:2(0, 1, 0)	F:10(450, 257, 457)	T:12(450, 250, 456)
get status for Tibia servo:5 for leg:0 failed on loop: 31
get status for Tibia servo:12 for leg:5 failed on loop: 35
Checks Status wait loops 36 in us: 532394
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 1, 1)	F:3(0, 302, -4)	T:5(0, 286, -7)
C:13(0, 1, 1)	F:15(0, 289, -6)	T:17(0, 300, -3)
C:1(0, 1, 1)	F:9(0, 298, -1)	T:11(0, 277, -13)
C:2(0, 1, 0)	F:4(0, 273, -11)	T:6(0, 285, -7)
C:14(0, 0, -1)	F:16(0, 272, -12)	T:18(0, 286, -10)
C:2(0, 1, 0)	F:10(0, 277, -11)	T:12(0, 279, -10)
get status for Femur servo:4 for leg:3 failed on loop: 60
Checks Status wait loops 67 in us: 663060
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 1, 0)	F:3(-900, -129, -825)	T:5(-600, -145, -602)
C:13(0, 0, 2)	F:15(-900, -135, -840)	T:17(-600, -130, -601)
C:1(0, 0, 0)	F:9(-900, -152, -844)	T:11(-600, -142, -601)
C:2(0, 1, 0)	F:4(-900, -162, -860)	T:6(-600, -152, -601)
C:14(0, -1, -1)	F:16(-900, -155, -851)	T:18(-600, -157, -601)
C:2(0, 0, 1)	F:10(-900, -166, -857)	T:12(-600, -145, -598)
0 - All Servos off

I probably need to do the math to see if setting the max speed is causing this differences in how long.
Also maybe should generate something like an 12 step cycle for a step with smaller increments and see if the timing improves.

@cbenson and @dialfonzo And if anyone from RobotShop is looking for test cases which shows servo response hickups, as you can there are several. Again most of the are like:

Note, I also see some other responses where is a real short blip in the signal again at same location in messages, but is short enough that it did not through the target off far enough to error out.

Also with issues like this, is this the best place to document it, such that your developers can see it and/or should we do something like create an issue against some Github project? Like the LSS_Library_Arduino? Or is there a better github project associated with the actual servos?

Also in regards to this issue, should we also add to same Github Issue if appropriate and/or again to the Arduino Library github issues. Like if a servo hiccups like the above shows, the Arduino library should hopefully detect that it received a portion of the message and then nothing and/or Serial error
 And maybe not wait for a whole 100ms for the remaining response


And in addition the library should have the ability to setup a shorter timeout. For example except in cases where the messages are mangled or servo does not exist, most of my responses are returned typically in maybe .5ms. Now maybe there are cases where servos take longer? So with this setup, I might want to do something, like if there are some query functions that could take a bit of time, maybe have a 10ms timeout, for those that I expect faster, I might want to set for something like 2 or 3


Now back to seeing about why the the positions at the time we asked are no where near where close to what that is reported.

@cyberpalin - Maybe movement we asked for is not doable in the time frame we requested?

That is if we look at the data I showed in previous
 and maybe only first leg

Disregard servo 1 as we are not moving the coxa.
But look at the Femur: we are asking it to move from -90 degrees to 0 in .25 seconds.

Now if I look configuration for Speed for that servo:

Servo 3 values
...
  QSD(-1) - 360 t:950
  QSR(-1) - 60 t:890
...
  QMS(-1) - LSS-ST1 t:1104

So it looks like it is configured to be able to do 360 degrees per second
 So we should maybe be able to do this.

But looking at servo 1:

Servo 1 values
...
  QSD(-1) - 360 t:957
  QSR(-1) - 60 t:896
  QMS(-1) - LSS-HS1 t:1125

They have the same speed values? When one is High Speed.
But then the comments say things like: The servo’s maximum speed cannot be set higher than its physical limit at a given voltage.

So again wonder what the physical maximum is? Can I somehow query it? Wonder what happens if I tell it I want to go faster if I try to set it to 1024, will it set it as that or will it know it’s own maximum and update that value


Looking at website it looks like ST1 can go max 60RPM (i.e. one one rotation per second) and the HS1 can go 100 RPM


So again it looks like we are asking to go at it’s highest speed and it still taking maybe twice as long?

Will keep looking

EDIT I get almost the same output when I use the move command instead of moveT for these moves!

It could very well be. You are definitely seeing more issues than I was when playing with just the one leg. I thought I had changed the servo time to something like 350 - 450 etc but still was having issues with it not completing the move without having to go through several cycles of checkdisk. Think the best case was Servo_id 2 and 4 would get there quickly and then 6 would take a while to complete the move. Also saw the same thing that on the first move it would take longer to complete the move etc. Think you can see that in my LA traces as well. That is basically how the 450ms delay got derived. Anything lower than that caused issues.

Maybe you should be an issue in on their library page or the beta page as a reminder when done - was thinking about that for the assembly stuff that we found as well.

BLUETOOTH
 Ok starting going through what you have for the BT controller and found one issue at least for the DS4 that I am using - well make that 2.

  1. Was using the debug version of UHT3 so reverted to using the one in TD154b9 and that cleared up one of my problems.
  2. Kind of checking things as I am going and found that you had
  	int hat = joystick1.getAxis(9);  // get hat - up/dwn buttons
 Serial.printf("HAT: %d\n", hat);
  	if ((hat >= 0) && (hat < 8)) g_buttons |= PS4_MAP_HAT_MAP[hat];

to check the hat (up/dwn) buttons turns out it should be axis(10);

  	int hat = joystick1.getAxis(10);  // get hat - up/dwn buttons
 Serial.printf("HAT: %d\n", hat);
  	if ((hat >= 0) && (hat < 8)) g_buttons |= PS4_MAP_HAT_MAP[hat];

Doing all this so will be easier to convert commands we want to that base one which uses USB2. Basic stuff I am doing is mostly remembering what all the button values were that we had found so:

const static uint32_t PS4_BTNS[] = {
0x10, 0x40, 0x400, 0x20, 0x80, 0x800, //L1,L2,??? , R1, R2 ???
0x8, 0x1, 0x2, 0x4, //tri, square, cross, circle
0x1000, 0x200, 0x100, // PS, options, Share
0x10000, 0x40000, 0x80000, 0x20000 // HAT - up, down, left, right
};
const static uint32_t PS4_MAP_HAT_MAP[] = {
//0x10, 0x30, 0x20, 0x60, 0x40, 0xc0, 0x80, 0x90, 0x00 };
0x10000, 0x30000, 0x20000, 0x60000, 0x40000, 0xC0000, 0x80000, 0x90000, 0x0 };
//up, NE, right, SE, down, SW, left, NW, ???
Going to assume that 400 and 800 are L3 and R3 :slight_smile:

Ok back to other things now

@kurte - good morning.
Just pushed a changed to the LSS_PhoenixUSBJoystick sketch that fixes the HAT and updates the config file for Spidey. Seems to work just not sure I have everything configured correctly or its working the way it should with the servo commands getting sent.

What I was able to test:
TRI = Changing Walking Modes (Walk, Translate, Rotate, Simple) - for mine leg is acting strangely but I didn’t make any of the changes to the timing or the delay etc for the actual servo move. Maybe later I will check.
Options - select Gait type (“Ripple 12” “Tripod 8” “Tripple 12” “Tripple 16” “Wave 24” “Tripod 6” )
SQR = Balance Mode (not tested)
D-pad Dwn = Suppose to be sit but when I press it, my leg stands ??? Maybe config issue?
D-pad Up = you guessed it, Suppose to be Stand but my leg sits :slight_smile:
R2 = Double leg lift - that seems to work
Circle = switch between walk method 1 and 2 - not sure 100% this is working correctly. But seems to be working auto and using the left and right joy stick.
PS – ON/OFF - that works for sure.

NOTE: Not really sure what L1 is suppose to be doing or how it works???

Ok need more coffee

Good morning, So far no coffee


Great stuff, I synced up and will play with it real soon! Need to wake up a little more!

L1 is supposed to when held and used with some of the joysticks is supposed to adjust things like one axis should raise and lower the Hex. Another joystick axis, may adjust the speed of walking. Another axis at least in one code base awhile ago would try adjust the feet locations (i.e spread them out or bring them in closer to the body), but my guess is that some of this is completely out of whack. In that for example what is the range of the joysticks
 If not same then scaling will be different. Also timing. And again this was stuff I added in commander long ago.

Will be fun to play with. THANKS

Coffee is brewing
 First up I am still really curious about the timings stuff. So next up going to hack up the test sketch to maybe double the number of moves and shorten their distances, such that they should be well under the 60RPM (360 degrees per second) and see if the timings feel right.

And while at it, may hack up the Servo library some, to maybe add some support for shorter waits for responses.

Yeah I know - on the back of my mind as well. Since I finished with BT for awhile I just went back to the your modified testservo sketch to give it a try myself.

For a baseline I ran cmd = “i” with my 450ms delay just to see what I would get:

Cmd: i
Checks Status wait loops 1 in us: 2033
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(-900, 0, -899) T:6(-600, 0, -602)
Checks Status wait loops 214 in us: 189288
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(0, 0, -26) T:6(0, 0, 2)
Checks Status wait loops 40 in us: 49309
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(450, 0, 418) T:6(450, 0, 432)
get status for Tibia servo:6 for leg:3 failed on loop: 17
Checks Status wait loops 18 in us: 124774
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(0, 0, -3) T:6(0, 0, -4)
get status for Tibia servo:6 for leg:3 failed on loop: 39
Checks Status wait loops 115 in us: 207924
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(-900, 0, -871) T:6(-600, 0, -598)

Now if I run the same sketch with the delay commented out to match your test case:

Checks Status wait loops 1 in us: 3891
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 68) F:4(-900, 0, -341) T:6(-600, 0, -309)
Checks Status wait loops 1 in us: 3766
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 6) F:4(0, 0, -899) T:6(0, 0, -603)
get status for Tibia servo:6 for leg:3 failed on loop: 139
get status for Tibia servo:6 for leg:3 failed on loop: 330
Checks Status wait loops 402 in us: 493677
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 6, 6) F:4(450, 132, 409) T:6(450, 144, 420)
Checks Status wait loops 1 in us: 3753
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 6, 6) F:4(0, 132, 447) T:6(0, 144, 447)
get status for Tibia servo:6 for leg:3 failed on loop: 166
get status for Tibia servo:6 for leg:3 failed on loop: 527
Checks Status wait loops 528 in us: 582581
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 6, 6) F:4(-900, -165, -802) T:6(-600, -169, -609)

A couple things I am seeing without the delay.

  • status fails always on Servo 6 (tibia)
  • loop times are drastically higher with the delay (as to be expected)
  • the servo positions without the delay versus with the delay are different - the one with the delay is closer to what was requested I think


If I change the move time to 450, still seeing the same thing with the fails:

Cmd: i
Checks Status wait loops 922 in us: 665844
Print Servo Positions Joint(Goal, timed, end)
C:2(0, -1, 0) F:4(-900, -457, -785) T:6(-600, -352, -576)
Checks Status wait loops 1 in us: 3787
Print Servo Positions Joint(Goal, timed, end)
C:2(0, -1, 0) F:4(0, -457, -901) T:6(0, -352, -604)
get status for Tibia servo:6 for leg:3 failed on loop: 13
get status for Tibia servo:6 for leg:3 failed on loop: 423
Checks Status wait loops 566 in us: 609589
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(450, 318, 403) T:6(450, 339, 425)
Checks Status wait loops 1 in us: 4131
Print Servo Positions Joint(Goal, timed, end)
C:2(0, 0, 0) F:4(0, 318, 450) T:6(0, 339, 448)
get status for Tibia servo:6 for leg:3 failed on loop: 101
get status for Tibia servo:6 for leg:3 failed on loop: 349
get status for Tibia servo:6 for leg:3 failed on loop: 403
Checks Status wait loops 491 in us: 654801
Print Servo Positions Joint(Goal, timed, end)
C:2(0, -1, -1) F:4(-900, -465, -772) T:6(-600, -358, -573)

Ok need more coffee myself.

Morning, Yes the debug branch is not responding with the Real PS4
 So changed branch back to master to try out. Need to do more, but I thinking some of the clockwise versus not clockwise might be off

image

Think I might spend some time removing a few things from my Desk and Table :wink:

Now back to some other stuff

Oh - forgot. Think we better add in the configure servo function. I set it up with my servos already configured with the offset/gyre setup. So what I have in the sketch matches that - ok time to do a copy and paste.

@cyberpalin - I also should mention, that we could easily end up with a double negative.

That is if you look in the main sketch at the function: StartUpdateServos()

You will see that this code before it calls the Servo code it does the logical inversion: Note I edited out the #ifdef code


void StartUpdateServos()
{
    byte    LegIndex;

    // First call off to the init...
    g_ServoDriver.BeginServoUpdate();    // Start the update 

    for (LegIndex = 0; LegIndex < CNT_LEGS; LegIndex++) {
        g_ServoDriver.OutputServoInfoForLeg(LegIndex,
            cCoxaInv[LegIndex] ? -CoxaAngle1[LegIndex] : CoxaAngle1[LegIndex],
            cFemurInv[LegIndex] ? -FemurAngle1[LegIndex] : FemurAngle1[LegIndex],
            cTibiaInv[LegIndex] ? -TibiaAngle1[LegIndex] : TibiaAngle1[LegIndex]);
    }
}

So we have the choice of either doing here still or let the servos do it


I noticed that a while ago and asked the question on setting the inv in the config. Guess we are at that point.

Right now in the config I have the Right side set to 1’s for INV’s. To match what we have as a config - best guess at the time as I am still fiddling with the program. And likes like the leg lifts are wrong which corresponds to up and down issue I mentioned.

If I set them all to 0’s the leg lifts are correct so your presumption is correct.

I did just push a change to update the servo configs.

So I guess the question which way should we go. If we go with the software might be better. Don’t know enough to really guess on this one. Guess we can play.

EDIT: the one thing I didn’t see - at least not obvious to me was how to adjust in S/W the zero offsets? That’s probably why femur and tiba angles are off for zero position.

Side note on Servo Test Progam:

I added a couple of intermediary steps, such that in no step should we be asking the servos to move more than maybe 45 degrees in .25 seconds
 So they all should be well within Max Speed.

Note: First run I have it where I replaced all of the MoveT calls with Move calls
Actually this one run I had few calls fail


Cmd: i
Checks Status wait loops 1 in us: 15512
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-900, 0, -901)	T:5(-600, 0, -599)
C:13(0, 0, 0)	F:15(-900, 0, -899)	T:17(-600, 0, -597)
C:1(0, 0, 0)	F:9(-900, 0, -901)	T:11(-600, 0, -601)
C:2(0, 0, -2)	F:4(-900, 0, -899)	T:6(-600, 0, -600)
C:14(0, 0, -3)	F:16(-900, 0, -899)	T:18(-600, 0, -601)
C:2(0, 0, -2)	F:10(-900, 0, -900)	T:12(-600, 0, -599)
Checks Status wait loops 61 in us: 408830
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-450, -748, -481)	T:5(-300, -427, -289)
C:13(0, 0, 2)	F:15(-450, -727, -463)	T:17(-300, -452, -293)
C:1(0, 0, 0)	F:9(-450, -727, -471)	T:11(-300, -433, -292)
C:2(0, -1, -1)	F:4(-450, -713, -459)	T:6(-300, -416, -289)
C:14(0, -3, -3)	F:16(-450, -707, -452)	T:18(-300, -411, -292)
C:2(0, -2, -2)	F:10(-450, -717, -469)	T:12(-300, -389, -288)
get status for Tibia servo:17 for leg:1 failed on loop: 32
Checks Status wait loops 34 in us: 404811
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(0, -317, -68)	T:5(0, -150, 3)
C:13(0, 0, 0)	F:15(0, -302, -57)	T:17(0, -165, 2)
C:1(0, 0, 0)	F:9(0, -302, -59)	T:11(0, -141, 4)
C:2(0, -2, -1)	F:4(0, -287, -59)	T:6(0, -134, 2)
C:14(0, -3, -2)	F:16(0, -278, -42)	T:18(0, -127, 2)
C:2(0, -2, -1)	F:10(0, -275, -45)	T:12(0, -125, 3)
Checks Status wait loops 45 in us: 402365
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(450, 117, 367)	T:5(450, 140, 376)
C:13(0, 1, 2)	F:15(450, 153, 390)	T:17(450, 137, 379)
C:1(0, 0, 0)	F:9(450, 153, 386)	T:11(450, 149, 381)
C:2(0, -2, -2)	F:4(450, 163, 396)	T:6(450, 163, 388)
C:14(0, -2, -2)	F:16(450, 162, 396)	T:18(450, 166, 399)
C:2(0, -2, -1)	F:10(450, 169, 394)	T:12(450, 168, 394)
Checks Status wait loops 51 in us: 407499
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(0, 297, 37)	T:5(0, 277, 29)
C:13(0, 1, 1)	F:15(0, 281, 27)	T:17(0, 277, 29)
C:1(0, 0, 0)	F:9(0, 276, 24)	T:11(0, 277, 30)
C:2(0, -2, -3)	F:4(0, 277, 26)	T:6(0, 269, 23)
C:14(0, -3, -4)	F:16(0, 261, 18)	T:18(0, 271, 22)
C:2(0, -2, -2)	F:10(0, 263, 24)	T:12(0, 245, 5)
Checks Status wait loops 68 in us: 408522
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, -1)	F:3(-450, -129, -388)	T:5(-300, -156, -304)
C:13(0, 0, 1)	F:15(-450, -147, -390)	T:17(-300, -148, -303)
C:1(0, 0, 0)	F:9(-450, -152, -399)	T:11(-300, -148, -300)
C:2(0, -2, -2)	F:4(-450, -163, -408)	T:6(-300, -173, -303)
C:14(0, -3, -3)	F:16(-450, -178, -417)	T:18(-300, -181, -302)
C:2(0, -2, -2)	F:10(-450, -178, -413)	T:12(-300, -176, -300)
get status for Tibia servo:12 for leg:5 failed on loop: 26
Checks Status wait loops 48 in us: 409546
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-900, -709, -834)	T:5(-600, -555, -602)
C:13(0, 1, 1)	F:15(-900, -743, -851)	T:17(-600, -561, -603)
C:1(0, 0, 0)	F:9(-900, -742, -849)	T:11(-600, -565, -601)
C:2(0, -2, -2)	F:4(-900, -758, -859)	T:6(-600, -574, -604)
C:14(0, -3, -3)	F:16(-900, -767, -859)	T:18(-600, -579, -604)
C:2(0, -2, -2)	F:10(-900, -770, -864)	T:12(-600, -577, -6

Notice they all still took something over .4 seconds


Now to undo that part and do the timed moves to see if anything is different?
Maybe a little:

Cmd: i
Checks Status wait loops 1 in us: 15680
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-900, 0, -901)	T:5(-600, 0, -599)
C:13(0, 0, -1)	F:15(-900, 0, -902)	T:17(-600, 0, -602)
C:1(0, 0, 0)	F:9(-900, 0, -901)	T:11(-600, 0, -600)
C:2(0, 0, -2)	F:4(-900, 0, -902)	T:6(-600, 0, -597)
C:14(0, 0, -4)	F:16(-900, 0, -901)	T:18(-600, 0, -603)
C:2(0, 0, -2)	F:10(-900, 0, -902)	T:12(-600, 0, -599)
get status for Femur servo:16 for leg:4 failed on loop: 35
Checks Status wait loops 52 in us: 495515
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-450, -759, -484)	T:5(-300, -462, -291)
C:13(0, 0, -1)	F:15(-450, -751, -479)	T:17(-300, -464, -289)
C:1(0, 0, 0)	F:9(-450, -745, -474)	T:11(-300, -453, -291)
C:2(0, -2, -2)	F:4(-450, -717, -444)	T:6(-300, -496, -297)
C:14(0, -4, -3)	F:16(-450, -735, -462)	T:18(-300, -452, -291)
C:2(0, -2, -2)	F:10(-450, -715, -447)	T:12(-300, -447, -288)
get status for Tibia servo:5 for leg:0 failed on loop: 12
Checks Status wait loops 49 in us: 499530
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(0, -345, -68)	T:5(0, -200, 3)
C:13(0, 0, -1)	F:15(0, -336, -57)	T:17(0, -212, -7)
C:1(0, 0, 0)	F:9(0, -333, -56)	T:11(0, -191, 8)
C:2(0, -2, -2)	F:4(0, -308, -36)	T:6(0, -210, -4)
C:14(0, -4, -4)	F:16(0, -324, -42)	T:18(0, -191, 4)
C:2(0, -2, -2)	F:10(0, -303, -23)	T:12(0, -206, -5)
Checks Status wait loops 59 in us: 508629
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(450, 96, 391)	T:5(450, 110, 407)
C:13(0, -1, -1)	F:15(450, 110, 404)	T:17(450, 111, 415)
C:1(0, 0, 0)	F:9(450, 109, 404)	T:11(450, 128, 427)
C:2(0, -2, -2)	F:4(450, 129, 422)	T:6(450, 111, 413)
C:14(0, -4, -4)	F:16(450, 124, 420)	T:18(450, 125, 422)
C:2(0, -2, -1)	F:10(450, 134, 421)	T:12(450, 124, 420)
Checks Status wait loops 56 in us: 499656
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(0, 302, 33)	T:5(0, 297, 23)
C:13(0, -2, -1)	F:15(0, 284, 20)	T:17(0, 289, 18)
C:1(0, 0, 0)	F:9(0, 287, 18)	T:11(0, 279, 9)
C:2(0, -2, -2)	F:4(0, 279, 15)	T:6(0, 275, 8)
C:14(0, -4, -4)	F:16(0, 274, 4)	T:18(0, 285, 19)
C:2(0, -2, -2)	F:10(0, 270, 6)	T:12(0, 275, 5)
Checks Status wait loops 63 in us: 503455
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-450, -107, -386)	T:5(-300, -90, -292)
C:13(0, -1, -1)	F:15(-450, -117, -401)	T:17(-300, -90, -293)
C:1(0, 0, 0)	F:9(-450, -125, -406)	T:11(-300, -93, -296)
C:2(0, -2, -2)	F:4(-450, -126, -409)	T:6(-300, -111, -303)
C:14(0, -4, -4)	F:16(-450, -127, -415)	T:18(-300, -117, -305)
C:2(0, -2, -2)	F:10(-450, -150, -424)	T:12(-300, -112, -307)
get status for Femur servo:3 for leg:0 failed on loop: 19
Checks Status wait loops 51 in us: 508846
Print Servo Positions Joint(Goal, timed, end)
C:1(0, 0, 0)	F:3(-900, -568, -847)	T:5(-600, -404, -602)
C:13(0, -1, -1)	F:15(-900, -581, -870)	T:17(-600, -400, -602)
C:1(0, 0, 0)	F:9(-900, -577, -850)	T:11(-600, -405, -601)
C:2(0, -2, -2)	F:4(-900, -598, -869)	T:6(-600, -403, -599)
C:14(0, -4, -4)	F:16(-900, -599, -880)	T:18(-600, -415, -603)
C:2(0, -2, -2)	F:10(-900, -614, -882)	T:12(-600, -407, -605)

Still some more playing needed. Maybe I should check to see if there are any other example sketches that use the Timed modifiers and try to verify the timing? I don’t remember seeing any. Or wonder if better luck in calculating speed and using it?

Or in the end doing our own complete interpolation and bang out as many frames per second as we can do.

It would be interesting to see how these timings compare as to if I were to hook up an SSC-32. I am almost tempted to see if I can grab an SSC-32 and an RC servo and rig up test sketch that maybe runs one servo here and one LSS that maybe do simple sweep program or the like that moves the servos back and forth maybe over a arc like ±60 degrees at different speeds and different times and see how the two servos track each other.

@cbenson and @dialfonzo (and others) Do you already have a setup and sketch like this? I would imagine you had already done this as part of the Servo Beta? As something like that would help demonstrate to users how they can transition from SES 1 using SSC-32 to SES-2 using LSS?

Now back to playing

I was thinking about putting it into RC Mode and see how it works but that is would require much more it reworking the sketch.

Hard to know what things to do where
 If I look back at an old port for the Orion Robotics Servos. for example I see that I added at least one new define in the Hex_Cfg.h

//--------------------------------------------------------------------
//[MIN/MAX ANGLES] - We will let the Orion controller handle Min Max and servo inversions.
#define SERVOS_DO_MINMAX    // the servo controller will take care of this

And some initialization code (or configuration program) programmed the servos with their Min and Max range and as such the actual code no longer had to check.

So my guess is we can and maybe should? allow the servos to be defined that they do the invert. Likewise maybe Min/Max
 And as you mentioned probably the logical servo angle offsets.

Looks like I am about to have a delivery
 So I need to go and get ready for it.

I tried it and it is getting better:

Maybe hard to see with only one leg :smiley:

Will play again


But got to


Was debating about the min/max angles but they were already in the CFG so I didn’t worry about it. A config program is relatively easy we already the structure for it - easy enough to change the from setSession to back it permanent.

Definitely hard to tell if the changes really work with only one leg - just guessing for the most part. At least its looking good. Tried the gaits but don’t think they are working right. So not sure its a config issue or something else in the sketch.

Ok back to other diversions.

@cyberpalin forgot to mention when you hit the I think dpad up (could have been down) one set of servos going up and other going down
 As you might pickup in the photo.

But now busy with yard stuff

Actually missed that. Which way is right? maybe we need to Inv the left hand servos? See the drawback of not having a full setup - oh well. Can you give it a try

EDIT: Just tried reconfiguring for left front and seemed to be the same so it may be a configuration issue in the cfg file.

Just a follow up. Looking at your left side servos config:

{“Left Front”, {cLFCoxaPin, LSS_GyreCounterClockwise, 0, 600}, {cLFFemurPin, LSS_GyreClockwise, -104, 600}, {cLFTibiaPin, LSS_GyreClockwise, -137, 600}},
{“Left Middle”, {cLMCoxaPin, LSS_GyreCounterClockwise, 0, 600}, {cLMFemurPin, LSS_GyreClockwise, -104, 600}, {cLMTibiaPin, LSS_GyreClockwise, -137, 600}},
{“Left Rear”, {cLRCoxaPin, LSS_GyreCounterClockwise, 0, 600}, {cLRFemurPin, LSS_GyreClockwise, -104, 600}, {cLRTibiaPin, LSS_GyreClockwise, -137, 600}},

Have a couple of questions since I don’t have a setup for left side but:

  1. Shouldn’t the Left side CoxaPin’s be LSS_GyreClockWise instead of Counter clock wise
  2. Not sure but shouldn’t the left side offsets be positive the opposite of the right side.

Would start with fixing item 1 and then if not right change signs per item 2.

@cyberpalin (keep starting to type mjs
 :wink: )

Will take a look in the morning
 Right now trying to figure out why my SSC-32u is not wanting to power up, like I think it should
 I had one for no real reason. I still have the originals that I used earlier, but did not want to directly use as +5v ttl 
 Think maybe the 6v wallwart is not working
 will search for another