Lynxmotion Tech Support

www.lynxmotion.com
It is currently Wed May 22, 2013 11:59 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 617 posts ]  Go to page 1, 2, 3, 4, 5 ... 42  Next
Author Message
 Post subject: Xan's Phoenix Code
PostPosted: Mon Sep 01, 2008 3:54 am 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi all,

There are multiple threads around the forum containing questions, examples and modifications for my code on this moment. I think that it is a good idea to start a new thread for my Phoenix code here.

I would like this to be the central point to discuss my code.

The current version of the code can be found on my BlackWido Project page or on the Phoenix build Tutorial.

So please feel free to participate.

Xan


Top
 Profile  
 
PostPosted: Mon Sep 01, 2008 10:46 am 
Offline
Roboteer
User avatar

Joined: Tue Jun 03, 2008 2:47 pm
Posts: 36
Location: Austin, Texas, USA
Xan and Kurte,
Thanks very much for the reply and your support, I'll be checking for the proper version on my compiler, probably just missed a detail while getting all the elements together. This hex has been nearly two years in the making. I have spent very little time on forums, mostly reading, so I'll have to read up on proper forum/thread edicate. Sorry about hi-jacking your thread. :oops:
Brian

_________________
"I know just enough about electronics to be
a danger to myself and others."


Top
 Profile  
 
PostPosted: Tue Sep 02, 2008 11:53 am 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi Brian,

I hope that he current IDE version will solve the issue. If not, let me know!

brlippincott wrote:
This hex has been nearly two years in the making.

2 Years? Wow, or you really are a busy man or it is going the coolest hex that mankind has ever seen :P

brlippincott wrote:
Sorry about hi-jacking your thread. :oops:

Like I said in my blackwido thread: Don’t worry about it ;)

Xan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 6:24 pm 
Offline
Roboteer
User avatar

Joined: Tue Jun 03, 2008 2:47 pm
Posts: 36
Location: Austin, Texas, USA
Quote:
2 Years? Wow, or you really are a busy man or it is going the coolest hex that mankind has ever seen

Xan,
Yes on both counts :wink: I'm busy, with job, fixing family cars and motorcycles, housework, building CNC, other machine shop projects . . . . . you get the idea. :roll:
Making the coolest robot ever? (I'll try to keep this short) I think it comes down to one's own reason for building one of these to begin with. Ive been tinkering with mechanical stuff for 30 years, and completed an electronics degree two years ago. It opened my eyes to the possibilities of what could be built that was previously not feasible for the "average dude". My aim is to build the best quality, best engineered insect-inspired robot platforms that I can, and make them able to navigate uneven terrain, make them autonomous & remotely controlled, and eventually get my Masters Degree in Robotics. Yep, I'm a geek! :D
I'm grateful that there are others with similar interests and skills who are willing share their knowledge. It makes the journey of building a better bot faster and more rewarding. I'll get a thread started for this bot soon. Be safe.
Brian

_________________
"I know just enough about electronics to be
a danger to myself and others."


Top
 Profile  
 
 Post subject: Code Stuff
PostPosted: Thu Sep 04, 2008 6:53 pm 
Offline
Roboteer
User avatar

Joined: Tue Jun 03, 2008 2:47 pm
Posts: 36
Location: Austin, Texas, USA
Xan wrote
Quote:
I hope that he current IDE version will solve the issue. If not, let me know!

I have updated the IDE and it compiles fine. Mine was just old. I have taken some time to get a little more familiar with the functions of the IDE, and I have read over a printed version of your program (Ripple in this case) to get an idea of what's happening. Most of it I can follow and understand in a general way, with my limited programming skills. :? So far I have uploaded all versions into the BAP to confirm them and see what works. I think I am not getting communication with the Lynxmotion PS2 controller. The robot "snaps to" when the program is started, and it beeps indicating no communication with the PS2. I have also tried it with a cabled PS2 controller. I have been over all the cables/connections carefully, confirming them with your tutorial. The SSC-32 is jumpered to 38.4Kbaud. All other functions of the bot work when controlled by LM Visual Sequencer. I have not tested the LM / PS2adapter for electrical continuity, will check that next. Mine is two years old and has the black wire, not the white.

Are there other things that could be an issue for communications between BAP board and SSC-32 board?

I was noticing commented code in your programs that resembled output code for a serial LCD. Is that what it is for?

; serout s_out, i9600, [sdec TravelLengthX, " ", sdec TravelLengthZ , " ", sdec TravelRotationY , 13]

Looking forward to better understanding your code and getting this bug to crawl.
Brian

_________________
"I know just enough about electronics to be
a danger to myself and others."


Top
 Profile  
 
 Post subject: Re: Code Stuff
PostPosted: Fri Sep 05, 2008 1:28 am 
Offline
Robot Guru
User avatar

Joined: Thu Nov 09, 2006 5:46 am
Posts: 2078
Location: Norway
Hi Brian,
brlippincott wrote:
Xan wrote I think I am not getting communication with the Lynxmotion PS2 controller. The robot "snaps to" when the program is started, and it beeps indicating no communication with the PS2. I was noticing commented code in your programs that resembled output code for a serial LCD. Is that what it is for?

Have you tried the reset button, sometimes I've to press the reset button one or two times.

brlippincott wrote:
serout s_out, i9600, [sdec TravelLengthX, " ", sdec TravelLengthZ , " ", sdec TravelRotationY , 13]

I'm guessing its for debugging for sending serial data to the IDE. Very useful if you want to see the actual values of a variable.

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 4:59 am 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Hi Brian,

brlippincott wrote:
Yes on both counts :wink:
You can say that you’re a busy man for sure! ;) I know the idea of being to busy to spend time on robotics. I’ve got it once and a while…

brlippincott wrote:
I'll get a thread started for this bot soon.
I think that our admin helped you with that already :D

brlippincott wrote:
I have updated the IDE and it compiles fine.
8)

brlippincott wrote:
I think I am not getting communication with the Lynxmotion PS2 controller. The robot "snaps to" when the program is started, and it beeps indicating no communication with the PS2. I have also tried it with a cabled PS2 controller. I have been over all the cables/connections carefully, confirming them with your tutorial. The SSC-32 is jumpered to 38.4Kbaud. All other functions of the bot work when controlled by LM Visual Sequencer. I have not tested the LM / PS2adapter for electrical continuity, will check that next. Mine is two years old and has the black wire, not the white.
There still is a bug in that part, I’ve posted this question several times but nobody seems to know what is going on. I’m also working around that by pressing the reset button several times. I hope that someone will come up with a solution one day ;)

brlippincott wrote:
I was noticing commented code in your programs that resembled output code for a serial LCD. Is that what it is for?

Some leftover debug code ;) I also use a LCD for some quick debugging sometimes. But the s_out writes to the 9 pin sub-D connector.

Xan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 8:35 am 
Offline
Lynxmotion Founder
User avatar

Joined: Mon Oct 31, 2005 10:46 am
Posts: 9325
Location: my quiet place
Three things.

1) We need to know if you are using the MiniABB, or the Bot Board II. They have different pin assignments for the PS2 controller. Which board and which pins are you using? If this isn't it, then test the controller on a PS2 game console.

2) The s_out sends data from the Atom chip to the PC through the serial port. You need to open a terminal at the bottom of the IDE, select the proper baud rate, and click connect. Then you will see what the atom is sending to the port. It is a good way to debug, but with all commands like this it can adversely effect the timing specific commands within the program. Think about what it's doing when you implement it for troubleshooting.

3) I will ask Laurent to look at the PS2 code for this when he has time.

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 9:53 am 
Offline
Superguru of Robotics!!!
User avatar

Joined: Wed Nov 28, 2007 7:48 am
Posts: 1141
Location: Netherlands
Robot Dude wrote:
3) I will ask Laurent to look at the PS2 code for this when he has time.
:D YEAH :D
Thanks, I think that you and Laurent can make a few people happy by solving this problem!

Xan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 05, 2008 12:44 pm 
Offline
Robot Guru
User avatar

Joined: Sat Apr 15, 2006 1:42 pm
Posts: 4414
Xan wrote:
:D YEAH :D
Thanks, I think that you and Laurent can make a few people happy by solving this problem!
Xan

My guess is that it is a timing issue, with the commands that turn the PS2 controller into analog mode. I have had the same problem on my Hex. Many times I can get it to work by hitting the mode (or on some contrllers) Analog button and make it work. Other times I found that the lock in mode function worked but it was not in analog and I then had to reset the processor.

A little while ago I hacked up the sample PS2 code for the Propeller chip to download the initialization strings and found if the timing was off I would run into this same problem. My guess is that initialization code be simplified some. I am not sure most of our programs need the native mode turned on, such that we can receive the button pressure values. From memory, I don't think any of our sample applications use this information). Just a thought.

Kurt


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 4:05 pm 
Offline
Roboteer

Joined: Mon Oct 31, 2005 11:07 am
Posts: 255
Location: France
Hi there,

try to delete the "nap 4" in the PS2 code, nap is not working fine on BA pro, replace with a "pause 100" it should work

_________________
red wire on red plug....black wire on bl...DOH ! a green plug !


Top
 Profile  
 
 Post subject: Smoother walking
PostPosted: Mon Sep 08, 2008 4:25 pm 
Offline
Robot Guru
User avatar

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

I remember that you posted a video of your blackwido walking very fast, when you removed the Query command for waiting for the SSC32 to be ready.. Or something like that :?

One bottleneck is the communication speed between AtomPro and SSC32. To transfer all data for a hexapod takes about 47 - 49 mS. You can avoid this by not using the "Q" command for waiting for the SSC32 to be ready, but instead start sending the data to the SSC32 47 - 49 mS before its ready. I've done this and it works great. And Phoenix walked even smoother. :lol:

I wish the SSC32 "Q" command returned a value for how much time that was left instead of a "+".
I measured the SSCWait sub and it looped for about 110 mS (GaitSpeed = 200 mS) ! :shock: I was thinking that's very much wasted time! This mean that the calculation takes about 80 - 90 mS included the time it took for reading the RC inputs.

What I did was to add a pause command
Code:
pause (GaitSpeed - 135)

instead of the SSCWait sub. You have to experiment a bit with the subtraction value (135).

If Jim or Mike are reading this: Is it possible to make a movement query command that return the actual time thats left for the current move?

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 4:25 pm 
Offline
Lynxmotion Founder
User avatar

Joined: Mon Oct 31, 2005 10:46 am
Posts: 9325
Location: my quiet place
Laureatus wrote:
Hi there,

try to delete the "nap 4" in the PS2 code, nap is not working fine on BA pro, replace with a "pause 100" it should work


James verified this fixes the problem. We will update the website with the new PS2 code soon. I added the NAP command to the 8.0.1.7 bug list. With the Atom the NAP 4 command resulted in a 288mS delay. A NAP 4 on the Pro is an 8mS delay. When we tried NAP 144 for the 288mS delay it still didn't fix the PS2 problem, so it looks as if NAP is broken in 8.0.1.7.

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


Top
 Profile  
 
 Post subject: Re: Smoother walking
PostPosted: Mon Sep 08, 2008 5:09 pm 
Offline
Lynxmotion Founder
User avatar

Joined: Mon Oct 31, 2005 10:46 am
Posts: 9325
Location: my quiet place
zenta wrote:
I wish the SSC32 "Q" command returned a value for how much time that was left instead of a "+".

If Jim or Mike are reading this: Is it possible to make a movement query command that return the actual time thats left for the current move?


I'm asking Mike to look at the request. He's actually working on the SSC-32 firmware right now anyway. He's looking at the ONCE command.

Were you or Xan going to attempt to keep us poor PS2 users with new improved code? :shock:

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


Top
 Profile  
 
 Post subject: Re: Smoother walking
PostPosted: Tue Sep 09, 2008 2:29 am 
Offline
Robot Guru
User avatar

Joined: Thu Nov 09, 2006 5:46 am
Posts: 2078
Location: Norway
Robot Dude wrote:
I'm asking Mike to look at the request. He's actually working on the SSC-32 firmware right now anyway. He's looking at the ONCE command.

Thanks Jim! That would be awesome.
BTW: If he updates the 2.01XE does he also updates the 2.01GP with the same functions? (I'm using GP... :wink: )

Robot Dude wrote:
Were you or Xan going to attempt to keep us poor PS2 users with new improved code? :shock:

Of course. The code are the same for PS2 or RC, its just the PS2Input or RCInput subs that are different. All kinematic calcualtions are the same.

_________________
[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  [ 617 posts ]  Go to page 1, 2, 3, 4, 5 ... 42  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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