OCCRA
Go to Post Okay, who's willing to admit they treat their robot as a pet? - Bill Moore [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-16-2012, 07:18 PM
Gizmo4 Gizmo4 is offline
Registered User
FRC #9999
Team Role: Student
 
Join Date: Feb 2012
Rookie Year: 2012
Location: NJ
Posts: 13
Gizmo4 is an unknown quantity at this point
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 : 02-16-2012 at 08:24 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-16-2012, 08:55 PM
nickpeq nickpeq is offline
Turing-complete
FRC #1255 (Blarglefish)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baytown, TX
Posts: 60
nickpeq is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-16-2012, 09:04 PM
compboy07's Avatar
compboy07 compboy07 is offline
Registered User
AKA: Jake M.
FRC #2449 (Out of Orbit)
Team Role: Electrical
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Tempe, AZ
Posts: 19
compboy07 is on a distinguished road
Send a message via Skype™ to compboy07
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-16-2012, 09:21 PM
Gizmo4 Gizmo4 is offline
Registered User
FRC #9999
Team Role: Student
 
Join Date: Feb 2012
Rookie Year: 2012
Location: NJ
Posts: 13
Gizmo4 is an unknown quantity at this point
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 : 02-16-2012 at 09:34 PM.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-16-2012, 09:27 PM
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 434
DominickC is an unknown quantity at this point
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-16-2012, 09:36 PM
compboy07's Avatar
compboy07 compboy07 is offline
Registered User
AKA: Jake M.
FRC #2449 (Out of Orbit)
Team Role: Electrical
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Tempe, AZ
Posts: 19
compboy07 is on a distinguished road
Send a message via Skype™ to compboy07
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);
Reply With Quote
  #7   Spotlight this post!  
Unread 02-16-2012, 09:48 PM
Gizmo4 Gizmo4 is offline
Registered User
FRC #9999
Team Role: Student
 
Join Date: Feb 2012
Rookie Year: 2012
Location: NJ
Posts: 13
Gizmo4 is an unknown quantity at this point
Re: Help with Victor & Shooter

Quote:
Originally Posted by compboy07 View Post
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.

Last edited by Gizmo4 : 02-16-2012 at 10:20 PM.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-16-2012, 09:49 PM
scree0114 scree0114 is offline
Registered User
FRC #3642 (Huskies)
Team Role: Mechanical
 
Join Date: Jan 2012
Rookie Year: 2011
Location: jackson
Posts: 7
scree0114 is an unknown quantity at this point
Re: Help with Victor & Shooter

how many rounds are in the competition this year
Reply With Quote
  #9   Spotlight this post!  
Unread 02-16-2012, 10:04 PM
cgmv123's Avatar
cgmv123 cgmv123 is offline
Professional Peon
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 1,205
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Help with Victor & Shooter

Quote:
Originally Posted by scree0114 View Post
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.
__________________
I don't get it. We followed all the instructions exactly. Why doesn't it work?
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2013 FIRST Championship Curie Division (#breakthecurse)

2013 Wisconsin Regional Chairman's Award
2012 FIRST Championship Archimedes Division

2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson), Semi-Finalist (1732/1714)
2011 Wisconsin Regional Innovation in Control Award
Reply With Quote
  #10   Spotlight this post!  
Unread 02-16-2012, 10:41 PM
compboy07's Avatar
compboy07 compboy07 is offline
Registered User
AKA: Jake M.
FRC #2449 (Out of Orbit)
Team Role: Electrical
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Tempe, AZ
Posts: 19
compboy07 is on a distinguished road
Send a message via Skype™ to compboy07
Re: Help with Victor & Shooter

Quote:
Originally Posted by Gizmo4 View Post
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)
Reply With Quote
  #11   Spotlight this post!  
Unread 02-17-2012, 06:41 AM
Gizmo4 Gizmo4 is offline
Registered User
FRC #9999
Team Role: Student
 
Join Date: Feb 2012
Rookie Year: 2012
Location: NJ
Posts: 13
Gizmo4 is an unknown quantity at this point
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 : 02-17-2012 at 09:10 AM.
Reply With Quote
  #12   Spotlight this post!  
Unread 02-17-2012, 01:15 PM
compboy07's Avatar
compboy07 compboy07 is offline
Registered User
AKA: Jake M.
FRC #2449 (Out of Orbit)
Team Role: Electrical
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Tempe, AZ
Posts: 19
compboy07 is on a distinguished road
Send a message via Skype™ to compboy07
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.
Reply With Quote
  #13   Spotlight this post!  
Unread 02-17-2012, 05:17 PM
Gizmo4 Gizmo4 is offline
Registered User
FRC #9999
Team Role: Student
 
Join Date: Feb 2012
Rookie Year: 2012
Location: NJ
Posts: 13
Gizmo4 is an unknown quantity at this point
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)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:16 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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