Lynxmotion Tech Support

www.lynxmotion.com
Join the Accelerator Program
It is currently Wed Jun 19, 2013 2:27 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Problem with apod code
PostPosted: Fri Mar 30, 2012 12:05 pm 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
Hello,
I've downloaded and unzip the apod zip file.
Opned in Studio project file and verified that the order of the files in the workspace is like showed in the table 16 ...connected the receiver and turned on the ps2 controller...
But when i program the atom pro i hear a beep when starting to program ..
In the build space is write so:
Preparing files...
D:/HEXAPOD/APOD/PHOENIX_CONFIG_3DOFAPOD.BAS
D:/HEXAPOD/APOD/PHOENIX_CONTROL_PS2.BAS
D:/HEXAPOD/APOD/PHOENIX_CORE.BAS
D:/HEXAPOD/APOD/PHOENIX_DRIVER_SSC32.BAS
compiling...
Error:D:/HEXAPOD/APOD/PHOENIX_CONTROL_PS2.BAS(LINE 148) : [TOKEN )] : Unexpected token type
Error Detected

Where I wrong?
When i use the ps2 controller I can hear all beeps when i push bottons but the bot doesn't move:-(
Can sameone help me?
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 16. Install the PS2 controller receiver into the PS2 cable on the robot, make sure your PS2 controller is turned on, and then apply power to the robot. Program the Atom Pro. 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.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 12:17 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4423
Not sure. I just downloaded the zip file and loaded the project file and did a Build and it worked for me...

What version of the Basic Micro IDE are you using?
Do you have it set to BasicAtomPro and then BAP 28?

Does line 148 look like:
Code:
   TorqueLevel = (cMandibleFSRminTorque + (TorqueSelect(TorqueIndex)*cTorqueMultiFactor2)/c2DEC) ;Middle torque value (128)


??? Kurt

Note: I am running build 2.0.0.16 of the IDE


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 1:30 pm 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
Hi kurte,
I'm using ide version 2.0.0.15.......i see only that version on the link:-(
I have setted basic atom pro...but then not the bat 28...mmmm...maybe is that my wrong??
:-(


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 2:17 pm 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
I've setted bap28...but it still doesn't work!
I notice that if i open the prj and i see the order of the files..that is different from what is write in tables...
If i leave that files in the origin order ide start to program the atom and when all is writed i hear the beep sound of good operation....I can move the bot but not in the right way...it doesn't responde right to my command:-(
If I put the files in the order like in the Tables in the built compare the error that i sayed..
Where i wrong?


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 5:49 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4423
It needs to be in the order (config, core, control, driver_scc)

Kurt


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 8:27 pm 
Offline
Robot Guru
User avatar

Joined: Wed Feb 27, 2008 8:59 am
Posts: 3186
Location: Online @ innerbreed.co.uk
Quote:
I can move the bot but not in the right way...it doesn't responde right to my command:-(

going back to this point.
Specify?

Quote:
If i leave that files in the origin order ide start to program the atom and when all is writed i hear the beep sound of good operation

your problem is not longer the files. i feel your assembly may be wrong.
can you post some pictures of the APOD. i fear some servos may be orientated wrong?

_________________
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.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 10:52 pm 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
Hi jonny,
Like i sayed i can't move in the right way...all movement are wrong:
For example when I push start 5 legs strechs down its body..:-(...one stay in another position..
When i give other commands all movement are wrong..:
The bot can't walk...tail and head doesn't responde ( even if the servos are active )
I can control only the mandible...

Before to program the atom i have done the calibration with linxterm like i did with Phoenix and like in writed on the apod tables..

I don't know what to do..:-(


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 11:36 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4423
If it were me, I would start by doule checking which servo is connected to what pin on the ssc-32. The order may be different than some other hexes like the Phoenix.

Also That the ssc-32 has the right baud...


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 3:47 am 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
Morning..
Each servos are connected at the pins like illustrated in Apod tables.

Baude rate:
If we look in Phoenix tables and Apod tables the baude rate is setted in different way
I set the ssc like in Apod tables

I use ide 2.0.0.15 and the atom pro 28 seams to' be connected well
I think is not problem of comunication

The calibracion with linxterm is good and writed on the ssc

Order of files:
If i unzip and take the prj file in workspace th order of the file is different from what showed in Apod tables...if i program in this way the BOT have the problem of the movements..

If i put the order files like showed it give me the error like i writed

I use Windows 7

:-(...HELP


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 8:51 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4423
rearranging the files won't help. It won't compile as variables that are used in one file are defined in that file or in previously included files. If you reorder it is likely that some variables will not be defined before they are used. Hence the error!

Now back to your problem. Please note, I do not have an A-POD, so I can only make educated guesses, but not test out anything.

However I am pretty sure that there is a major discrepancy between the complete tutorial: http://www.lynxmotion.com/images/html/build184.htm
Servo Channel Numbering chart and the SSC Pin Numbers given in the file: phoenix_config_3dofapod.bas.
Not sure which one is better, but if you are wired up the way that is shown in the tutorial. It is probably easier to change the file than to move all of the servos wires.

Again I can not test it, but I would try changing the source file I mentioned. Look for the are marked: ;[SSC PIN NUMBERS]
And try changing the pin numbers to:
Code:
cLFCoxaPin       con P24   ;Rear Right leg Hip Horizontal
cLFFemurPin    con P25   ;Rear Right leg Hip Vertical --CHANGED FROM 1; FAULTY SSC-32
cLFTibiaPin    con P26   ;Rear Right leg Knee

cLMCoxaPin       con P20   ;Middle Right leg Hip Horizontal
cLMFemurPin    con P21   ;Middle Right leg Hip Vertical
cLMTibiaPin    con P22   ;Middle Right leg Knee

cLRCoxaPin       con P16   ;Front Right leg Hip Horizontal
cLRFemurPin    con P17   ;Front Right leg Hip Vertical
cLRTibiaPin    con P18   ;Front Right leg Knee

cRFCoxaPin       con P8   ;Rear Left leg Hip Horizontal
cRFFemurPin    con P9   ;Rear Left leg Hip Vertical
cRFTibiaPin    con P10   ;Rear Left leg Knee

cRMCoxaPin       con P4   ;Middle Left leg Hip Horizontal
cRMFemurPin    con P5   ;Middle Left leg Hip Vertical
cRMTibiaPin    con P6   ;Middle Left leg Knee

cRRCoxaPin       con P0   ;Front Left leg Hip Horizontal
cRRFemurPin    con P1   ;Front Left leg Hip Vertical
cRRTibiaPin     con P2   ;Front Left leg Knee

cHeadRotPin      con P13   ;Head Rotate
cHeadPanPin      con   P12   ;Head Panorate (side to side)
cHeadTiltPin   con P14   ;Head Tilt (up and down)

cMandRightPin    con P28;Right Mandible
cMandLeftPin    con P29;Left Mandible

cAbdomPanPin   con P30;Abdomen Panorate (tail side to si
cAbdomTiltPin    con P31;Abdomen Tilt (tail up and down)   

Hope that helps.
Kurt


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 9:57 am 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
Hi kurte,
I'm not sure to understand u:-(
Coz I have looked in the phoenix_config_3dofapo.bas and looked the pins assignment into it and their assignmet are not different from how i have set my ssc
So i think that problem can't be resolved changing the pins assignment in that file..
I think must be another error samewhere
I tried again to turn on the bot ( keeping raised from the ground ) , then turn on the controller,and pushing start botton I can hear beeps but the bot starts to do same movement without i give it any command.....
If i push other botton i hear the beeps but bot doesn't reaponde corretly!
:-(..
I really don't understand where i wrong!!!


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 11:09 am 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
i?ll put same pics to show u like the bot starts:
seams to be a problem of servos offsets...but I'm not sure coz the calibration with the ssc went good.
looking in the confg file :
--------------------------------------------------------------------
;[CONDITIONAL COMPILING] - COMMENT IF NOT WANTED
;c4DOF con 1 ; Switch between 3DOF and 4DOF
;cTurnOffVol con 630 ; When uncomment the bot will turn off when
; the voltage drops below this setpooffsets
......................................................................................................................................
;Zenta, the UsecodeOffsets section can be removed in the final release:
;--------------------------------------------------------------------
;[SERVO Offsets]
#IFDEF UseCodeOffsets
cRFCoxaOffset con 644 ;Front Right leg Hip Horizontal ;650-6
cRFFemurOffset con 564 ;Front Right leg Hip Vertical ;650-86
cRFTibiaOffset con 670 ;Front Right leg Knee ;650+20

cRMCoxaOffset con 662 ;Middle Right leg Hip Horizontal ;650+12
cRMFemurOffset con 555 ;Middle Right leg Hip Vertical ;650-95
cRMTibiaOffset con 675 ;Middle Right leg Knee ;650+25

cRRCoxaOffset con 707 ;Rear Right leg Hip Horizontal ;650+57
cRRFemurOffset con 556 ;Rear Right leg Hip Vertical ;650-94
cRRTibiaOffset con 684 ;Rear Right leg Knee ;650+34

cLFCoxaOffset con 629 ;Front Left leg Hip Horizontal ;650-21
cLFFemurOffset con 802 ;Front Left leg Hip Vertical ;650+152
cLFTibiaOffset con 573 ;Front Left leg Knee ;650-77

cLMCoxaOffset con 689 ;Middle Left leg Hip Horizontal ;650+39
cLMFemurOffset con 720 ;Middle Left leg Hip Vertical ;650+70
cLMTibiaOffset con 584 ;Middle Left leg Knee ;650-66

cLRCoxaOffset con 713 ;Rear Left leg Hip Horizontal ;650+63
cLRFemurOffset con 790 ;Rear Left leg Hip Vertical ;650+140
cLRTibiaOffset con 564 ;Rear Left leg Knee ;650-86

#endif
.....................................................................................................................................
maybe is here the problem?


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 11:14 am 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4423
What I was trying to say, is that the image in the tutorial does not match the servo numbers I was seeing in the config file. In particular the image:
Image
I am reading it that the servos for the Right Rear leg would be on SSC-32 pins 0, 1, 2 but the code has them on 24-26. Looking at the config file again, the comments are all wrong in here as well. That is:
Code:
cRRCoxaPin       con P24   ;Front Left leg Hip Horizontal
cRRFemurPin    con P25   ;Front Left leg Hip Vertical
cRRTibiaPin     con P26   ;Front Left leg Knee

Note: the RR as the constant names. This stands for Right Rear. You will see LR for left Rear, LM for Left Middle... So it looks like someone needs to make a pass and clean this up.

Anyway, when I run into problems like this I often write a quick and dirty program to do things like wiggle each servo to verify that they work and that they are on the pins that I expect...
I uploaded one here that moves all servo to their center location (1500), asks you to enter a servo number and then moves it back and forth. This is usually helpful to for example look at the diagram I mentioned above and enter a servo and see what happens...

Again try changing the section I mentioned to what I included in the previous post and see if things work a little better!

Kurt


Attachments:
File comment: Quick and dirty program to wiggle the servos...
wigglesscservo.bas [1.2 KiB]
Downloaded 49 times
Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 12:20 pm 
Offline
Roboteer
User avatar

Joined: Sat Aug 20, 2011 2:53 am
Posts: 121
Location: Forte dei Marmi, Italy
thanx Kurte!
now I understand!!!
for sure that is the problem....or unoe of problems!
I'll do like u say...ohh and thanx for the program.
a think I don't understand...It's possible that nobody have looked that errors?!
for sure changing the pins assignment will resolve the walking problems...but what will be the cause of the initial position of the bot ( i thnk is not correct)
i try to load same pics


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 2:52 pm 
Offline
Robot Guru
User avatar

Joined: Thu Nov 09, 2006 5:46 am
Posts: 2082
Location: Norway
Hi,

You must comment out this line in the config file:

Code:
UseCodeOffsets    con 1    ;Comment this line if you are using the internal SSC32 registry offsets


I can't see that there is anything wrong with the tutorial and the config file:

Code:
;[SSC PIN NUMBERS]
cRRCoxaPin       con P0   ;Rear Right leg Hip Horizontal
cRRFemurPin    con P1   ;Rear Right leg Hip Vertical
cRRTibiaPin    con P2   ;Rear Right leg Knee

cRMCoxaPin       con P4   ;Middle Right leg Hip Horizontal
cRMFemurPin    con P5   ;Middle Right leg Hip Vertical
cRMTibiaPin    con P6   ;Middle Right leg Knee

cRFCoxaPin       con P8   ;Front Right leg Hip Horizontal
cRFFemurPin    con P9   ;Front Right leg Hip Vertical
cRFTibiaPin    con P10   ;Front Right leg Knee

cLRCoxaPin       con P16   ;Rear Left leg Hip Horizontal
cLRFemurPin    con P17   ;Rear Left leg Hip Vertical
cLRTibiaPin    con P18   ;Rear Left leg Knee

cLMCoxaPin       con P20   ;Middle Left leg Hip Horizontal
cLMFemurPin    con P21   ;Middle Left leg Hip Vertical
cLMTibiaPin    con P22   ;Middle Left leg Knee

cLFCoxaPin       con P24   ;Front Left leg Hip Horizontal
cLFFemurPin    con P25   ;Front Left leg Hip Vertical
cLFTibiaPin     con P26   ;Front Left leg Knee

cHeadRotPin      con P13   ;Head Rotate
cHeadPanPin      con   P12   ;Head Panorate (side to side)
cHeadTiltPin   con P14   ;Head Tilt (up and down)

cMandRightPin    con P28;Right Mandible
cMandLeftPin    con P29;Left Mandible

cAbdomPanPin   con P30;Abdomen Panorate (tail side to si
cAbdomTiltPin    con P31;Abdomen Tilt (tail up and down)


Attachment:
apodpins.jpg
apodpins.jpg [ 21 KiB | Viewed 802 times ]


Looks equal and correct if you ask me.

EDIT:

OH, WAIT.
I see the problem in the tutorial. At first I checked the files I had sent to Lynxmotion. But the file in the tutorial at the step 16 inside table 16 are wrong!

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group