I played around with the 1.3 code for awhile, made no progress (aside from verifying that the PS2 controller was in fact communicating just fine), then loaded the original, unmodified version of the 1.3 code. At this point I went into the Reg settings for the SSC-32 and disabled Initial Pulse Width, saved it, and hooked everything back up, and everything worked!
Code is fully functioning now, it beeps when I turn on the robot initially and waits for me to hit the start button.
FANTASTIC code btw. Reading through all of it last night, I finally started putting everything together as to how it works, and have that much more appreciation for all the work you put into it.
I’m glad to hear that you’ve solved the problem with the SSC. V1.1 uses a serout command to set up the offsets at the beginning of the code. The offsets are moved to the SSC’s registers in a later version. It looks like the serout command for the offsets disables the Initial Pulse Width and the SSC register offsets. I think I remember Jim saying something like that about the offsets. But I’m not sure about the Pulse Width… Anyway, now we know thanks for the test! 8)
Is it fully working right now? I can’t see how the Initial Pulse Width caused the program not to “beepâ€
Thank you for the tip. Yes, I am set up with the serial connector to the front. I tried both configurations - “0” was way off the mark. I am a “1”
I believe all of my pins are in the right places, as I used the LM bot for a guide when I was wiring it up. I have the registers set with proper offsets. After careful observation with very slow movements I believe it’s the servos. I have not gone into the “Mad Robo-geek Shop” and tested my theory yet. It looks like MG995 servos respond with opposite directional rotation to a signal than what Hitec HS645 servos do. All of the movements I see on the bot are in the opposite directions of what the commands should be telling them to do. How’s that for a goofy problem?
I have only a few HS645’s and a half-dozen MG995’s so I will go hook some up to a signal and see if that is the case. If so I could rewire all the pots to give proper directional movements for this project. Sounds like the code would require some major “surgery” in its computations to invert all the output values.
For the most part I have learned the money I saved trying out the MG995’s has been a pain in the neck. All of the hexapod parts I designed are on the Futaba standard dimensions since they were drawn to fit the MG995’s. I don’t want to start over from scratch as yet so if I decide to upgrade to better servos, I need to find the best deal on lots of Futaba S3305 metal gears.
I can just confirm your findings about the direction of rotation for Hitec vs. TowerPro. You’ll have to reverse the direction in the code. Locate the ServoDriver sub and switch the +/- before each angle.
Original code:
ServoDriver:
;Front Right leg
serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,"P",dec TOINT(TOFLOAT(-RFCoxaAngle +90)/0.10588238)+650]
Change this to:
ServoDriver:
;Front Right leg
serout SSC_OUT,SSC_BAUTE,"#",dec RFCoxaPin,"P",dec TOINT(TOFLOAT(RFCoxaAngle +90)/0.10588238)+650]
Thanks Zenta!
It does not sound as bad as I thought. I’ll try that before I start performing excessive surgery on the bot.
Three of my servo gear-trains are really sloppy and one of the motors is trashed. When I address that bit of repair I plan to pack all the gear-trains with LOTS of lithium grease, that should improve gear life a bit. Cheap way to get a some more good use out of these servos before I spring for upgrades. I’ll post You-Tube clips to my project page when it all starts running properly. I’m getting closer!
As you have already ordered them you are about to learn what is perhaps the #1 guiding rule about hobby servos, you get what you pay for, and perhaps its collary of there are no free rides. Quite probably the biggest issue with towerpro servo is their jitter… basically they tend to oscillate around the stop point and it can occasionally become quite severe. On the other hand we have seen someone build a scout (biped) with these servos so it may be interesting to see what the net impact on a hex will be.
If you don’t mind, could you go in and re-enable the initial position register to see if it breaks it. Sorry, this makes no sense. If you can break it by enabling initial positions then I can go to Mike. If not I will do it here, but I’m currently buried with some things.
Thanks Zenta. It worked!! Everything works as designed. I spent time looking at some details of the program and understand more of how it works. I’ll get to work on the mechanical parts next. I will try to post some video of initial tests soon.
There is a robot event on the 22nd of this month in Dallas, Texas, USA. I went to the Dallas Personal Robotics Group event last year, not a lot of crawlers there. David P. Anderson (He built J-Bot & n-Bot) is a club member.
It’s great to see so much hexapods, in all kind of shapes and materials walking over the whole world using the same code! 8)
I’ve got the first results on calculation speeds concerning fixed point calculations. I’ve rewrote the GetSinCos function to fixed point and compared it with the original floating point function. The current resolution of the fixed point functions is 0.5 deg with a precision of 4 decimals.
For the test I calculated a full circle with steps of 1 degree. The floating point version needs 386ms to get it done where the fixed point can do the same in only 147ms!
This is just the difference between one function, I think that the difference will only get bigger when not only all the floats will be removed but also the conversions between the floats and integers.
but i want make it a little bit autonom.
with a sharp sensor. when somebody come sin range 20cm the body from phoenix goes back… when it comes near than 20 cm it make a step back.
its only when he stand. hend he must move some lega a little bit. same like IC bot.
an with the ps2 controll.
how i can include attacking mode on r1?
that phoenix goes to the 4 legs backside… and the other 2 legs he moves. like the movie from zenta…
and here a big thank to you all!
its a cool new hobby for me.