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

Has anyone used a Sharp distance Sensor (GP2D12)?

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

Post by lampcov » Mon Feb 26, 2007 3:33 pm

Post by lampcov
Mon Feb 26, 2007 3:33 pm

Hey guys- Very cool stuff...I was wondering if anyone knew what the possibilties would be for integrating this type of sensor on to a RCB-3 for the KHR and Manoi bots....

I'm still way too green to have any idea what the work would take or if it's even a possibility.

Marc
Hey guys- Very cool stuff...I was wondering if anyone knew what the possibilties would be for integrating this type of sensor on to a RCB-3 for the KHR and Manoi bots....

I'm still way too green to have any idea what the work would take or if it's even a possibility.

Marc
lampcov
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 50
Joined: Wed Dec 13, 2006 1:00 am

Post by beermat » Wed Feb 28, 2007 4:55 am

Post by beermat
Wed Feb 28, 2007 4:55 am

No idea, lampcov - some on here might have a sense of what works with KHR and Manoi, but you might be better posting on those forums and cross referencing here for advice?

Sooo, I've programmed my 'bot to have 3 toggleable sensor modes (off, left and right only, or flap-arms-around-and-take-6-readings), and I've done the same for reaction modes (defensive, passive, aggressive), all controllable from the remote. In defensive mode, he'll move away from something 'in range'. In passive, he'll speak out loud the distance (really, a debug mode for me), and in agressive, he'll attack if something is 'in range'. I've got the 'in range' adjustable up and down in centimeters via the remote, but 12cm seems to work well as the no-go zone.

I've got attack moves for front left, front right, left, and right, but not if anything is detected on his rear left or rear right. Anyone got any suggestions for an attack move for something detected behind? Hard to reach around with his arms, and turning around is too slow by far, so if anyone has any ideas, that'd be great!

I've now got over 70 commands programmed into the remote, now, too; have to keep a spreadsheet of them to remember them all!
No idea, lampcov - some on here might have a sense of what works with KHR and Manoi, but you might be better posting on those forums and cross referencing here for advice?

Sooo, I've programmed my 'bot to have 3 toggleable sensor modes (off, left and right only, or flap-arms-around-and-take-6-readings), and I've done the same for reaction modes (defensive, passive, aggressive), all controllable from the remote. In defensive mode, he'll move away from something 'in range'. In passive, he'll speak out loud the distance (really, a debug mode for me), and in agressive, he'll attack if something is 'in range'. I've got the 'in range' adjustable up and down in centimeters via the remote, but 12cm seems to work well as the no-go zone.

I've got attack moves for front left, front right, left, and right, but not if anything is detected on his rear left or rear right. Anyone got any suggestions for an attack move for something detected behind? Hard to reach around with his arms, and turning around is too slow by far, so if anyone has any ideas, that'd be great!

I've now got over 70 commands programmed into the remote, now, too; have to keep a spreadsheet of them to remember them all!
beermat
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 137
Joined: Sun Jul 23, 2006 1:00 am

tried this

Post by engineer » Wed Feb 28, 2007 3:39 pm

Post by engineer
Wed Feb 28, 2007 3:39 pm

WOW beermatt!! just do a backflip into it, that should discourage whatever it is ,especialy a cpt. crunch box, seriously, what a job, keep it up. And share some of the stuff so the rest of us can try to keep up.way to go 8)
WOW beermatt!! just do a backflip into it, that should discourage whatever it is ,especialy a cpt. crunch box, seriously, what a job, keep it up. And share some of the stuff so the rest of us can try to keep up.way to go 8)
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by beermat » Thu Mar 01, 2007 1:18 am

Post by beermat
Thu Mar 01, 2007 1:18 am

Sure, engineer, what do you want me to share? I'll post a video if it all looks good, and if anyone wants to see the code - which I hate the look of compared to stuff in a 'real' language, but hey, I guess it is RoboBASIC, we have to work with the tools we are given - I can do that, too.
Sure, engineer, what do you want me to share? I'll post a video if it all looks good, and if anyone wants to see the code - which I hate the look of compared to stuff in a 'real' language, but hey, I guess it is RoboBASIC, we have to work with the tools we are given - I can do that, too.
beermat
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 137
Joined: Sun Jul 23, 2006 1:00 am

Post by beermat » Thu Mar 01, 2007 4:04 am

Post by beermat
Thu Mar 01, 2007 4:04 am

Here's my Robonova reacting to an object placed in various locations around him, with the more efficient arm moves to take front and back sensor readings. He scans every few seconds. I messed up which side to attack when he turns to react to a threat from behind, but you get the idea. I added a couple of his built in sound effects at the end, too:

phpBB [media]
Here's my Robonova reacting to an object placed in various locations around him, with the more efficient arm moves to take front and back sensor readings. He scans every few seconds. I messed up which side to attack when he turns to react to a threat from behind, but you get the idea. I added a couple of his built in sound effects at the end, too:

phpBB [media]
beermat
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 137
Joined: Sun Jul 23, 2006 1:00 am

Post by serithseraki » Tue Nov 15, 2011 7:01 pm

Post by serithseraki
Tue Nov 15, 2011 7:01 pm

Sorry to bring back a long lost post but I just got two of these and seeing as my programing skills are at a novice level I am having difficulty understanding the code provided with the instruction sheet. Anyway here is what I do not understand.

Code: Select all
Gp2d12_val = 6787 / Gp2d12_val

Why is the value equal to 6787 being divided by the value?
Code: Select all
IF Gp2d12_val > 100 THEN Gp2d12_val = 0 ‘limit

Wait,what?

I want to calculate precise values but I am currently way to tired to figure this out, any assistance is much appreciated.
Sorry to bring back a long lost post but I just got two of these and seeing as my programing skills are at a novice level I am having difficulty understanding the code provided with the instruction sheet. Anyway here is what I do not understand.

Code: Select all
Gp2d12_val = 6787 / Gp2d12_val

Why is the value equal to 6787 being divided by the value?
Code: Select all
IF Gp2d12_val > 100 THEN Gp2d12_val = 0 ‘limit

Wait,what?

I want to calculate precise values but I am currently way to tired to figure this out, any assistance is much appreciated.
serithseraki
Savvy Roboteer
Savvy Roboteer
Posts: 75
Joined: Wed Oct 21, 2009 6:31 pm

Previous
21 postsPage 2 of 21, 2
21 postsPage 2 of 21, 2