Gurus Complete Quad Madness

Hi Kurt,

Did you by chance put in a module for the BM_PS2 into the Phoenix code for the BM Quad?
Or have you compared the LM PS2 to the BM (Orion) PS2?

Alan KM6VV

Hi Alan,
Nope, I have not put in a module yet for the BM PS2, although it would not be difficult. It uses one IO pin and does simple serial IO. I keep meaning to get back to merging the code bases with the Orion version and the Phoenix version. The question I keep asking myself is where to put the functionality. That is you have an Atmega 328 (like botboarduino) that has a 32 bit processor like the Arc32 plugged into it. The obvious thing would simply use the Arc32 version of the code base and interface in the other Arduino 8 IO pins as inputs… But I do have a version of the Servo output code that simply uses the Orion like an SSC-32…

Kurt

Hi Kurt,

Now you’re confusing me. Doesn’t the Orion have an Atmega 328? And the Botboarduino also? ARC32 has what, Renisys running BMbasic?

Alan KM6VV

Sorry :laughing:

The Orion Robotics robots have their own Atmega 328 board called the DaVinci, which like the Botboarduino has the standard Arduino shield headers, but has the same form factor as the other boards like the BB2 or SSC-32. But instead of adding a bunch of extra servo headers and the like, they instead built 3 different Arduino shields. Their main shield is called the Orion. This shield has 32 servo like connections on it 24 of which are controlled by the Renesis H8 processor that is on the shield. This is the same processor that is on the Arc32.

The board and shield are setup such that you can reprogram either the Arduino or the H8 processor through the USB port. You program the DaVinci using the Arduino IDE and you use the Basic Micro IDE to program the Orion. By default they pre-load the Orion with a program that uses an SPI protocol to communicate between the two processors, plus they provide an Arduino library to talk to this. But you are free to roll your own if desired. I believe you can download the sources for both of these from their server.

Kurt

That’s right, the daVinci is the processor board. So Phoenix is divided into Basic and C versions, then all those choices of input and output.

What does the BM_PS2 use for serial?

Alan KM6VV

Just thought I would do a quick update here. From time to time I am still playing with the Quad code. My code base is up on github in my project:
github.com/KurtE/Arduino_Phoeni … ad-Support . More details of what I have been up to are up on my thread up on Trossens forum:
forums.trossenrobotics.com/showt … #post59293

Currently I have it working pretty well with the PhantomX Quad, as you can see in the video:

The code is setup to allow each robot to define their own gaits to add to or replace the default ones. The first three are ones that I borrowed from the Nuke based code. You hear a simple beep when I change walking gaits. Part way in you hear a double beep with the second beep being higher pitched, where I turned on Balance mode. With the first three gaits, it uses the old style gait engine which I had to fix for quads. I then asked for the next gait which is one that is defined in the code. It uses Xan’s Balance mode which rotates the balance point around a circle with the respect to which leg is being lifted.

At the start of the video, as I turn on the robot and instruct it to lift, it uses some code that was introduced awhile ago that automatically changes the legs positions on the ground depending on the height we asked for. I did this awhile ago for a Lynxmotion robot, who when the robot was sitting on the ground, you could not get the optimal leg positions for it to walk. Toward the end of the video, shows some newer stuff I am playing with that with holding the commander L6 button down and using the Right sticks horizontal direction, you can manually change the Initial XZ feet positions, which is sort-of fun. I don’t have any limits or the like built into the code yet. Could probably add some that detect when the leg positions are no longer obtainable and back off from there…

I am also playing with the Orion Robotics Mantis Quad, to see how well it runs using this code base. This is a bit interesting as I am telling the Orion shield (which is more or less an Arc32), to only move the each of the servos like an SSC-32) where other code base it does more of the work…

Kurt

Quick update, I have been playing around with the Orion Robotics Quad and it is starting to work better. Found an issue in the Phoenix code base with the length of the leg joints was causing an overflow, which I have fixed. Still needs more work and testing before I make a video. But updated Github with changes.

More details on Orion Robotics forum: forums.orionrobotics.com/post227.html#p227

Kurt

So how similar is the code for the SQ3 and the Mantis?

PS2 interface would be different, of course.
Servos are different, and Mantis has the same electronics as the Fire Ant?

I wish I had more time to work with the quads…

Alan KM6VV

The code should be reasonably similar…

The code up on the Lynxmotion Github was a snapshot of my quad branch of the code base that Xan did some enhancements to make it walk better. The code base was/is a WIP, there were lots of debug code still in it…

I have since that time merged back in the enhancements that Xan did to my main Quad fork. In some cases the code is directly brought in. In some other cases I choose to implement some of the features differently. I have fixed some things since then and have put in some enhancements, like the ability for individual robots to be able to define their own gaits. Also that the balance code for some gaits can use Xan’s balance code or the old balance code. These changes I used with the PhantomX quad to bring in the gaits that they define in Pypose. Also with the Arbotix Commander as an Input device I added the ability to change the leg positions. There already was code in place that allowed the legs to move in or out depending on the current BodyY… I used this code to allow me to use a button with a combination of one of the joystick directions to move the legs in or out. I am in the process of now adding that ability to the Basic Micro PS2 code so I can try out different starting positions for the Mantis. Will be easy to port that back into the other PS2 input device code.

As you mentioned the Basic Micro PS2 input code is very similar to the standard PS2 input code. The differences are in the lower level. Their receiver inputs and outputs serial data over one IO pin, where the Lynxmotion PS2 uses the 4 IO pins with a SPI like interface. Once we get the data the rest of the input code is about the same. Differences in method names as Nathan fixed all of their libraries to use standard Arduino naming conventions (lower case first character…).

The Servo Driver code is different. But again the Phoenix code is setup to say output these angles to these servos (in 10ths of a degree) for this leg. The SSC-32 version on some legs may have to invert the angles and then do the conversion to micro-seconds. Where in the Orion code base I have already told the system to invert some servos and the conversion factor from degrees to units, so I can simply pass the angle straight on through to the Orion to deal with…

Will this all work with the SQ3? It should (maybe). I do not have one to test it on, so can not say for sure. I do have one of their older Quad bodies, with CHR-3 type legs on it so the balancing would be different and the like and as such I have not tested on this for a long time. It would be great if someone at Lynxmotion would test it out on their hardware and make sure the current stuff is working at least as good as the stuff they have up on their github… If it works better they could then update their snapshot.

Now back to playing around. Actually probably back to playing with the ODriod U2 processor.

Kurt

It’s great that you can spend all this time working on the quads.

If you have a body, then it should be a simple matter to borrow some of the older 3DOF legs from one of your other 'bots.

I’m still working on getting my Robomagellan working…

Alan KM6VV

Thanks Alan,

Yep, I have been interested in the quads for awhile and so I have been spending some time with them to try to get the Phoenix Code base to work well with them. However there are other things right now that are more interesting to me so I mainly work on this in between things.

Actually I don’t think I have any robots right now with the legs like the SQ3 nor the body. I have the Phoenix with Phoenix legs. I have the original CHR3 type robot, which is actually now THex 4DOF legs, I have the T-Hex with T-Hex legs, so I build up my earlier quad with the parts I had from converting the earlier CHR-3 to the T-Hex legs… Obviously I could grab enough parts out of these to create 4 of these legs… But right now I have plenty of other things to do :smiley:

Yeah, I hate to take my 'bots apart, I usually just buy more parts. And there are a LOT of ways to put a 3DOF leg together, let alone a 4DOF!

There are several 3DOF leg designs. I had a couple of sets built up, but none matched the latest build82b.

Alan KM6VV