by hivemind » Sun Jul 30, 2006 12:31 am
by hivemind
Sun Jul 30, 2006 12:31 am
Well folks, here is the long awaited code, ready to go, all you have to do is compile exactly what i post and send it over, it can work as its own independant program.
Before you you test this though, there are several things you should know. I have modified my RN-1 so that it has three extra servos that could dramatically alter the effects of this flip, the head servo (located in the chest as i explained earlier) and Matt's two gripping claws. Also i have used several rubberized mats on a cement floor (cement reduces inconsistencies and the rubber mat is to make sure it is not damaged) I have noticed that he will work on other surfaces (hard wood and even my carpet) but the cement (or tile floors) with a rubber is the best.
And one final thing: any damages that may incur due to this routine or any variation you may create/come upon are not my responsibility. You should be careful with your robot and use it wisely, give it plenty of space and dont let it fall and there SHOULD be no problems, but i suggest a rubber mat for protection. I hold no responsibilty for any damages as i have tested and re-tested my routine to perfect it. You use this code at your own risk, but i would appreciate that if you were to post it elsewhere you do not claim it as your own, and even if you do, be sure to keep my warnings.
here you are:
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
PTP SETON
PTP ALLON
'== motor start position read ===================
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0
'== motor power on ========================
SPEED 5
MOTOR G24
DELAY 5000
'==standard pose==
SPEED 10
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 30, 80, 100, 100, 100
MOVE G6C, 100, 30, 80, 100, 100, 100
WAIT
'=================
PWM 2,25
'==wait for user to move away==
DELAY 2500
'=====================
'==lean back and arms out forward==
SPEED 10
MOVE G6A, 100, 73, 145, 83, 100
MOVE G6D, 100, 73, 145, 83, 100
MOVE G6B, 11, 188, 98
MOVE G6C, 11, 188, 98
WAIT
'========================
'==ankle tilt and then "jump" to arms==
SPEED 15
HIGHSPEED SETON
MOVE G6A, 109, 102, 185, 158, 99
MOVE G6D, 109, 102, 185, 158, 99
MOVE G6B, 10, 185, 104
MOVE G6C, 10, 185, 104
WAIT
'==========================
'==wait for momentum to kick in==
DELAY 150
'======================
'=======================================
'=lands on hands and feet:
MOVE G6A, 99, 103, 101, 10, 98
MOVE G6D, 99, 103, 101, 10, 98
MOVE G6B, 190, 185, 104
MOVE G6C, 190, 185, 104
WAIT
'=======================================
HIGHSPEED SETOFF
SPEED 10
'==bring legs underneath==
MOVE G6A,100, 165, 70, 15, 100, 100
MOVE G6D,100, 165, 70, 15, 100, 100
'==================
'==reposition==
MOVE G6A,100, 165, 40, 100, 100, 120
MOVE G6D,100, 165, 40, 100, 100, 120
WAIT
'==========
DELAY 100
SPEED 8
'==standard_pose======================
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 30, 80, 100, 100, 100
MOVE G6C, 100, 30, 80, 100, 100, 100
WAIT
'==================================
PWM 2,0
PWM 0,25
SPEED 14
'==arms up==
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 160, 85, 100, 100, 100
MOVE G6C, 100, 160, 85, 100, 100, 100
WAIT
'=========
^END OF ROUTINE: As for tempusmaster, thank you for posting my video on your site
i will have a follow-up very shortly if you would like to add it to that same page (heh)
and beermat, as for the tr-colour LEDS that im using for the eyes, i am using the PWM ports (as you can see in my code above) instead of the LED ports as i can control the power of each LED
Well folks, here is the long awaited code, ready to go, all you have to do is compile exactly what i post and send it over, it can work as its own independant program.
Before you you test this though, there are several things you should know. I have modified my RN-1 so that it has three extra servos that could dramatically alter the effects of this flip, the head servo (located in the chest as i explained earlier) and Matt's two gripping claws. Also i have used several rubberized mats on a cement floor (cement reduces inconsistencies and the rubber mat is to make sure it is not damaged) I have noticed that he will work on other surfaces (hard wood and even my carpet) but the cement (or tile floors) with a rubber is the best.
And one final thing: any damages that may incur due to this routine or any variation you may create/come upon are not my responsibility. You should be careful with your robot and use it wisely, give it plenty of space and dont let it fall and there SHOULD be no problems, but i suggest a rubber mat for protection. I hold no responsibilty for any damages as i have tested and re-tested my routine to perfect it. You use this code at your own risk, but i would appreciate that if you were to post it elsewhere you do not claim it as your own, and even if you do, be sure to keep my warnings.
here you are:
'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0
PTP SETON
PTP ALLON
'== motor start position read ===================
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0
'== motor power on ========================
SPEED 5
MOTOR G24
DELAY 5000
'==standard pose==
SPEED 10
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 30, 80, 100, 100, 100
MOVE G6C, 100, 30, 80, 100, 100, 100
WAIT
'=================
PWM 2,25
'==wait for user to move away==
DELAY 2500
'=====================
'==lean back and arms out forward==
SPEED 10
MOVE G6A, 100, 73, 145, 83, 100
MOVE G6D, 100, 73, 145, 83, 100
MOVE G6B, 11, 188, 98
MOVE G6C, 11, 188, 98
WAIT
'========================
'==ankle tilt and then "jump" to arms==
SPEED 15
HIGHSPEED SETON
MOVE G6A, 109, 102, 185, 158, 99
MOVE G6D, 109, 102, 185, 158, 99
MOVE G6B, 10, 185, 104
MOVE G6C, 10, 185, 104
WAIT
'==========================
'==wait for momentum to kick in==
DELAY 150
'======================
'=======================================
'=lands on hands and feet:
MOVE G6A, 99, 103, 101, 10, 98
MOVE G6D, 99, 103, 101, 10, 98
MOVE G6B, 190, 185, 104
MOVE G6C, 190, 185, 104
WAIT
'=======================================
HIGHSPEED SETOFF
SPEED 10
'==bring legs underneath==
MOVE G6A,100, 165, 70, 15, 100, 100
MOVE G6D,100, 165, 70, 15, 100, 100
'==================
'==reposition==
MOVE G6A,100, 165, 40, 100, 100, 120
MOVE G6D,100, 165, 40, 100, 100, 120
WAIT
'==========
DELAY 100
SPEED 8
'==standard_pose======================
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 30, 80, 100, 100, 100
MOVE G6C, 100, 30, 80, 100, 100, 100
WAIT
'==================================
PWM 2,0
PWM 0,25
SPEED 14
'==arms up==
MOVE G6A, 100, 76, 145, 93, 100, 100
MOVE G6D, 100, 76, 145, 93, 100, 100
MOVE G6B, 100, 160, 85, 100, 100, 100
MOVE G6C, 100, 160, 85, 100, 100, 100
WAIT
'=========
^END OF ROUTINE: As for tempusmaster, thank you for posting my video on your site
i will have a follow-up very shortly if you would like to add it to that same page (heh)
and beermat, as for the tr-colour LEDS that im using for the eyes, i am using the PWM ports (as you can see in my code above) instead of the LED ports as i can control the power of each LED
Last edited by hivemind on Sun Jul 30, 2006 2:52 pm, edited 1 time in total.