View Full Version : autonomous aiming????
pclements
20-01-2006, 08:52
Hi, this is my first year programming a robot, and I was wondering if it was possible to switch to the autonomous mode so we can aim automatically?
Hi, this is my first year programming a robot, and I was wondering if it was possible to switch to the autonomous mode so we can aim automatically?
There's nothing magical about autonomous mode. Any code you use in autonomous mode can work in regular mode, and vice versa (with the obvious exception that in autonomous mode you don't get useful inputs from the OI)
pclements
20-01-2006, 13:16
so you can push a button and it will aim and fire? that's something if i can get it to work. Thanks!!!
what you do is you write a method that will aim and fire for you then you call it from autonomous when you want or you call it when a button is pressed on the OI
Alan Anderson
20-01-2006, 13:59
so you can push a button and it will aim and fire? that's something if i can get it to work. Thanks!!!
Better yet, have it aim continuously. If you can get that to work, when you push a button it can fire without delay.
Greg Ross
20-01-2006, 17:59
what you do is you write a method...
In C, it's called a function. ;)
Validius
20-01-2006, 21:14
what you do is you write a method
Your stuck in C++ land my friend.
Validius
20-01-2006, 21:22
I plan to have an aiming function called from the main loop and autonomous mode. It shouldnt be overly difficult, just take the vector returned by the cam (confidence is the magnitude) and aim the cannon. That is, assuming the cannon has feedback.
Chriszuma
20-01-2006, 21:23
so you can push a button and it will aim and fire? that's something if i can get it to work. Thanks!!!
There are two pins in the competition port that you can connect in order to switch the robot controller into autonomous mode. You can find the pinout in the programming manual probably. Sorry I can't give you more information, but it is really quite a simple manner. We made a nice little dongle that plugs into the competition port with two switches: one for auton and one for disable.
Mike Betts
20-01-2006, 22:31
There are two pins in the competition port that you can connect in order to switch the robot controller into autonomous mode. You can find the pinout in the programming manual probably...
Chris,
The information you refer to is here (http://www.ifirobotics.com/docs/competition-port-pinout-guide-reva.pdf) but I'm not sure that this answers the question...
Mike
Pclements,
Please realize that the competition port is not available during the competition. However...
You could have an aiming function which is called from both autonomous and normal modes. Is this more in line with what you are asking?
Mike
Chriszuma
20-01-2006, 23:02
Chris,
The information you refer to is here but I'm not sure that this answers the question...
No, you're wrong, I definitely answered the question, for I have amazing powers of observation.
No, you're wrong, I definitely answered the question, for I have amazing powers of observation.Mr. Betts was just noting that the guy was not actually asking how to switch to autonomous, but how to get his shooting device to always automatically track the goal. :)
pclements
21-01-2006, 11:19
Chris,
The information you refer to is here (http://www.ifirobotics.com/docs/competition-port-pinout-guide-reva.pdf) but I'm not sure that this answers the question...
Mike
Pclements,
Please realize that the competition port is not available during the competition. However...
You could have an aiming function which is called from both autonomous and normal modes. Is this more in line with what you are asking?
Mike
yes it is, i was just thinking about that. how can you do that in the C program?
pclements
21-01-2006, 11:23
Mr. Betts was just noting that the guy was not actually asking how to switch to autonomous, but how to get his shooting device to always automatically track the goal. :)
Ok, you both are right. we need to be able to aim the cannon and shoot the ball into the big giant hole, but we really don't know how to program it to do that. and yes, I am stuck in C++ land.
Your stuck in C++ land my friend.
No im stuck in C# and JAVA where i have always called them methods
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.