Notes for Phoenix code?

Update:

Installed eight new 645 servos and entered the offsets. Fresh battery.
No real change. Hard to tell if it is trying to walk forwards/backwards, or just moving the legs. Movements move on after controls are released. Still seems quite weak in the servos.

Alan KM6VV

Not getting consistent offset saves. I loose the last correction, sometimes I get a musical note, sometimes not, many times it freezes after the “Y” response…

Where are the offsets saved to? 368 chip or external EEPROM?

Found that 4DOF 'Quad. It’s by Jonny!

Well, however you include a youtube.

Topic is here:

4dof Quadruped robot (T-Hex type) AXIS (basically Phoenix BASIC code modified by Jonny).

lynxmotion.net/viewtopic.php?f=8&t=8065&p=80229&hilit=102_2448.jpg#p80229

I got sidetracked off that 'quad, and forgot all about it. Just tore apart the quad legs. It was to run on the Atom Pro processors in BASIC code, which I don’t really want to go back to…

I watched Jonny’s legs, and they alternate across the body, not rotate around the body as I’m seeing mine try to do. The video helps.

Alan KM6VV

The offsets are probably stored on in the Atmega (my guess). The code uses the R command to set them and I believe the R command worked on the old SSC-32 where the EEPROM was optional.

FYI - A few days ago, I merged back in some of my changes from the Phantom_Phoenix project back into the Quad support branch of the Arduino Phoenix Parts project up on github. While doing so, I edited the Readme some, to talk about some of the #define options as well as a little on the Terminal monitor.

Yep I remember Jonny doing work on a quad back then. Looking at the 4dof legs on it, the angles of the legs, where it could get the Tars to be vertical, probably helped in giving his robot stability, likewise with the 3dof legs on the PhantomX. As I mentioned I have not played much in awhile with my SES based quad. If I were to do so, I would probably get one of the new bodies, would also get away from the CHR-3 type of leg. I think the secret is to:

a) Start off with a design that is inherently stable. As I mentioned, much better luck with PhantomX. With it usually works well enough that a gait that lifts the two opposite legs at a time works well most of the time. There are at times issues, that you need to ramp up the speed. That is if you try to go to full speed from a stopped position, you may fall over…

b) As part of a) need to make sure where you put stuff, helps and not hurt. Example: you probably want your CG down low. So battery should not be up high. Also maybe issues with cameras…

c) Clever coding - Lean into first step, change your Center of gravity to be over the three legs on the ground, Carefully setup your walking gait. Do you have it where you choose the next leg, as to have the CG sort-of go around in an ellipse… Or do you try to alternate? Once you get moving, can you then switch to the gait that moves two legs at once and lean into the direction you are moving. As you slow down to a stop, you need to reduce/stop the leaning.

Should the walking gaits become more dynamic? Examples: should the step size stay constant or change? Should which leg moves next always be the same? Should positions of legs under the body be the same or change?

d) Sensors? - Can sensors help sense what is going on quick enough for us to compensate for in the code? This includes external sensors like accelerometers, gyros… But it might also include information from the servos. Example with servos like the Dynamixels, you can sense how much force a servo is putting out. Might be able to use this to detect a leg is about to lift…

Sorry that I am giving answers here. Lots of possible stuff to experiment with.

Kurt

That’s true, still not real obvious why I’m loosing offset settings.

I’ll look at it. I’ve already seen the new "leg functions in Phoenix.h, and read the Readme (what program reads a .MD file? I copied and pasted it into a word file. I like all of the descriptions of the #defines for the options. What has changed? I compare files with the Beyond Compare program.

You think a 'Quad walks better on tip toes? Why would the 3DOFA legs be inadequate? For CHR-3 legs do you mean :

That would move the CG up higher, I suspect.

That’s what the referenced code on the SQ3 catalog page should be. Someplace to start. I still wonder if maybe I’m not selecting (?) the right gait or something? The legs make their moves in “rotation” about the body, not as diagonals as I’ve mentioned and observed in other 'bots. So do I have the wrong gait?

I can see that; I think the stock SQ3 does that OK. I’ve left off the tilt/pan and camera for now, the legs look anemic as it is.

I’m a ways off from any “clever” coding. I just want a simple gait for now as I’ve seen others do.

More great ideas.

I do have accelerometers and gyros; and I’d love to employ them!

Sorry that you are giving answers??

Getting the Phoenix code ready for SQ3 and making notes will go a long way to the Quad’s acceptance.

Alan KM6VV

Alan KM6VV

Oops - I meant to say that I was sorry that I was not giving definitive answers here :blush:

Readme.md - Is in Mark down. I am not good at it yet, probably need to reedit it to handle better when I use # and the like. There are details up on the web like: help.github.com/articles/markdown-basics

With the PhantomX, they have a simpler code base (Pypose), which several people use up there with their Quads that they also use in robogames. You might want to take a look to see if it helps: trossenrobotics.com/p/Phanto … ruped.aspx

I agree, having a code base that makes the SQ3 walk well, out of box would be a great thing to help get more people interested. What is needed is someone to decide to take the project to the next level. For example suppose Lynxmotion decides that they want to develop a setup of the SQ3 to compete at the next Robogames or Mechwar games and starts working through the issues. Is the body the right shape? What do I need to change in the legs to add to the stability… What changes do I need to make to the code? … Once they figure out what works well they then need to get those changes migrated back into the actual product. If you remember correctly, a few years ago, this is what James and Jim were doing with the Brat (viewtopic.php?f=7&t=5224&hilit=mech+brat) During that time frame there were several people building Brats. I am not sure if any of them actually competed, but it sure did generate a lot of interest.

OK, thanks. I was able to copy/paste into a word document. PDF or Word documents would be useful (even text).

Is that Python? Of course I’m not using the AX-12 servos. I’d be happy to sell the two new ones that I have. How simpler?

There are a few items to resolve. How do we generate more interest in the SQ3? A contest?

People also need to know that the software posted is not useable yet. Or maybe I’m missing something. Can you identify the software change needed for the leg geometry? I know I asked about it before, but I’d like to see the change made. And I still suspect that the sequential vs. diagonal leg sequence must be a tip.

Thanks,

Alan KM6VV

Hi again Alan,

I am using Markdown on github, because that is what they recommend up there. It is straight text, so any text editor can read it. I normally edit it in Programmers Notepad (the editor that came with winavr. Later I updated it to a later version… It is real simple stuff. like you put ====== under a line to make it a top level header, you put ------ under it to make it a secondary level header… You you use your web browser to go up to the project, like to: github.com/KurtE/Arduino_Phoeni … ad-Support
And scroll down into the project, you will see the contents of the file README or README.MD (Preferred the MD) and it will be formatted. Also if you use the windows github program, and select a project, it should show the readme file as well. Some of the more recent versions of the program appear to have some issues with their caching of this file. So somtimes it works for me, and sometimes not…

Not sure if there are any decent preview programs you can use, but there are sites you can cut and paste your stuff into, to edit and to see the results, like: markdownlivepreview.com/

Their Pypose program is written using Python, but they generate a C program, that is very simple. You only have the use of their Arbotix controller. You have only a couple of gaits. You have no control of the height of the robot, it is simply set to whatever they wanted. But it walks… Note: With my merging in my Quad support branch (likewise my Phantom_Phoenix Project), I have converted the gaits to a data structure and then define a simple array for the default ones (different for quads vs hexs). I also allow you to define your own to either add to or replace the default ones. So I have a sample project with the PhantomX quad where I have defined add on gaits which I think match the ones in their Pypose version…

Also in my Quad support I was wanting to do a lot of experimenting so I added several features to it to help myself out. The ability to change the gaits was one of them. Some others include:
a) Not sure what the best angle between legs, so I have a way (at least in using the Arbotix controller), to change that while running. Hold down one button (L6 in this case) and then use the left joystick to adjust. I don’t think I have added any UI to the PS2 controller for this yet, but not hard to do…

b) Likewise should I move the legs in closer to the body or farther away. Again adjust the same way with a) but using the other axis of the joystick.

c) Trying to figure out what a decent gait would be. How many steps should there be in the gait. How much of the times should the legs be up in the air, on what step, should each of the legs be lifted. So I added a Gait command (g) in the terminal monitor, that allowed me to experiment and set these values and see how it works. I am not sure if I extended this command yet to modify the data associated with how Xan changed the Balance code. (Should the gait use the new or old balance? If new what percentage or when…)…

I know I should probably just break down and get the SQ3 body. lynxmotion.com/p-504-3dof-al … ervos.aspx . I am currently using 4 out of the 6 CHR-3 legs I had assembled for the old lexan CHR-3 body. I know I have some other brackets and the like, just not sure if enough.

Sort of a chicken and egg thing. The software was useable enough for them to make the video for the Servo Erector Set, with some very quick views of it. There have not been any other videos of it, nor any write ups about it, showing it’s capabilities or any publicity about it. Has it ever been mentioned on the top level Store web page? Maybe as part of the kit but as it’s own entity? If they want others to take it serious, they need to take it serious.

For example a good percentage of the people doing quad work up on Trossen are doing it with the idea of making a mech that they may to compete in Mechwar with. Most of the updates to their product has come from things that people learned as they built up their mechs.

So again if Lynxmotion wishes to compete for the people to buy their quads instead of ones from Trossen or elsewhere, then someone needs to start working on something like a Mech-SQ3. Would be great if it was someone at Lynxmotion, who regularly showed ideas that they have tried and progress and get inputs from people up here on other things to try. Or could be that they sponsor one or more people to do this. Preferably with the ability to potentially fabricate new parts. Things like:

a) What servos are needed? For sure the 422 and maybe the 645 are too weak to handle this. So I would start off with a minimum of 645s, but to compete you probably need stronger/faster ones. Maybe some servos that you can directly hook up to Lipos

b) Body shape and size. If you are neededing to mount a camera, gun(s), battery, … Is the size of the SQ3 correct? Or do you need to make it bigger?

c) Leg shape? Not sure what works best here. I know I have had good luck with the Trossen ones. Not very much luck with the Orion ones… So might need to experiment with Long Cs versus short C’s. Likewise straight versus offset… New brackets?

Again if someone was able to do this, and show a video of it moving around a stage, locating and finding targets and the like and show how you can do this with a cost that is significantly less than with other setups, I think you could get several people interested in this.

Not sure if this makes any sense?

What I really meant to say, was what is needed there is an advocate for these products in much the way that DiaLFonZo is for UAV’s :smiley:

Hi Kurt!

It didn’t look like straight text to me. I’m able to cut/paste.

Are you talking about programs or documentation? I like TextPad for programs, it knows about quite a few languages.

I noticed that you’ve add/changed the gait data structures. I haven’t tried to run it yet. Doesn’t look like I can use the leg-change.

That’s obviously a nice set of features for developing the best gait for an application.

Yes! The SQ3 body is cheap enough! I bought one. Yes there are a few seconds view of the SQ3 from a low angle, a few leg moves. I’ve tried to study it, but I can’t determine whether it is moving in the diagonal leg move, or the rotating leg move. Does seem to be up and close to square, and not “wimpy” like mine.

Maybe LM will front you one! LM has previously had a programmer on staff/contract, maybe they will hire you! (or even me, if I can ketch up). ;>)

Personally, I think that was too short a clip to determine how the SQ3 runs. OK for SES advert, but not enough to evaluate the SQ3’s walking ability. I agree on the write-ups. I video of how the controls work, and how to put it through it’s paces would be a good start.

I think LM needs to do more work on the video. I need a few 30 second+ runs to get the feel of it. I’m familiar with hexapods. I built one from scratch (LM brackets, my chassis and processor), employed my own C code written from old power pod examples, and it walks! That was a few years ago…

What walking modes are there? Am I in the wrong one?

I’m not thinking about Mech, but I did have plans to put a Hero 3+ camera on top. I’ve even designed a mounting hinge to conveniently mount the camera on top of new a tilt/pan made from LM parts (+ my part). Any interest in the mounting hinge part LM?

645’s have worked on the HEX. Maybe because there is a better servos to weight ratio. I should weigh the bots and figure it out.

After last night’s LiPo fun, I’m a little reluctant to go to them. My FireAnt has (had) one, and the higher voltage servos. Maybe I should just go buy a **Mantis **(Orion); after all, I named it!

Longer legs would reduce the torque, something I’m not willing to give up now, not without higher torque servos. An upright stance should reduce the torque requirements as well.

I can DO the target detect, capture it, and move it to a goal. I’ve done this with my table top robots, won first a silver and then a gold metal at Robogames. IR sensors for table, target and goal. See my ASB13 'bot:

lynxmotion.net/viewtopic.php?f=9&t=7018

Good ideas!

Alan KM6VV

Kurt,

Maybe you can tell me how to properly include a youtube video.

This quad shows a simple gait that the QS3 should be able to do:

LM: Can we get a demo of the QS3 doing this? (and the code for it) ;>)

Alan KM6VV

For Youtube, I find one that works, edit it (helps that I can edit most anything). Copy the actual stuff and then cut and paste it into my posting and then replace the strange looking number character string with the one from the one I am trying to post.
So from the one you have above (which I edited in put in a version that works.
You change what you had https://www.youtube.com/watch?v=lxIy3jYuQCo
to
{youtube}http://www.youtube.com/watch?v=lxIy3jYuQCo{/youtube}
Note: I replaced with { here so you can see how I changed it.

Kurt

Got it this time, thanks!

Alan KM6VV

FYI - I have an order in for the SQ3 body and a few other parts I needed to convert CHR type legs to SES type legs. So should receive them in maybe a week. Then will see when I get inspired to rebuild it… (Also looks like the order system changed so no longer have message with images it can not find)

Note: I am talking here about my updated Quad support code base with structure. It also somewhat applies to older code base, but instead of data structure it does code…
In my code the data structure has the format like:

//  Speed, Steps, Lifted, Front Down, Lifted Factor, Half Height, On Ground, 
//     Quad extra: COGAngleStart, COGAngleStep, CogRadius, COGCCW
//                      { RR,  RF, LR,  LF}
// Example:
    {DEFAULT_GAIT_SPEED, 16, 3, 2, 2, 12, 3, 2250, 3600/16, 30, true, {5, 9, 1, 13} GATENAME(s_szGN1)},            // Wave 16

Lots of this info is reasonably easy to understand:

  1. the speed (how long should each step take)
  2. how many logical steps are there in the gait. In this case 16.
  3. How many steps should each leg be lifted
  4. When the leg should be put back down (sort of lifted/2)
  5. When leg is up multiple steps, how high should it be lifted on the first step…
  6. How many steps is the foot on the ground
    (Quad extras - This is Xan’s stuff for shifting the balance around in an arc, with relationships of how far, what angle to start off with…
    Now the interesting thing about which legs move when. Simple at what step in the sequence does each foot lift, so this defines the order the feet move.
    In this case, you see it is: LR, RR, RF, LF

If you wish for a gait with different order like: LR, RF, LF, RR, just change these values around… But in that case the circular moving of the COG will not work, so in the Quad support section of the structure, change the TRUE to a FALSE…

Hope that helps
Kurt

Edit:
I’m working with your new build. At first it used my old library files. I then copied the new phoenix directory in.

My problem is now that after compiling QuadC (new phoenix directory), I run out of room for the code.

Thanks,

Alan KM6VV

That’s great to hear! Hopefully a a matching SQ3! Don’t know about the order system, I want to get the SQ3 working before I order anything else…

Nice system to to work on gaits! Can’t try it yet, need to get my compile working. I suspect it’s including an extra file it doesn’t need? That would make it run out of room.

Alan KM6VV

Also, maybe too much debug is turned on or too many options. Most of the times these days I am working with Atmega644p or Teensy 3.1 or … Which have more memory. May have to play some and remove stuff not needed. Things like GP mode.

Kurt

Looks like too many options.
I was able to turn off PS2 debug and SSC forwarder, and it compiled a few times. I dated the “arduino phoenix monitor 4/1/14” signon string, and then got the “sketch too big” message again. GP mode is off, as far as I know. I might build up another directory with all files needed, and not pull in the libraries. I’ve gotten weird errors to library directories that I shouldn’t be including, like phoenixXXX, where I’ve renamed the file to (supposedly) an unwanted name.

We need a Mega version of the BotBoarduino!

All the time I have for now.

Alan KM6VV

EDIT: also disabled option OPT_FIND_SERVO_OFFSETS, and it compiles again. But I NEED this!
Are your additions (not the struct) such that they could be controlled by an #define OPT_ ? Probably don’t need to “edit” the leg parms via terminal all the time.

Back before the Botboarduino was released, the plan at that time was for a Mega. But it was going to be a board and a shield. The board was going to be similar to the Seeeduino Mega, except that the board was going to be changed to be the Lynxmotion/Basic Micro form factor. But several things came up during that time frame, like the cost of producing both boards. After the Botboarduino was released, the Mega project was dropped as it did not add enough extra capabilities. At the time I think several of us were thinking of going to something more like the Due or the Chipkit. But that was before Lynxmotion became part of Robotshop. My guess is Robotshop as well as many others are also eying new platforms. The difficulty is deciding on one (or two).

My package of parts is scheduled to arrive today. Will probably rebuild soon. Again not sure what board I will use. Could use Botboarduino, but I do like having the extra capabilities of other boards (more Usarts, memory, …)

My guess is that the solution may be more to do with the actual balance and design and less to do with the order the legs move. But we will see. May take me awhile as there are several other projects that have more of my interest right now.

Yeah, several possible boards I suppose. A Mega would be useful, and could probably be fitted into the Botboarduino style layout. Would need to add a few more pins, I guess…

Christmas! Inspires me to get a new in-line hex chassis, and finish up a set of legs. I only have four 645 servos, so I’ll probably order two more and put them in the hips. But that can wait. I’ve been digging up Bot Board IIs. I have a couple that I probably won’t use again. It’s so nice to get more C into LM 'bots!

Do you have a video camera? I’m anxious to see how your 'bot walks.

Do you know about the HPP-21 servo programmer? Useful to position one or more servos at once. I set it to 1500, and have a simple way to set up the servos of a leg while building it.

Alan KM6VV