Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Please Answer My Question !!!! (http://www.chiefdelphi.com/forums/showthread.php?t=144071)

CyberTeam5713 02-18-2016 12:19 AM

Please Answer My Question !!!!
 
If I wanted to make my shooter shoot in autonomous how would I do that ?

Also can anyone show me a example of a autonomous program ?


Also how do I set up different autonomous programs to choose from in SmartDashBoard ?

Please Answer the following questions programming geniuses.

I'm Running a Iterative Class

MaGiC_PiKaChU 02-18-2016 12:21 AM

Re: Please Answer My Question !!!!
 
Quote:

Originally Posted by CyberTeam5713 (Post 1542069)
If I wanted to make my shooter shoot in autonomous how would I do that ?

Also can anyone show me a example of a autonomous program ?


Also how do I set up different autonomous programs to choose from in SmartDashBoard ?

Please Answer the following questions programming geniuses.


Are you running command based in Java?

If you are, then your autonomous program is litterally a command group with a sequence of commands.

you add your commands like this

addSequential(new myCommand1);
addSequential(new myCommand2);

if you want to run 2 commands at the same time:

addParallel(myCommand1);
addSequential(myCommand2);

rich2202 02-18-2016 12:25 AM

Re: Please Answer My Question !!!!
 
> If I wanted to make my shooter shoot in autonomous how would I do that ?

In AutonomousPeriodic, turn on your shooter and shoot.

Now, if you want to score, and avoid fouls (like having to be in contact with the courtyard carpet before launching a boulder), that is much more difficult.

Starting from the Spy Box would be a much easier problem. When your team places the robot, line it up with the goal.

> Also how do I set up different autonomous programs to choose from in SmartDashBoard ?

Have some method to set a variable: dip switches on the robot (connected to analog or digital input), Digital switches on the Dashboard, or use a field on the smart dashboard.

In AutonomousInit, read the switches.
In AutonomousPeriod, do whatever you have to do, based upon the switch setting.

BTW: Can you drive your robot yet? That is a more fundamental problem. If you can't drive, you can't do much in Autonomous, or Teleop.

CyberTeam5713 02-18-2016 12:26 AM

Re: Please Answer My Question !!!!
 
Thank you for replying but I am running Iterative

CyberTeam5713 02-18-2016 12:28 AM

Re: Please Answer My Question !!!!
 
Thank you

CyberTeam5713 02-18-2016 12:32 AM

Rich
 
Yes we can drive

rich2202 02-18-2016 12:44 AM

Re: Rich
 
Quote:

Originally Posted by CyberTeam5713 (Post 1542077)
Yes we can drive

Autonomous is just like Teleop. The only difference is: Instead of getting commands from the Controller, you pre-define the sequence of commands.

So, drive straight for a period of time. Shoot the Boulder.

mreynolds 02-18-2016 01:49 PM

If you create an example program in eclipse, it should have an example of how to use the smart dashboard to select your auto script. You should find a SendableChooser object in the robot.Java, which is the radio-button selector thing in the smart dashboard

mreynolds 02-18-2016 01:50 PM

If you can't find it, feel free to PM me I can walk you through it. I'd just send you resources now, but I'm only on my phone


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

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