using the phoenix code i wish to impliment a ācameraā panning servo to the top of the body. and a want the servo to turn to face the direction of travel.
xan mentioned ābodyā as i wish to add a secondy ses structure on to of this servo.
and not a camera etc.
[code]
;Head
Head_PulseMin con 600 ;(panning servo) <180ĆāĆĀ°>
Head_PulseMax con 2400
;The panning servo will point in the direction of the robots heading
Head_Pulse var word
; 180ĆāĆĀ° Head Code
Head_Pulse = (((Head_PulseMax - Head_PulseMin) * ((DAngle + 64 ) & $7F) |
/ 127 + Head_PulseMin) max Head_PulseMax) min Head_PulseMin[/code]
in....[MAIN]
;GOSUB ReadButtons ;I/O used by the PS2 remote
;GOSUB WriteLeds ;I/O used by the PS2 remote
I used my code with all kinds of remotes. Sometimes it can come in handy to test some small functions without the need of a controller. The PS2 can only be connected the same pins as the buttons/leds on the BB2 so canāt use them both at the same time. I rewired them to other pins some time ago but those pins are used by the FSRās at the moment.
Conclustion: It can be removed but it can also be used for some testing. Same thing for the subs.
'BodyRotX = 0
'BodyRotY = 0
'BodyRotZ = 0[/code]
At first I thought it would be handy if the body returns to the āhomeā position while walking. This offcourse is optimal for the gait. But itās also funny to see it walk with a rotated or translated body. Now itās up to the one whoās holding the controller. Making a easy to understand user interface is always though. (Not only talking about controllers but also about pcās, GUIās) So sometimes I let friends control my bots to see if the controls are logic for them or only for me
Conclusion: I think most users can handle the ācomplexā controls so there is no need for locking back to the home position before walking.
i thought this might be the case. nice idea too. i may use the āIdeaā if/when i change to RC control.
Yeah this was the case in ABB hexapod code. i remember the proās and conās of this. this might work better for me, on my quad project, as it would keep the COG in check!
Removed!
thanks again for the details on this. a real help.
i would really like to start programming my own codes from scratch and i have found that you have structured it reall well and i understanding and find your way around it 'is fairly easy.
Xans code will counteract this.
plus there is a āheadā!
just so we dont hijack this thread, further information on the quad can be found here: lynxmotion.net/phpbb/viewtop ā¦ &start=180
been looking over the code again and i have also found a few more varibles that seem to have no function:
In.. [Body Inverse Kinematics]
DistCenterBodyFeet var float ;Total distance between the center of the body and the feet
AngleCenterBodyFeetX var float ;Angle between the center of the body and the feet
In.. [Gait]
TravelMulti var sbyte ;Multiplier for the length of the step
i have followed up the rest of the code and i cannot find anything that they relate too.
You can drop them without a problem. Iāll do the same over here
Iām using Visual Studio 2008 at work for developing software. Itās got some nice features like intellisence and on the fly pre-compiling. It puts a green or red line under errors or variables that are not used. Looks like Iām a bit spoilt
I had suggested that to AcidTech a while ago when I was still in the process of learning the basic code, I admit its a very cool feature to have, and speeds up the learning process.
i have followed the instructions for SSC regesters, and before i connected the botboard i restarted the SSC to see if the legs would āSnap into positionā they did.
i connected the botboard and uploaded the code. When i push (start) to initiate the robot, the legs snap into initial position, but from there nothing else. im lead to believe, from here 'the robot should stand up. it doesnt!?