Lynxmotion SES V2 Hexapod Robot

@cbenson @dialfonzo @cyberpalin - and all.

I pushed up an updated version of my Walk and Chew gum sketch…

It puts a gap in after searching for servos, setting up the slots and Gyre… Yes could only do this once, but most passes more than one servo end up in error states…

Also put in some code that tries to show some validation of data. Not 100% correct
but it also toggles IO pins.
IO 2 - for stuff reading in string, like characters received before *. Is there a number after the star…

IO 3 - is trying to extract the CMD and number off of the string. Is there a valid command. Like < 10 characters before a number… Then checks to see if a number after this… Probably bugs in this… but does give you cluses.
Then IO4 looks at the command string is it one of the two we asked for…

But does give you clues…

Showing multiple loops through:

Note: not everything shown as error is an error. Some of the RED lines is it is timing out as thought I would receive more responses, and timed out… Could increase this time in my code, but again just hopefully giving you some feedback that you can run locally and see if it is repeatable and if your firmware developer needs to make fixes…

Closer in one loop:

Again one interesting thing is each time you see a shorter output on top blue line, the next group will be bad.
Closeup:

Unless someone has some suggestions, I believe this is about all can do at this point.

Hi KurtE - We have a theory that i tested here.
Making more Query at the same time allows more time for the reply per servos, can you test that out ? (adding more queries)

Here at 921 600 and using your example but added two more queries:

1 Like

Thanks @dialfonzo (and @cbenson ) for trying it out. Will try your change at some point, right now working on other projects, like working extending the File System support on Teensy (FS/File classes) to support Dates and Times…

In cases like this, I keep asking myself what is the proper goal when you find what appears to be a repeatable issue. Often times my answer will be different depending on things like. Is my goal to get the get the project done, or is it to try to solve the problem. Often times it is somewhere in between.

For me, as I have nothing pressing for me to release something, my instinct is to leave the example in a state that the firmware developer can hopefully identify the issue and hopefully find a proper fix. Yes maybe you can add additional stuff to the query and maybe mask the issue, maybe happen with 4 items queried, by may with 5 or … But gut tells me, it may depend on what other things are going on within the Servo firmware at the same time.

And maybe there should be several more examples like this, to test, like convert this slot type requests into a long query string and see if that makes a difference…

But the real question I have to ask myself, how much does the changes in this firmware release apply to what I was trying to do, and as such how much time to spend on it.

That is the main parts of the Hexapod code dealing with servos, is probably 90+% writes and a few percentages doing query.

The one part that I set that applies is that the Servo position (degree) command we should be able to start all of the servos at the same time… I have not verified this yet.

For me, I still have two fundamental issues, which this release does not appear to address at all:

a) Reliable communications: The test sketch is sending out move commands twice per second and it usually does not take more than a few iterations before one or more servos obviously moves wrong. Note this is repeatable without the query involved as well.

This is saying either:

  1. The data is being corrupted, probably due to longer distances, voltage changes, EMI, …
  2. The servo just screws up and maybe forgets something like Gyre or offset or …
    I am guessing 1)

b) EM=1 is not usable for most programs that do any multiple step moves… i.e. the start, coast, stop behavior of each command, there was some interesting posts on this thread about it, but so far it sounds like no changes to address this have been made.

So that leaves us still needing to use EM=0 mode. Which I find frustrating that in this mode if I tell a servo to some position, it may or may not. You may have to tell it something like 3-4 times to actually go there before it believes you…Personally I don’t understand the reason for this, unless it has to do with a workaround for unreliable communications?

So then if your code needs to output 50+ moves per second, which implies a 20ms cycle, how much data can you query during each cycle, or does it make sense to allow the query to span multiple servo cycles…

Kurt

This becomes the priority.

1 Like

Our firmware guru(s) are looking into finding and correcting the issue. More to come.

The new group command is working awesome! I can push the limit to 100Hz control loop with 18 servos!! I am querying position, current (amps) and velocity (PCV), and then sending position. On the humanoid I had to split the 18 servos across 3 separate buses just to get near 30Hz so big improvement!

Here is a logic capture zoomed out with ~11 loop iterations. I am using group command and SLOT timing. The top blue is the PCV query, each red block is all 18 servos responding in sequence.

Here is a zoomed in view of one loop iteration. You can see one blue block which is requesting PCV using #254QD0QC0QS and then another command afterwards setting each servo to Limp (but could be a target position). You then see each servo responding in the red blocks below in their respective slot.

I’m not getting any errors event at 100Hz but I’ve since backed down to 50Hz just because I dont need that high an update rate. I rewrote the Ros2 controls plugin which is why this took so long. Since the servos are doing all the work of timing replies all the complexity of my LSS library is gone (trying to get fast updates) so my cpu usage on the ros2 controls plugin dropped from about 40% down to 1%. Now I just set a 50 or 100Hz timer in software, each tick I send the broadcast and action and read the serial buffers for the previous reply results.

This is on a new firmware release with a fix that was causing some servos to reply to late but it seems stable now.

I’m updating some of my other Ros nodes so hoping to have some actual video to show this week.

3 Likes

That seems to be great news! Really appreciate the thorough testing! We’ve been trying to replicate on our end and suspect that the older generation servos may be causing our issue.

I have the robot moving through direct manipulation of the limbs and base in RViz2, and I have it working with trajectories as well. So I am working in python now to compute walking algorithms and send them to the robot like Trajectory Builder does in this video.

4 Likes

@cmackenzie Excellent to see an update here! Guessing you’ve already informed @madmax ? If not…
Very nice model - looks like the real thing, and don’t see any / much lag between the virtual model and the real robot.
So as you said at the end of the video… on to the walking?

1 Like

Fantastic!! That is amazing… super cool ! I have the c code for walking @cmackenzie that I had used on mine. I am very much tempted to see if that can be ported. I will message you regarding this. I think we should have a catch up soon.

1 Like

a06fe237110e6da70fefe36b99f3c681

@kurte - Ok i know what i did wrong that that time. Last Friday i had another modification to do and update on Arduino library manager. Seems like the last time i didn’t updated the tag inside the library so it was not picked up.

It is now, as well as my change.

Sure is quiet up here ( :cricket:)

I hope everyone is doing well and that you all have a nice (safe) Holidays!

2 Likes

@kurte - It is certainly quite here.

Hope you are all safe and with that new Variant around… stay safe.

2 Likes

Ditto - happy holidays and stay safe :slight_smile:

3 Likes

Hello All,

Hope everyone is keeping safe. Wishing you all a very happy new year!!

3 Likes

Happy Holidays & New Year! @cmackenzie has been advancing with ROS 2 and has/will involve @madmax. The latest firmware update (under Experimental) seems to be working well. Hopefully video updates will be posted soon.

1 Like

A lot of code changes lately and the walking is looking much smoother! Yes, smooth but slow…I’ll turn the speed up soon enough.

3 Likes

Happy New Year all, hope you are all doing well and healthy.

Any updates on this?

Was a guru able to fix the packet reliability issue?

Nice work on the ROS2 stuff.

Are you using any of the timed moves and the like or are you sending out servo packets as fast as possible?

Again happy new year.

@cmackenzie is looking for opinions / ideas about control options using the Radiolink RC remote.

Brainstorming (so feel free to suggest alternatives and give ideas / insights etc.):

Nomenclature

  • Throttle (THR): Left joystick up/down (analog) - spring recenter
  • Rudder (RUD): Left joystick left/right (analog)
  • Aileron (AIL): right joystick left/right (analog)
  • Elevator (ELE): right joystick up/down (analog)
  • Three way switch (3WL) (left)
  • Three way switch (3WR) (right)
  • Toggle switch (TSL) (left)
  • Push Button (PBR) (right)

RC

  • THR: Forward/Backward (ideally mixed with RUD and proportional)
  • RUD: Rotate CW/CCW (ideally mixed with THR and proportional)
  • AIL: Body roll
  • ELE: Body pitch
  • 3WL: Future use (ex. 3 positions for body height)
  • 3WR: Future use (ex change walking gait tripod / adaptive / ripple)
  • TSL: Future use (ex. Reset position / home)
  • PBR: Future use (ex. enable terrain adaptation)

Computer

  • THR: Keypad W, S or Numeric keypad 8, 2 (not proportional)
  • RUD: Keypad A, D or Numeric keypad 4, 6 (not proportional)
  • AIL: Keypad arrows up/down or Numeric keypad 7, 9 (not proportional)
  • ELE: Keypad arrows left/right or Numeric keypad 1, 3 (not proportional)
  • 3WL: Future use (walking gait tripod / adaptive / ripple)
  • 3WR: Future use
  • TSL: Number 5
  • PBR: Future use (ex. enable terrain adaptation)

We don’t need to use all joysticks / switches.

PS2 Reference with Phoenix code (if it helps):

image