Putting robotics at your service™

Free shipping on orders over $200

Programming my Hexapod

Print view Share :
Previous topicNext topic

Page 1 of 2 [ 21 posts ]

1, 2
Rookie ( offline )
Posts: 31
Posted: 2011-02-16 09:33 
 Post subject: Programming my Hexapod
Hi all, So i have my hexapod built, its a custom design, rectangular in shape with three legs on each side. I have been following the Phoenix assembly tutrorials all along and I have completed whats in them except step 18 (see below). I didn't download the program because this i presume is a program specifically for Phoenix.

Step 18. Download the Program
Download the .zip file, and unzip it. Open the .prj file in Studio (File->Open->*.prj), and verify that the files listed in the Workspace are in the order shown in Table 18. Program the Atom Pro. Install the PS2 controller receiver into the PS2 cable on the robot, and apply power. If all is well, you will hear a beep after power up. Press Start and the legs should snap to position. At this point, if you properly calibrated the servo offsets, the legs should be perfectly aligned. Remove power to the robot.

My question is how do I start to create my program? I purchased the Lynxmotion visual sequencer software when I was buying the SSC32, BBII and BAP28, I don't know if I need it or not. I also have the Basic Micro Studio software. How do I start to create programs for my Hexapod?

Thanks for your help.


User avatar
Guru ( offline )
Posts: 3298
Posted: 2011-02-16 10:30 
you can download powerpod. this program allows you to create hexapod code for the round chassis hex and also "Inline"
http://www.lynxmotion.com/p-566-free-do ... erpod.aspx

you can also edit the .cfg file of the phoenix code so it knows your legs are inline, and not round.

_________________
Jonny Poole,
Freelance Concept Art & Animatronics, 3D Art and 3D Modelling, as well as Physical Modelling, Mechanical design, and illustration.
http://www.innerbreed.co.uk
Create, Innovate, Inspire.


Rookie ( offline )
Posts: 31
Posted: 2011-02-16 17:10 
Thanks innerbreed. I downloaded Powerpod and I worked my way through it using the manual. I got as far as step 7 and I can't seem to find anything to open the window which is shown in step 7 (attached below)

innerbreed wrote:
you can also edit the .cfg file of the phoenix code so it knows your legs are inline, and not round.

I thought phoenix was an inline robot.

I did try to program the phoenix code onto my BAP28 using Basic micro studio but i kept on getting errors. (attached below)

Thanks again.


Attachment:
powerpod.JPG
powerpod.JPG [ 82.47 KiB | Viewed 2715 times ]


Last edited by mark11original on 2011-02-18 07:17, edited 1 time in total.
User avatar
Guru ( offline )
Posts: 9258
Posted: 2011-02-16 18:04 
The page in step 7 is for controlling the robot from a PC. It's a stand-alone exe program in the Powerpod download. Most people use the PS2 control method. Isn't that what you want?

Phoenix is not an inline robot. The legs are separated by 60 degrees.

The Phoenix code must be opened as a project, not as a basic program.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


Rookie ( offline )
Posts: 31
Posted: 2011-02-16 18:44 
Thanks Jim, ya I want to control my Hexapod with the PS2 controller, I have the lynxmotion controller. I can't find the stand alone exe file (or maybe I don't need powerpod) To be honest I am unsure what to do now. I have everything assembled, tested and servos offsets done. I am ready for programming only I don't know where to start.

I have the PEP and manual downloaded also. I have the Lynxmotion visual sequencer software as well. I just don't know what I should be using.

I think I was opening the Phoenix code as a project, it is a .prj file The reason I was trying to program this to my hexapod was just to see how it reacted.

Can you please advise me on where/how to get started on a program? I have added a picture of my hexapod also (wires etc will be tidied up later)


Attachment:
IMG_0183.JPG
IMG_0183.JPG [ 156.58 KiB | Viewed 2698 times ]
Attachment:
Phoenix code.JPG
Phoenix code.JPG [ 70.46 KiB | Viewed 2698 times ]
User avatar
Guru ( offline )
Posts: 9258
Posted: 2011-02-16 19:12 
If your servos are at center in the photo then you should use powerpod to build a basic atom pro program as an inline robot. It's not a true inline robot, but powerpod code cheats on the rotation anyway so it should work just fine.

If you use the Phoenix code then just realign the servos as if it were a phoenix.

Either way we have detailed tutorials on each method. You should follow the tutorials and stop when you have a question. For example no where in The Complete H3/H3-R Tutorial v2.0 http://www.lynxmotion.com/images/html/build99c.htm does it mention using the Serial Port Control Panel cause it's not used for PS2 control. The Serial Port Control Panel has been in the powerpod download since the first V1.00 version was released. But you don't need it so forget about it. You need to work from the tutorials, not from the users manuals.

The PEP is complicated, and not really necessary to tackle at this time. Maybe later... We already have code for PS2 walking control.

I'm not sure what the errors are in your above post. Hopefully someone can help you with that.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Guru ( offline )
Posts: 1898
Posted: 2011-02-16 19:17 
Wow... That's a realy cool frame and legs desing... !!

Waiting a video soon ?

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Rookie ( offline )
Posts: 31
Posted: 2011-02-16 20:26 
Thanks DiaLFonZo. :D My design was inspired by many other hexapods on this site and others. I'll get a video of it as soon as I get it working, can't wait to have it working! What way did you program yours (the one in picture under your name). I just started using the PEP, entering values etc


User avatar
Veteran ( offline )
Posts: 205
Posted: 2011-02-16 23:06 
As Jim pointed out above, go to this address and follow the instruction and you will have your bot walking in no time.


http://www.lynxmotion.com/images/html/build159.htm

_________________
I'm still all HEXY even without a flashy banner.......


User avatar
Guru ( offline )
Posts: 1898
Posted: 2011-02-16 23:35 
Like everyone say follow the link... !

Mine is a 4legs design... so i have to tweak a bit.

the thread:
http://www.lynxmotion.net/viewtopic.php?f=8&t=6951

Everyone here in the Forum have give me precious information to do it. I am in learning process too..!

Good luck !

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Rookie ( offline )
Posts: 31
Posted: 2011-02-18 07:37 
Thanks everyone, I followed the tutorial very closely and I got there. I got passed the error code problem which I was getting on Phoenix_V20 line 1071, I found out how to do this on this link http://www.lynxmotion.net/viewtopic.php?f=13&t=7021&p=69042&hilit=line+1071#p69042
Its great to have the program running on the BAP28 :)
Since my Hexapod is a custom design I presume I will have to change some values within the code like lengths of tibia and femur, body dimensions, min and max positions of the servos. Would I be correct on saying this? and is it just simply changing the values in the Phoenix_cfg.bas


User avatar
Guru ( offline )
Posts: 1898
Posted: 2011-02-18 08:18 
mark11original wrote:
Thanks everyone, I followed the tutorial very closely and I got there. I got passed the error code problem which I was getting on Phoenix_V20 line 1071, I found out how to do this on this link http://www.lynxmotion.net/viewtopic.php?f=13&t=7021&p=69042&hilit=line+1071#p69042
Its great to have the program running on the BAP28 :)
Since my Hexapod is a custom design I presume I will have to change some values within the code like lengths of tibia and femur, body dimensions, min and max positions of the servos. Would I be correct on saying this? and is it just simply changing the values in the Phoenix_cfg.bas


I will let other more experienced people answer you on that. But my answer would be Yes.

Code:
;[BODY DIMENSIONS]
cCoxaLength     con 29      ;Length of the Coxa [mm]
cFemurLength    con 76      ;Length of the Femur [mm]
cTibiaLength    con 106      ;Lenght of the Tibia [mm]

cRRCoxaAngle1    con -600   ;Default Coxa setup angle, decimals = 1
cRMCoxaAngle1    con 0      ;Default Coxa setup angle, decimals = 1
cRFCoxaAngle1    con 600      ;Default Coxa setup angle, decimals = 1
cLRCoxaAngle1    con -600   ;Default Coxa setup angle, decimals = 1
cLMCoxaAngle1    con 0      ;Default Coxa setup angle, decimals = 1
cLFCoxaAngle1    con 600      ;Default Coxa setup angle, decimals = 1

cRROffsetX       con -43      ;Distance X from center of the body to the Right Rear coxa
cRROffsetZ       con 82      ;Distance Z from center of the body to the Right Rear coxa
cRMOffsetX       con -63      ;Distance X from center of the body to the Right Middle coxa
cRMOffsetZ       con 0      ;Distance Z from center of the body to the Right Middle coxa
cRFOffsetX       con -43      ;Distance X from center of the body to the Right Front coxa
cRFOffsetZ       con -82      ;Distance Z from center of the body to the Right Front coxa

cLROffsetX       con 43      ;Distance X from center of the body to the Left Rear coxa
cLROffsetZ       con 82      ;Distance Z from center of the body to the Left Rear coxa
cLMOffsetX       con 63      ;Distance X from center of the body to the Left Middle coxa
cLMOffsetZ       con 0      ;Distance Z from center of the body to the Left Middle coxa
cLFOffsetX       con 43      ;Distance X from center of the body to the Left Front coxa
cLFOffsetZ       con -82      ;Distance Z from center of the body to the Left Front coxa


that's what you need to change

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Rookie ( offline )
Posts: 31
Posted: 2011-03-28 18:03 
Hi all,
It has been a while since I was here, I was busy applying finishing touches to my Hexapod. So I have it fully assembled at present with the phoenix code on it. I have changed the values of the lengths of the legs within the .cfg file I still have to change the Min/Max angles and offset angles.

My question is what does the "c" stand for before each word e.g. cRRTibiaMax1 con 770 and what does the "con" stand for? Also in the example Ive given why is the angle -770. Does this mean 77?

When I am calculating my min/max angles should I do this in Lyxnterm?

Also my hexapod has its legs in line and it is walking pretty good with the pheonix code at present but to change the code to for an inline body is it just a matter of changing the set up angle which is currently -600 to 0 for the four Coxas which are positioned at the corners of the hexapod?

Sorry for all the questions and thanks for your help in advance.

cRRCoxaAngle1 con -600 ;Default Coxa setup angle, decimals = 1
cRMCoxaAngle1 con 0 ;Default Coxa setup angle, decimals = 1
cRFCoxaAngle1 con 600 ;Default Coxa setup angle, decimals = 1
cLRCoxaAngle1 con -600 ;Default Coxa setup angle, decimals = 1
cLMCoxaAngle1 con 0 ;Default Coxa setup angle, decimals = 1
cLFCoxaAngle1 con 600 ;Default Coxa setup angle, decimals = 1


User avatar
Guru ( offline )
Posts: 2120
Posted: 2011-03-29 04:37 
mark11original wrote:
My question is what does the "c" stand for before each word e.g. cRRTibiaMax1 con 770 and what does the "con" stand for? Also in the example Ive given why is the angle -770. Does this mean 77?

The "c" stand for constant, the con declare the constant. Xan uses fixed point calcs for better angle resolution. -770 means -77,0 deg.

mark11original wrote:
When I am calculating my min/max angles should I do this in Lyxnterm?

No. The min/max angles are simply mechanical limits, you set them by measuring the min/max mechanical travel range for each joint.

mark11original wrote:
Also my hexapod has its legs in line and it is walking pretty good with the pheonix code at present but to change the code to for an inline body is it just a matter of changing the set up angle which is currently -600 to 0 for the four Coxas which are positioned at the corners of the hexapod?

Sorry for all the questions and thanks for your help in advance.

cRRCoxaAngle1 con -600 ;Default Coxa setup angle, decimals = 1
cRMCoxaAngle1 con 0 ;Default Coxa setup angle, decimals = 1
cRFCoxaAngle1 con 600 ;Default Coxa setup angle, decimals = 1
cLRCoxaAngle1 con -600 ;Default Coxa setup angle, decimals = 1
cLMCoxaAngle1 con 0 ;Default Coxa setup angle, decimals = 1
cLFCoxaAngle1 con 600 ;Default Coxa setup angle, decimals = 1


The +/- 600 (60 deg) should be equally to the calibrated centered position for each coxa. If all coxas are calibrated with the centered position like the picture you posted above, all angles should be 0. Take a look at the 4 DOF T-Hex tutorial step 6 and 10, thats an example of how the coxa are calibrated with the centered position (for the 4 outer coxa) at a 45 deg coxa angle (450).

I hope this helps.

_________________
Kåre Halvorsen, Zenta
-----------------------------------------
Zenta's blog
http://zentasrobots.com/
Zenta's YouTube channel
http://www.youtube.com/ZentaOlbaid
-----------------------------------------


User avatar
Veteran ( offline )
Posts: 158
Posted: 2011-03-29 08:03 
poor Zenta, he has to explain this too every noob ... :P
(including me) :oops:

_________________
PS
As i am Swedish, you may laugh at my spelling and grammar, but please please don’t comment it if you understand what i mean
DS


1, 2

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-16 03:24
Feedback Form
Feedback Form