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.
Yes on both counts I’m busy, with job, fixing family cars and motorcycles, housework, building CNC, other machine shop projects . . . . . you get the idea.
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!
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.
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?
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
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.
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.
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.
I will ask Laurent to look at the PS2 code for this when he has time.
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.
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.
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) ! 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
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?
James verified this fixes the problem. We will update the website with the new PS2 code soon. I added the NAP command to the 126.96.36.199 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 188.8.131.52.
Yeah! That did the job! A IDE bug… Great. sry I didnÃ¢â‚¬â„¢t think of thatÃ¢â‚¬Â¦ Thanks!!
Yep IÃ¢â‚¬â„¢ve encountered the same problem! When my code was about half way I had the problem that I had to wait for the SSC to be ready. If the data is send to early the servos will not reach the final position and if I send this to late the movements wonÃ¢â‚¬â„¢t be very smooth. As youÃ¢â‚¬â„¢ve noticed timing is a big issue here. But since the code is still changing you also need to measure and change the value by hand. ThatÃ¢â‚¬â„¢s why I added the Ã¢â‚¬Å“QÃ¢â‚¬
The bi-directional communication between the Atom Pro and the SSC-32 is still useful even if you decide to just wait a specific amount of time to refresh the leg positions. It can be used to access the 4 analog inputs on the SSC-32.
Here’s what could be a pretty simple way to really give the Phoenix some personality. If the bot is stopped for a few seconds, it could become bored. Maybe lift and lower a couple legs, maybe at random. Even adjust the body level or orientation above the legs. Just an idea…