Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   autonomous aiming???? (http://www.chiefdelphi.com/forums/showthread.php?t=42281)

pclements 20-01-2006 08:52

autonomous aiming????
 
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?

kaszeta 20-01-2006 09:06

Re: autonomous aiming????
 
Quote:

Originally Posted by pclements
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

Re: autonomous aiming????
 
so you can push a button and it will aim and fire? that's something if i can get it to work. Thanks!!!

Cuog 20-01-2006 13:57

Re: autonomous aiming????
 
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

Re: autonomous aiming????
 
Quote:

Originally Posted by pclements
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

Re: autonomous aiming????
 
Quote:

Originally Posted by Cuog
what you do is you write a method...

In C, it's called a function. ;)

Validius 20-01-2006 21:14

Re: autonomous aiming????
 
Quote:

Originally Posted by Cuog
what you do is you write a method

Your stuck in C++ land my friend.

Validius 20-01-2006 21:22

Re: autonomous aiming????
 
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

Re: autonomous aiming????
 
Quote:

Originally Posted by pclements
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

Re: autonomous aiming????
 
Quote:

Originally Posted by Chriszuma
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 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

Re: autonomous aiming????
 
Quote:

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.

Ryan M. 21-01-2006 07:13

Re: autonomous aiming????
 
Quote:

Originally Posted by Chriszuma
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

Re: autonomous aiming????
 
Quote:

Originally Posted by Mike Betts
Chris,

The information you refer to is here 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

Re: autonomous aiming????
 
Quote:

Originally Posted by Ryan M.
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.

Cuog 21-01-2006 20:04

Re: autonomous aiming????
 
Quote:

Originally Posted by Validius
Your stuck in C++ land my friend.

No im stuck in C# and JAVA where i have always called them methods


All times are GMT -5. The time now is 01:02.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi