|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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? Last edited by Gizmo4 : 16-02-2012 at 21:24. |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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) Last edited by Gizmo4 : 16-02-2012 at 22:34. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
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); |
|
#7
|
|||
|
|||
|
Re: Help with Victor & Shooter
Quote:
Thanks. And thanks DominickC-not the answer I was hoping for, but thanks for the answer all the same. ![]() Last edited by Gizmo4 : 16-02-2012 at 23:20. |
|
#8
|
||||
|
||||
|
Re: Help with Victor & Shooter
Quote:
|
|
#9
|
|||
|
|||
|
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). Last edited by Gizmo4 : 17-02-2012 at 10:10. |
|
#10
|
||||
|
||||
|
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.
|
|
#11
|
|||
|
|||
|
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)
|
|
#12
|
|||
|
|||
|
Re: Help with Victor & Shooter
how many rounds are in the competition this year
|
|
#13
|
||||
|
||||
|
Re: Help with Victor & Shooter
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|