Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

rn gyro codes

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
14 postsPage 1 of 1
14 postsPage 1 of 1

rn gyro codes

Post by engineer » Sun Jan 14, 2007 2:13 am

Post by engineer
Sun Jan 14, 2007 2:13 am

rats bauermech just left, I need to find out how to make the gyro_on gyro_off codes work better. they now just make RN dance a little I spent a long time getting the sense, gain and zero balanced. THe grippers and head servos running but I haven't coded any moves in for them yet. I'm hopeing to figure out how soon. I think real time control + insert might work. I have had to send RN in inpieces once and I don't want to do that again.
Code: Select all
head_turn_no:   
   SPEED 5
   SERVO 10,98
   DELAY 500
   SERVO 10,30
   DELAY 500
   SERVO 10,160
   DELAY 1000
   SERVO 10,98
   DELAY 500
   RETURN
'================================================
'======
this makes the neck servo work. put in after RETURN in standard_pose it is for a scan move for sonar I'm sure that after this it will need a command to permit movement in the unobstructed or toward opponent direction.the guys that run in sumo code these moves with less processing power than we have onboard.
rats bauermech just left, I need to find out how to make the gyro_on gyro_off codes work better. they now just make RN dance a little I spent a long time getting the sense, gain and zero balanced. THe grippers and head servos running but I haven't coded any moves in for them yet. I'm hopeing to figure out how soon. I think real time control + insert might work. I have had to send RN in inpieces once and I don't want to do that again.
Code: Select all
head_turn_no:   
   SPEED 5
   SERVO 10,98
   DELAY 500
   SERVO 10,30
   DELAY 500
   SERVO 10,160
   DELAY 1000
   SERVO 10,98
   DELAY 500
   RETURN
'================================================
'======
this makes the neck servo work. put in after RETURN in standard_pose it is for a scan move for sonar I'm sure that after this it will need a command to permit movement in the unobstructed or toward opponent direction.the guys that run in sumo code these moves with less processing power than we have onboard.
Last edited by engineer on Mon Feb 12, 2007 8:26 pm, edited 1 time in total.
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by DirtyRoboto » Sun Jan 14, 2007 3:30 pm

Post by DirtyRoboto
Sun Jan 14, 2007 3:30 pm

I used this code pasted before main...

'Gyro Setup
GYROSET G6A,0,1,1,1,0,0
GYROSET G6D,0,1,1,1,0,0

GYRODIR G6A,0,0,0,0,0,0
GYRODIR G6D,0,0,0,0,0,0

GYROSENSE G6A,0,250,200,250,0,0
GYROSENSE G6D,0,250,200,250,0,0


I then turned the gain and setup right down. Then I just moved gain and then setup until the robot was upright (dont worry about the green/red light). Its then just a matter of small adjustments to the gyro.

Marcus
I used this code pasted before main...

'Gyro Setup
GYROSET G6A,0,1,1,1,0,0
GYROSET G6D,0,1,1,1,0,0

GYRODIR G6A,0,0,0,0,0,0
GYRODIR G6D,0,0,0,0,0,0

GYROSENSE G6A,0,250,200,250,0,0
GYROSENSE G6D,0,250,200,250,0,0


I then turned the gain and setup right down. Then I just moved gain and then setup until the robot was upright (dont worry about the green/red light). Its then just a matter of small adjustments to the gyro.

Marcus
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by bauermech » Sun Jan 14, 2007 6:02 pm

Post by bauermech
Sun Jan 14, 2007 6:02 pm

This old & lengthy robosavvy thread has the entire trial of getting the gyros to work on the RN-1.

Limor was kind enough to set up a Wiki that we members can access and add valuable info. It currently contains a ton of stuff pertaining to the RN-1 in one centralized location - including the Gyro setup :wink: Click here to check it out.

Also, http://www.theoddrobot.com has his own detailed tutorial for gyro set ups.

Hope this helps :D
This old & lengthy robosavvy thread has the entire trial of getting the gyros to work on the RN-1.

Limor was kind enough to set up a Wiki that we members can access and add valuable info. It currently contains a ton of stuff pertaining to the RN-1 in one centralized location - including the Gyro setup :wink: Click here to check it out.

Also, http://www.theoddrobot.com has his own detailed tutorial for gyro set ups.

Hope this helps :D
bauermech
Site Admin
Site Admin
User avatar
Posts: 318
Joined: Sat Feb 04, 2006 1:00 am
Location: Defiance, Ohio, USA

Post by DirtyRoboto » Sun Jan 14, 2007 7:16 pm

Post by DirtyRoboto
Sun Jan 14, 2007 7:16 pm

None of the existing code worked for me. The code on Wiki just makes my bot dance.
I have seen both of the referenceces you have links to and still had wobbles. The code I have posted above works for me though.

Marcus.
None of the existing code worked for me. The code on Wiki just makes my bot dance.
I have seen both of the referenceces you have links to and still had wobbles. The code I have posted above works for me though.

Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

gyros

Post by engineer » Sun Jan 14, 2007 11:03 pm

Post by engineer
Sun Jan 14, 2007 11:03 pm

Hey thanks for the input and replies, however I've been fpllowingthe gyro thread while I was waiting for them to show up,the point is I don't think that the gyros are shutting down. RN just does a cute little dance and then seems to still run signals through them, after I press the 1, 2, 3, or 4 button. I'm waiting for the Gmeter then I want to find out if a blackberry will run bluetooth. thnx again
Hey thanks for the input and replies, however I've been fpllowingthe gyro thread while I was waiting for them to show up,the point is I don't think that the gyros are shutting down. RN just does a cute little dance and then seems to still run signals through them, after I press the 1, 2, 3, or 4 button. I'm waiting for the Gmeter then I want to find out if a blackberry will run bluetooth. thnx again
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by i-Bot » Wed Jan 17, 2007 1:47 pm

Post by i-Bot
Wed Jan 17, 2007 1:47 pm

I have been going through the gyro firmware, and it looks very basic. I can see how the Gyroset and gyrodir work, but I don't see that Gyrosense has any effect.

Can someone with a stable gyro setup check for me ? Do the values 0, 1, and 255 actually make any difference ?

The pots on the PG-03 adjust the offset and sensitivity, so I guess these are the actual setups.

I will check again the firmware
I have been going through the gyro firmware, and it looks very basic. I can see how the Gyroset and gyrodir work, but I don't see that Gyrosense has any effect.

Can someone with a stable gyro setup check for me ? Do the values 0, 1, and 255 actually make any difference ?

The pots on the PG-03 adjust the offset and sensitivity, so I guess these are the actual setups.

I will check again the firmware
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by DirtyRoboto » Wed Jan 17, 2007 3:50 pm

Post by DirtyRoboto
Wed Jan 17, 2007 3:50 pm

I have had no joy with Gyrosense, It does not seem to alter any input at all.
I have had no joy with Gyrosense, It does not seem to alter any input at all.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

hive my hero

Post by engineer » Fri Jan 26, 2007 6:43 am

Post by engineer
Fri Jan 26, 2007 6:43 am

yeahh hivemind gave the answer to getting both the gyros and the accelerometer working. the first thing I had to change was to get hitec's accel. Iwas trying to use a two axis unit RN!still doesn't know it fell sideways but It picks itself when it falls f/b, progress now I only have to wait for the ankle servo that smoked.thnx hive
yeahh hivemind gave the answer to getting both the gyros and the accelerometer working. the first thing I had to change was to get hitec's accel. Iwas trying to use a two axis unit RN!still doesn't know it fell sideways but It picks itself when it falls f/b, progress now I only have to wait for the ankle servo that smoked.thnx hive
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

rn gyro codes

Post by engineer » Thu Feb 01, 2007 5:46 pm

Post by engineer
Thu Feb 01, 2007 5:46 pm

OKAY I'LL TRY THIS:
gyro_off:
GYROSET G6A, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6D, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6C, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6B, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)

GYROSENSE G6A, 0, 0, 0, 0, 0, 0
GYROSENSE G6D, 0, 0, 0, 0, 0, 0
GYROSENSE G6C, 0, 0, 0, 0, 0, 0
GYROSENSE G6B, 0, 0, 0, 0, 0, 0
RETURN

gyro_on_ALL:
GYROSET G6A, 2, 1, 1, 0, 2, 0
GYROSET G6D, 2, 1, 1, 0, 2, 0
GYROSET G6C, 1, 2, 0, 0, 0, 0
GYROSET G6B, 1, 2, 0, 0, 0, 0

GYRODIR G6A, 0, 0, 1, 0, 1, 0
GYRODIR G6D, 1, 0, 1, 0, 0, 0
GYRODIR G6C, 0, 0, 0, 0, 0, 0
GYRODIR G6B, 0, 1, 0, 0, 0, 0

GYROSENSE G6A, 200, 200, 200, 0, 200, 0
GYROSENSE G6D, 200, 200, 200, 0, 200, 0
GYROSENSE G6C, 150, 150, 0, 0, 0, 0
GYROSENSE G6B, 150, 150, 0, 0, 0, 0
RETURN

gyro_on_FB:
GYROSET G6A, 0, 1, 1, 0, 0, 0
GYROSET G6D, 0, 1, 1, 0, 0, 0

GYRODIR G6A, 0, 0, 1, 0, 0, 0
GYRODIR G6D, 0, 0, 1, 0, 0, 0

GYROSENSE G6A, 0, 200, 200, 0, 0, 0
GYROSENSE G6D, 0, 200, 200, 0, 0, 0
RETURN

gyro_on_RL:
GYROSET G6A, 2, 0, 0, 0, 2, 0
GYROSET G6D, 2, 0, 0, 0, 2, 0

GYRODIR G6A, 0, 0, 0, 0, 1, 0
GYRODIR G6D, 1, 0, 0, 0, 0, 0

GYROSENSE G6A, 200, 0, 0, 0, 200, 0
GYROSENSE G6D, 200, 0, 0, 0, 200, 0
RETURN
''================================================
these settings work well for me,the problem I'm having is that the gyro on/off comands seem to run from gyro on / off /on, when I press 1,2,3, or 4.the whole program is gyrohelp.bas from baurmech. I tried to put it all as I have modified it in my downloads, without sucess.thnx engineer
OKAY I'LL TRY THIS:
gyro_off:
GYROSET G6A, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6D, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6C, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)
GYROSET G6B, 0, 0, 0, 0, 0, 0 ' set Gyro to use (0=no Gyro)

GYROSENSE G6A, 0, 0, 0, 0, 0, 0
GYROSENSE G6D, 0, 0, 0, 0, 0, 0
GYROSENSE G6C, 0, 0, 0, 0, 0, 0
GYROSENSE G6B, 0, 0, 0, 0, 0, 0
RETURN

gyro_on_ALL:
GYROSET G6A, 2, 1, 1, 0, 2, 0
GYROSET G6D, 2, 1, 1, 0, 2, 0
GYROSET G6C, 1, 2, 0, 0, 0, 0
GYROSET G6B, 1, 2, 0, 0, 0, 0

GYRODIR G6A, 0, 0, 1, 0, 1, 0
GYRODIR G6D, 1, 0, 1, 0, 0, 0
GYRODIR G6C, 0, 0, 0, 0, 0, 0
GYRODIR G6B, 0, 1, 0, 0, 0, 0

GYROSENSE G6A, 200, 200, 200, 0, 200, 0
GYROSENSE G6D, 200, 200, 200, 0, 200, 0
GYROSENSE G6C, 150, 150, 0, 0, 0, 0
GYROSENSE G6B, 150, 150, 0, 0, 0, 0
RETURN

gyro_on_FB:
GYROSET G6A, 0, 1, 1, 0, 0, 0
GYROSET G6D, 0, 1, 1, 0, 0, 0

GYRODIR G6A, 0, 0, 1, 0, 0, 0
GYRODIR G6D, 0, 0, 1, 0, 0, 0

GYROSENSE G6A, 0, 200, 200, 0, 0, 0
GYROSENSE G6D, 0, 200, 200, 0, 0, 0
RETURN

gyro_on_RL:
GYROSET G6A, 2, 0, 0, 0, 2, 0
GYROSET G6D, 2, 0, 0, 0, 2, 0

GYRODIR G6A, 0, 0, 0, 0, 1, 0
GYRODIR G6D, 1, 0, 0, 0, 0, 0

GYROSENSE G6A, 200, 0, 0, 0, 200, 0
GYROSENSE G6D, 200, 0, 0, 0, 200, 0
RETURN
''================================================
these settings work well for me,the problem I'm having is that the gyro on/off comands seem to run from gyro on / off /on, when I press 1,2,3, or 4.the whole program is gyrohelp.bas from baurmech. I tried to put it all as I have modified it in my downloads, without sucess.thnx engineer
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

RN-! gyro codes

Post by engineer » Mon Feb 12, 2007 4:55 pm

Post by engineer
Mon Feb 12, 2007 4:55 pm

thanks for the replies; But I think the question is do the gyro on sequences before the main block turn the gyros on, then when I press gyro off, turn them back on. Because thats the way RN-!'s is acting.So should I comment that statemant out and try to run RN-!. I try to be careful with the programing, because I've smoked servo's before, and the turnaround from Hitec, as short as it is, is to long. I've read in these posts that if I want to run at the robogames that I need bluetooth up and running and I haven't even ordered the parts yet because I', trying to make multicolored led eyes work like bullets and hives. I still haven't figured that out with thier help.
thanks for the replies; But I think the question is do the gyro on sequences before the main block turn the gyros on, then when I press gyro off, turn them back on. Because thats the way RN-!'s is acting.So should I comment that statemant out and try to run RN-!. I try to be careful with the programing, because I've smoked servo's before, and the turnaround from Hitec, as short as it is, is to long. I've read in these posts that if I want to run at the robogames that I need bluetooth up and running and I haven't even ordered the parts yet because I', trying to make multicolored led eyes work like bullets and hives. I still haven't figured that out with thier help.
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by DirtyRoboto » Mon Feb 12, 2007 6:43 pm

Post by DirtyRoboto
Mon Feb 12, 2007 6:43 pm

I wonder how many games you will win due to multicoloured eyes?

As I am working on basic autonamy I dont see how bluetooth can help me at the present unless it is a requirement of R.O. rules.

I think the best thing is to get combat(other) experience before you even go to an event.
I wonder how many games you will win due to multicoloured eyes?

As I am working on basic autonamy I dont see how bluetooth can help me at the present unless it is a requirement of R.O. rules.

I think the best thing is to get combat(other) experience before you even go to an event.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

RN-! gyro codes

Post by engineer » Mon Feb 12, 2007 7:38 pm

Post by engineer
Mon Feb 12, 2007 7:38 pm

How are you going to get exp if you don't go? and the eyes would be an indicator that the controller was in the right mode.BTW i'm still learning how much I've got to learn. And limor when did I earn the appelation <sp?> savvy roboteer? Sorry dirty I love the stuff your doing and wish I could do just a part of it I haven't even figured out how to send a phone picture to my E-mail so I could share how trimming the servo leads frees up space that we need for the bluetooth mod plus i've only got the Hitec tilt sensor working, the two axis I have questions out with Hive and beermat, RN-! is still fun so take it easy. Oh! actually Doh, the reason for bluetooth #1 the lights @the combat areanas would mess with the IR's commands #2and bigger is that if the BT. could monitor the RN-!'s sensors could the laptop computer make decisions for RN?and then control what RN did? Would that not get you closer to autonomy in your robot? just a thought.good work and luck.
How are you going to get exp if you don't go? and the eyes would be an indicator that the controller was in the right mode.BTW i'm still learning how much I've got to learn. And limor when did I earn the appelation <sp?> savvy roboteer? Sorry dirty I love the stuff your doing and wish I could do just a part of it I haven't even figured out how to send a phone picture to my E-mail so I could share how trimming the servo leads frees up space that we need for the bluetooth mod plus i've only got the Hitec tilt sensor working, the two axis I have questions out with Hive and beermat, RN-! is still fun so take it easy. Oh! actually Doh, the reason for bluetooth #1 the lights @the combat areanas would mess with the IR's commands #2and bigger is that if the BT. could monitor the RN-!'s sensors could the laptop computer make decisions for RN?and then control what RN did? Would that not get you closer to autonomy in your robot? just a thought.good work and luck.
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by DirtyRoboto » Mon Feb 12, 2007 9:17 pm

Post by DirtyRoboto
Mon Feb 12, 2007 9:17 pm

How are you going to get exp if you don't go?

Either buy more robots or find another owner near you.

and the eyes would be an indicator that the controller was in the right mode

There are many ways of indication. Why let your enemy know what mode your robot is in by such an obvious way?

I haven't even figured out how to send a phone picture to my E-mail so I could share how trimming the servo leads frees up space that we need for the bluetooth

Upload the picture from your fone to your puter (i.e. sync). Upload the piccy from your puter to your space here (click the 'manage file uploads') in the left bar in USER INFO.
Then post a link to that file using "[img]"http://robosavvy.com/blahblahblah"[/img] as your format.

Oh! actually Doh, the reason for bluetooth #1 the lights @the combat areanas would mess with the IR's commands

Autonomous requires zero IR input ( :) )

#2and bigger is that if the BT. could monitor the RN-1's sensors could the laptop computer make decisions for RN?and then control what RN did? Would that not get you closer to autonomy in your robot? just a thought.good work and luck.


Mmmm, using a laptop as a brain! Not for me!!!
I have bought a given platform and as such would wish to create free running autonimous functions. i.e. load the code, and into battle. No biological interference after download, just pure reliance on code.

Sorry bru! I am not ripping you, I am just saying my objectives are different from yours.

Marcus.
How are you going to get exp if you don't go?

Either buy more robots or find another owner near you.

and the eyes would be an indicator that the controller was in the right mode

There are many ways of indication. Why let your enemy know what mode your robot is in by such an obvious way?

I haven't even figured out how to send a phone picture to my E-mail so I could share how trimming the servo leads frees up space that we need for the bluetooth

Upload the picture from your fone to your puter (i.e. sync). Upload the piccy from your puter to your space here (click the 'manage file uploads') in the left bar in USER INFO.
Then post a link to that file using "[img]"http://robosavvy.com/blahblahblah"[/img] as your format.

Oh! actually Doh, the reason for bluetooth #1 the lights @the combat areanas would mess with the IR's commands

Autonomous requires zero IR input ( :) )

#2and bigger is that if the BT. could monitor the RN-1's sensors could the laptop computer make decisions for RN?and then control what RN did? Would that not get you closer to autonomy in your robot? just a thought.good work and luck.


Mmmm, using a laptop as a brain! Not for me!!!
I have bought a given platform and as such would wish to create free running autonimous functions. i.e. load the code, and into battle. No biological interference after download, just pure reliance on code.

Sorry bru! I am not ripping you, I am just saying my objectives are different from yours.

Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

RN-! gyro codes

Post by engineer » Mon Feb 12, 2007 9:56 pm

Post by engineer
Mon Feb 12, 2007 9:56 pm

Cool dirty roboto: the reason I'm on this forum so much is to learn what this robot is capable of, and at the same time learn how to do the things all the rest of the computer savvy guys know.so I read and try, sometimes it works, sometimes I smoke servos, mostly I learn, thank you for helping me. Do you think that RN-! could be made autonomous w/only the controller that it has? I have read the posts about c+ coding, but I don't yet understand all that they're trying to do. I don't think my LEGO bot would stand a chance going against RN-! although the guys on that forum have gotten some pretty good results out of it. I did get the gyro's functioning though they won't turn off and stay off, yet
Cool dirty roboto: the reason I'm on this forum so much is to learn what this robot is capable of, and at the same time learn how to do the things all the rest of the computer savvy guys know.so I read and try, sometimes it works, sometimes I smoke servos, mostly I learn, thank you for helping me. Do you think that RN-! could be made autonomous w/only the controller that it has? I have read the posts about c+ coding, but I don't yet understand all that they're trying to do. I don't think my LEGO bot would stand a chance going against RN-! although the guys on that forum have gotten some pretty good results out of it. I did get the gyro's functioning though they won't turn off and stay off, yet
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california


14 postsPage 1 of 1
14 postsPage 1 of 1