Good morning all,
@zenta - Great to hear from you. As always I like your designs and the curved setup has a lot of appeal! Hope you will have some time to participate in this.
@cmackenzie and others - I have zero experience with these servos so there will for sure be a learning curve. Most everything I have done with servos for the last many years is using Dynamixel servos. Which run and on a half duplex serial, and typically I run at 1Mhz baud rate, but have experimented with 2mhz… Some of the controllers/servos go higher than this. So it will be interesting. Also will interesting to see how overlapped your Serial RX and TX be? And how much the data you will typically transfer.
Sorry if some of these ramblings don’t make sense. One (of many) thing I am unsure of is how much of the smarts of the motion will typically be done in the main processor RPI4, or how much will be in the Servo controller (Atmega 328) and how much if it will be handled directly by the servos? As an example the ROS Hexapod Stack I mentioned. If my memory is correct, it had a fixed sinusoidal walking gate, that it broke down into N parts. For each part of this, it then used the Kinematics to convert this into servo positions. The Driver code then converted the standard ROS coordinate units into Servo units. Then the whole timing of this was controlled by the max servo delta from the last position. That is it iterated moving each servo + or - one servo unit doing a complete servo group move output, until the last servo was it the new position… Which worked fine for the owner, but I always wanted to change it, as you could not change anything of the walking gate (like step height, length), without throwing their timings out the window… All of the odometry stuff for ROS was done by actually timing how long it took the hexapod to walk some fixed distance… Note this did not take advantage of any of the smarts that newer servos now have built into them.
At different times I was in the process of trying to change the Servo driver to be more deterministic. And work more like SSC-32 in that you pass in the new positions and how long you want this move to take and the servo driver code did the proper interpolation for all of the servos and reduced the issues involved of changing the walking gait. But I was pretty sure that these changes would not make it back into the official sources, so I sort of punted. Some of this is still up at: https://github.com/KurtE/hexapod_ros/tree/Servo_Driver_experiments
Again other code. As I mentioned I do/did have working Phoenix code base running on RPI, actually a few different versions. However I was always hoping that @zenta would have some more time and we could come up with a better version. My Floating point version still had issues, as my math skills are beyond rusty. I had a math minor when I received my BS in Computer Science, but now days I don’t remember anything, had to google just to do some simple things like how to rotate a clock hand around circle (Translate points by an angle)…
So again a question of how much of the simple interpolation stuff will be done on RPI or the Servos or the Atmega?
Note: The Linux (RPI) code base I have for Phoenix is mainly geared around the PhantomX using the Dynamixel Servos. As it looks like I have not touched most of this in at least 4 yours, I am pretty sure I have not updated this code yet to work with the Protocol 2 servos.
That is/was on my list of things to try for a newer PhantomX… But I dropped the ball on this after I had some minor health issues last year (Hernia surgery)…
Probably one of the first things I would like to do when I get a set of your servos is to do a quick and dirty version of the Phoenix code that works with your servos. Probably first would be to run some Arduino board (like a nice and shiny Teensy 4.1) to see how everything works.
Then try to migrate it toward RPI… Then ROS2… It will be very interesting to see what special features of a Hexapod integrate well with ROS2?
At least my impression of ROS was it was very much geared toward something like a ROVER, where you drove straight then turned and had no idea of walking sideways, or changing your configuration? Things like if you come to a door and your default configuration is such that you don’t fit, can you change the angle of the legs such that you are narrower and make it through… Or if there is a stick in your path, can you change your leg height to step over it.
Again maybe lots of stuff to experiment with. Hopefully ROS2 is setup to allow lots of newer things to happen.
Sorry again about this rambling