Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Help with Victor & Shooter (http://www.chiefdelphi.com/forums/showthread.php?t=103029)

Gizmo4 16-02-2012 20:18

Help with Victor & Shooter
 
Our rookie team (desperately?/urgently?) needs help to make the shooter go by Saturday.

I am new to programming so Im not positive how to finish programming it. I will add the portion of the code we need to finish when i have access to the team laptop again if you want to take a look at it. I am pretty sure we have it almost done, but I don't have the code with me now. (might add tomorow) Could anyone help me create a code or give advice that will make the shooter at least launch the ball forward using a button on 1 joystick? Our shoot is two pairs of spinning wheels lined vertically. The ball is supposed to go through the spinning wheels on its own of course. We will hopefully be using a standard Banebots motor that a lot of teams are using for this.

And also, we are not fully done with how to get the other (aiming) joystick to control the Victor, which will turn the lazy susan the shooter (and hopefully camera) is mounted on left and right. Andymark gearmotor is used to rotate lazy susan for right now I believe. We have a LimitedVictor class to control how fast/far the Lazy susan moves left to right if that helps.

Again, top priority is to get the robot to at least/just start the launcher by itself using the Banebots motor. That would be great.
Any help is appreciated, and very much preferred by Friday night.

as a side note, are we seriously not allowed to make two smaller bumpers on either side of the hole like this: 42 on the left bumper, then the hole to pick up balls, then 81 on the right bumper? itd be a VERY tight squeeze otherwise. yes, i did search CD for this and found i couldnt, but would we be disqualified from an event for this?

nickpeq 16-02-2012 21:55

Re: Help with Victor & Shooter
 
Regarding the bumper, look at the official rules. I'm not totally sure what you mean or what "42 and 81" are referring to. Just ensure that the first 8" from each corner is covered by bumpers.

compboy07 16-02-2012 22:04

Re: Help with Victor & Shooter
 
What language are we talking? I can help you with the code part if its in Java.

Also, have you considered using an encoder with a CANJaguar? From our tests, motor speed was very fluctuable using a voltage-based control system like a victor (you set it from -1.00 to 1.00, meaning -batteryVoltage to batteryVoltage). With an encoder, you can explicitly set a speed, and the CANJaguar class has a transparent PID function that makes it dead-easy to set the RPM. The only downside is wiring the CAN connector.

Gizmo4 16-02-2012 22:21

Re: Help with Victor & Shooter
 
We are using Java, yes. :)
We will probably do something with our (almost finished?) encoder and actual shooter wheel speed control code on monday when theres more programmers, but for right now I just want to try to get the shooter actually working -by itself and using a button on one of the joysticks- to help my team out for a friendly pre-competition-season event we have on Saturday. Ill worry about the speed control later. Also, my team would like me to possibly set the joystick to rotate the lazy susan left and right by friday night. any help with the code for that would be appreciated. If you can of course?

As for the bumpers, I mean having 42 on the left 8 inch bumper of the front of the robot, then to the right of that is the hole where balls are brought in, then to the right of the hole is the second 8 inch bumper which would read 81. But I have read that is illegal. Yet it would be a very tight squeeze.?

Parentheses being the bumper, the equal signs being the hole:
(42) == (81)

DominickC 16-02-2012 22:27

Re: Help with Victor & Shooter
 
I can lend no help in terms of Java, however I can shed some light on your bumper situation.

You MUST NOT split/rotate/obscure your team numbering ANYWHERE on your robot.

compboy07 16-02-2012 22:36

Re: Help with Victor & Shooter
 
OK, so for simple working code, you'll want something like this in your main loop (having initialized the respective joystick and victors, of course).

lazySusanVictor.set(yourJoystick.getX());
if (yourJoystick.getRawButton(buttonTriggerNumber)) shooterVictor.set(1);
else shooterVictor.set(0);

Gizmo4 16-02-2012 22:48

Re: Help with Victor & Shooter
 
Quote:

Originally Posted by compboy07 (Post 1128474)
OK, so for simple working code, you'll want something like this in your main loop (having initialized the respective joystick and victors, of course).

lazySusanVictor.set(yourJoystick.getX());
if (yourJoystick.getRawButton(buttonTriggerNumber)) shooterVictor.set(1);
else shooterVictor.set(0);

Thank you, but What do you mean by 'shooterVictor'? The shooter mechanism will be using a Banebots motor. We have one victor we will be using- which would be the lazySusanVictor -to turn it left and right. As a rookie, Not sure how this motor would be added or implemented into the code.
Thanks.
And thanks DominickC-not the answer I was hoping for, but thanks for the answer all the same. :)

scree0114 16-02-2012 22:49

Re: Help with Victor & Shooter
 
how many rounds are in the competition this year

cgmv123 16-02-2012 23:04

Re: Help with Victor & Shooter
 
Quote:

Originally Posted by scree0114 (Post 1128483)
how many rounds are in the competition this year

Depends on how you define "round". One could say there are 3 rounds. Practice, Qualification, Elimination. There could also be 3 rounds as in Quarterfinals, Semifinals and Finals. There could also be 2 rounds. Regional and Championship. There could also be 8 rounds. Regional Quarterfinals, Regional Semifinals, Regional Finals, Championship Divisional Quarterfinals, Championship Divisional Semifinals, Championship Divisional Finals, Championship Semifinals, and Championship Finals. The possibilities are endless.

compboy07 16-02-2012 23:41

Re: Help with Victor & Shooter
 
Quote:

Originally Posted by Gizmo4 (Post 1128482)
Thank you, but What do you mean by 'shooterVictor'? The shooter mechanism will be using a Banebots motor. We have one victor we will be using- which would be the lazySusanVictor -to turn it left and right. As a rookie, Not sure how this motor would be added or implemented into the code.
Thanks.
And thanks DominickC-not the answer I was hoping for, but thanks for the answer all the same. :)

I assumed you were connecting it to a Victor. Motors need speed controllers to work (unless you want it on full-time), so you need to put a victor, jaguar, spike or something in between it and the power supply (if it has an onboard controller I don't know about, feel free to correct me; never used a banebots motor)

Gizmo4 17-02-2012 07:41

Re: Help with Victor & Shooter
 
Oh sorry-pretty sure we'll be using two Jaguars for the banebots motor - forgot to mention that. How would using two work out with the 1 lazysusan victor in Java? two if statements? If youre not sure then Ill just -try- a few different ways.
(So: there are two jaguars controlling the banebots motor, and a joystick probably controlling the victor for the lazy susan. Pretty sure, thats what i heard our rookie team planned anyway).

compboy07 17-02-2012 14:15

Re: Help with Victor & Shooter
 
Same stuff, but use curly brackets after the if and use the set once for each jag. Also, initialize two jags for it instead of the victor i suggested. If you need more help, I'll be on skype starting at 3pm AZ time.

Gizmo4 17-02-2012 18:17

Re: Help with Victor & Shooter
 
Edit: Thank you very much for helping, Ill let you know if it all works out. (Whenever our team actually gets 2 jaguars + banebots motor)


All times are GMT -5. The time now is 11:17.

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