Botboard or PC?

Hello everyone,

I’ve been reading a lot on this form for the last couple of months but this is my first post.

About 3 months ago I was surfing the internet when Lynxmotion cached my eye. I just graduated in electrical engineering with a specialisation in software (C and C++) and was looking for some practical (embedded) programming applications as a new hobby. I’m currently working as a Software engineer (C#, dotNET) and the only thing that’s “moving” is data in and out a database and sometimes I miss the electrical part :wink:

After looking to all the great robots that Lynxmotion is offering I started looking at this form and I saw Zenta’s Phoenix… The looks and movements really blow my mind! Zenta, I hope you don’t mind but I’ve got nearly a copy of your Phoenix on my desk right now… :smiley:

Right now I have my project hooked up with a SSC-32 and Bot-board with BASIC Atom pro 28. What I want to do is get real time IK calculations so I can add sensors or a (Wii-) remote to it and let it change directions on the fly. Is it possible to get smooth (Zenta style :wink: ) moves on the fly using a Atom pro 28 or do I need to switch to a PC for al the calculations? I’m experienced with C# so programming on a pc would me a major issue but having my Hexapod stand alone without any need of a PC is also a cool thing.

The most of you properly have some experience with IK so please let me know what the best thing is for me!

Thanks! Xan

PS.: sry for my English… :unamused:

Hey Xan, I’ve just started the journey of doing IK calculations for the hexapod myself. My suggestion is to take a look at the powerpod program offered on lm’s .com site:

lynxmotion.com/Category.aspx?CategoryID=15

This program generates code for the BS2 to control the legs of the hexapods. I just used it last night to generate code and I’m in the process of deciphering what is actually doing.

I believe the PS2-controller section actually does the movement in real-time so that the moves can actually be interrupted during transit to switch to another mode…

Good luck! :smiley:

(Disclaimer, I don’t actually have a hex yet, just remembering things I have read)

I believe that the Power Pod program is forward kinematics, not inverse kinematics. Forward kinematics are very easy, and hence the board can do them.

I am looking at the same challenge too (I am putting together my hex to-buy list for when Jim releases the Phoenix kits). I also want my robot controlled by inverse kinematics. (actually, I want to look at making a cheap laser line scanner to generate a terrain map for the robot to walk in.)

I think personally, I have two choices:

  1. Run a heavy ‘embedded’ computer on the bot (something like the TS-7800 which will give me a full Linux distro, or
  2. Run a wireless link.

I think the wireless link might be the cheaper solution, so that is probably where I am going to end up myself.

Nah, the BASIC code generated by Power Pod for the hexapod robots IS IK. And the Atom is able to do them!

The “wireless” solution is a pretty good, low cost choice for starters. and it allows rapid program development without a lot of expensive tools.

Alan KM6VV

Inverse Kinematics means that I know a coordinate I want to place the foot, and that I calculate what leg angles need to do that.

Forward kinematics means I just tell the legs to go to some angles, and the foot happens to end up wherever it ends up.

So, if the code generated by PP is IK based, I should be able to say in serial “small object 1.5” ahead, 3" to the right of center, and 1" high, keep the front left foot on that object until told differently" ?

Does the SSC take care of all that, or will I need to add an Atom to the bot between the bot and the serial line reporting obstacles?

Hi,

Thanks for the reactions. I’ve noticed that PowerPod does some IK calculations but as far as i know only for 12 servo’s. My Hexapod has 18 servo’s so that makes IK a little bit more complex.

I read in the SSC manual that the walking gait only uses 3 tot 5 positions for one step. I need much smaler calculation steps for the smooth movements that i’m aiming at. I read something about IK calculations for every cm movement of the feet.

So that makes more servo’s and a higher refresh rate. I’m thinking more and more of dropping the botboard and add a bluesmirf and do al the calculating with a pc…

Or is it really possible to get all the calculations in the pro 28?

Xan

The powerpod program works with the CHR3 and the like robots from Lynxmotion. Each of the 6 legs have 3 servos (i.e. 18 servos). So that is not a problem.

I believe the SSC can do a lot more than that. I think you may be refering to tine 2DOF sequencer built into it. You can with the new SSC with an external EEPROM store much bigger sequences. There is a users manual up I believe under the SSC32 web page that talks about this new sequencer.

Ok, so I have a question still. You are referencing sequences. To me, it seems that a sequence implies non realtime control of leg position.

Is there a way that I can give the end effector a position and say “go to”?

There are probably others who can answer this far better than I can. The SSC32 general purpose sequencer is for canned moves. There are some controls that you can apply in real time, like the speed of the sequences or to stop or the like.

However as for the code the powerpod generates for the Atom. It generates the desired leg locations for each part of the move and then translates that into the appropriate IK stuff for each of the servos. The version of the code that is generated that allows the Hex to be controlled by a PS2 controller, has some buttons and the like on the PS2 defined to raise the body, lower the body, change the speed, change direction, rotation, etc and the IK stuff is calculated. I hope that helps

As for how to use the code. Probably the best thing to do is to run the powerpod and look at the generated code. If you work your way through the generated code. There is a commented out label H3. A ways down from there is a for loop (for index = 0 to 5) that probably has some of the code you are looking for… The author of this code (Laurent Gay) would be much better at describing it, I simply know enough to make it work when I translated it to run on the Atom Pro.

Good Luck

The SSC-32 with 2.01XE firmware has a built in 12 servo hexapod alternating tripod sequencer. It is a canned gait but you can adjust all of the parameters of the gait ((ride height, leg lift) which can effectively make 3 styles of leg X,Y motion) stride length) overall speed, and variable differential speed walking control. So with this you can easily make a 12 servo hexapod walk forward, backwards, and turn in place or gradually, at variable speed, with a handful of simple serial commands. This sequencer can be used in conjunction with any of the other servo channels, Speed, Timed, or servo group moves. Whew! 8)

The SSC-32 with any firmware with Bot Board and Basic Atom (soon to be Atom Pro). By taking advantage of the SSC-32’s group move function the Basic Atom code generates the IK for all 6 3DOF legs in real time to allow walking. This code allows the bot to walk in any direction (translation) turn in place (rotation) and it can do both at the same time, at variable rates. For now it is just the alternating tripod, but the new Pro version will allow many gaits. The current code also generates “body moves” which allows the robots body to be moved in real time through all of the available axis. The control of this gait engine can come from a PS2 game controller, a serial data connection, autonomous from written code (editing the main program). Other options for things like tibia angle and leg dimensions, as well as round or inline body styles can be selected. Also because this IK engine runs in real time it will be possible with the Atom Pro (more code room) to make the robot adapt to terrain. All that is necessary is the addition of ground contact sensors, or pressure sensors to the end of the feet. This will happen in '08! 8)

The SSC-32 with 2.01GP firmware has two independent Sequencer Engines, that can play stored sequences that are stored in the EEPROM. The PC software SEQ (Visual Sequencer) makes it easy to create the sequences, ad get them properly written to the EEPROM chip. You can play the sequences at variable speeds, and in either direction in real time. There is a limit to the number of steps, but it’s a lot. These two sequencer engines can run at the same time independent of each other. And the normal servo functionality is retained. 8)

The SSC-32 with any firmware with PC software RIOS can control a 3DOF planar arm with base and wrist rotate. The gripper is not considered an axis. This program has IK built in so you teach the arm by commanding the end of the gripper in X,Y,Z space. The gripper angle relative to the ground plane can be locked while moving or teaching the arm. The hierarchy of the command structure for RIOS is you create a Project, which contain Sequences, which contain Steps. The program allow the SSC-32’s inputs to effect the progress of the Project by use of common If Then, For Next, or Do While commands. Also with the addition of a pressure sensor or switch on the gripper fingers will allow the grippers force to be controlled. In addition to this, there is also gravity compensate, and even the ability to do do rudimentary 3D scanning of an object using the Sharp GP2D12 sensor added to the arm. 8)

The SSC-32 with any firmware with PC software SEQ (Visual Sequencer) allows the PC to store the positions. The limit of the number of Steps is well BIG. So you will never run out of space for your project. This setup is popular for use with wireless modes of data transmission.

The SSC-32 now has register support for servo offsets, initial servo position on power up, and the ability to issue a startup string. This is really cool because the offsets no longer need to be sent every time the robot is turned on. This simplifies the programming of the robots as well because effectively after calibrating the SSC-32 to the servos, sending 1500uS pulses sends all servos to EXACT centered position. This negates the need to have custom programs and will make sharing of programs, all programs, much easier, as long as the hardware is the same.

This is how we are currently using the SSC-32 in our products. Powerful features can add complexity to it’s use, but we have done our best to provide tools to simplify their use.

You are going to have to have really highly optimised code to be able to do all you want with an Atom Pro 28. Matt Dentons hexapod engine is running on a DSPIC which i believe is a fair bit more powerful…If you really want an on board controller i’d reccomend perhapse try a gumstix mini computer. Not too expensive, and they run flavours of Linux and windows and are tiny! Im considering getting one soon as the hassle of designing a highpowered controller board around a DSPIC and then programming it all in C…ergh!

Thats true, although for the sake of simplicity, a gumstix might be the best option…id always figured a dedicate MCU running the engine and PWM outputs was the best way to go, with all higher functions being run on another controller. Thats the way which Matt’s one works, but I dont know if everyone has the capabilities to design their own MCU and PWM distrabution board! The sooner the pBrain becomes available to purchase the better!

I managed to control one 3DoF leg with an arduino with a ATmega168 microcontroller. It didn’t lag a bit. What it does is that it converts 3 axis (x y and z) positions to angles on the servos, so theres a lot of trigonometric operations going on. I can imagine it actually won’t be a problem to control 6 legs. For now, the arduino is also controlling the PWM without hardware acceleration so that extra processing will be relieved.

The circular forms in this post should represent software generated circles. They are deformed due to poor calibration of the servos. They sure are smooth though!

Laurent does write highly optimised code. Note we are already doing everything listed except for the adapting to terrain. We are doing real time IK calculation for 6 3DOF legs, plus monitoring the PS2 game controller. And that’s with the Atom 28, not the pro. So I really don’t see the issue of reading 6 A to D’s and adjusting the height of the IK math for each leg.

We do…

Hi,

I’m sure that I will not be able to write such optimized code as some of you can but I’ve decided to stick with my botboard for now. I’ve already implemented IK for a single leg and it works fine! :smiley: I hope that it still can keep up if the full body IK and Gait.

Thanks for your reactions and advice!

Xan