View Full Version : Cam interupt question
Collmandoman
07-03-2005, 02:48
At the kickoff lavery walked around.. and the bot followed... but it stopped when it got close enough.. can someone explain this? I've looked through the entire FIRST code and can't find anything that shows this. I don't even know how it could be done... unless the camera was programmed to stop sending info to the drive system when X amount of area was consumed in its field of view.. or there was a push sensor I didn't see. An explanation or a foward to code I missed would be most helpful - Thanks
There are two ways I know of to do it.
A. Stop driving when cam.tilt_servo < x (which is what most teams did, I believe, but wouldn't work for a vertical object like a human)
B. Stop driving when the cam.size > y (as you suggested, which is probably just what they did.)
Collmandoman
07-03-2005, 03:25
do you by chance know if that code was included in the first code? (for area > X) I can't seem to find it
Mark McLeod
07-03-2005, 10:53
The kickoff demonstration version of the camera driving code (if it's the version 2.4 FIRST released) looks like it might just have operated by driving at a slow enough speed such that it was stopped when it pushed lightly up against something (a leg, a goal).
It looks like the max forward speed was 150.
user_routines.c:38: const int speed_setting = 150; //forward speed setting (127 to 254)
user_routines_fast.c:31: extern int speed_setting;
user_routines_fast.c:154: if (speed_setting < 128 || speed_control > 254) //Check speed_setting for valid forward speed
user_routines_fast.c:155: speed_setting = 150; //If not valid number set to default
user_routines_fast.c:158: speed_control = speed_setting;
Greg Marra
07-03-2005, 14:48
It looked like the robot was running in to him. I agree with Mark McLeod.
Kevin Watson
08-03-2005, 17:39
...looks like it might just have operated by driving at a slow enough speed such that it was stopped when it pushed lightly up against something (a leg, a goal)...A bump switch was installed to keep the 'bot from running over Dave. It may not be in the code because (I believe) it was added just two days before the kick-off.
-Kevin
Collmandoman
10-03-2005, 12:41
thx kevin =)
Mark McLeod
10-03-2005, 12:55
A bump switch was installed to keep the 'bot from running over Dave. It may not be in the code because (I believe) it was added just two days before the kick-off.
-KevinHow many times were the testers run over before the touch switch was added?:ahh:
djcapelis
24-03-2005, 00:44
How many times were the testers run over before the touch switch was added?:ahh:
As many times as it took.
Robotics requires live humans, no one said this sport was going to be easy. ;)
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.