Go to Post when answering a question you throw out other teams names (thunder chickens and killer bees)...and a distinguished guest raises his hand and asks if he heard right when I said thunder chickens and asks for an explanation of what a thunder chicken is. - Devon27 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-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 18-05-2015, 16:19
dipmeinaluminum's Avatar
dipmeinaluminum dipmeinaluminum is offline
Michael Vilarelle Mentor
AKA: (Former Mentor 354 Westinghouse Pirates)
FRC #0333 (The Megalodons)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Brooklyn
Posts: 142
dipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to behold
Help an old dog w/ new tricks

With the 2015 season behind us, I am begging for help, I am not afraid to ask for help. I have thrown in the towel.
I have been around FIRST for 15 consecutive season and I am asking for help with Java.
Where do I go to learn to write Java for FRC? The team and I figured out teleop mode with limit switches and simple drive motor functions. Autonomous mode on the other hand, I cant figure it out!!!
We failed trying to have our gyro sensor operating the way we would have liked it to. The idea was to have it turn 90Deg and drive forward and stay the course, if the robot started walking off the 90Deg path, it would auto correct itself. Getting the encoders to work together. The last thing I am looking for help on is having the camera come through clear with no lag in our driver station. If teams don't want to disclose their secrets, maybe you can help VIA email? I'll send you shirts, I'll fly out to you, If you're in the NYC area, I'll buy you dinner, I don't care, I am at my end and I'm asking for help.
MichaelVilarelle@gmail.com

I have a practice robot wired and ready to attempt different codes and ideas.
__________________

Team#333 (2013-Present)
Team#354 (2000-2013)
https://www.youtube.com/watch?v=Bu5-NvMUQ-Y
Reply With Quote
  #2   Spotlight this post!  
Unread 18-05-2015, 16:36
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Help an old dog w/ new tricks

I have a few questions before I answer some of the specific questions that you asked.

Are you using a tank drive, or some other drivetrain?

Are you capable of reading the speed of your encoders, tracking the distance your encoders have traveled, and sucessfully determining the angle of your robot using the gyroscope?

Are you familiar with using PID loops?
Reply With Quote
  #3   Spotlight this post!  
Unread 19-05-2015, 08:16
dipmeinaluminum's Avatar
dipmeinaluminum dipmeinaluminum is offline
Michael Vilarelle Mentor
AKA: (Former Mentor 354 Westinghouse Pirates)
FRC #0333 (The Megalodons)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Brooklyn
Posts: 142
dipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to beholddipmeinaluminum is a splendid one to behold
Re: Help an old dog w/ new tricks

We used the AM14U2 chassis, with one joystick arcade drive.

When it comes to the encoders, we can see the value, and the team can even assign it to a certain RPM. We can watch it, but in a isolated situation we notice that its a not consistent, and certain situation we would need accuracy.

I think that is all the sensors, where nothing is 100% Maybe its the type of sensor?
But I do need help tracking distance, and other functions with success. The Gyro, we can see the angle, we can also have it turn 90. When it comes to using the PID Loops to achieve what we want, we are failing.
__________________

Team#333 (2013-Present)
Team#354 (2000-2013)
https://www.youtube.com/watch?v=Bu5-NvMUQ-Y
Reply With Quote
  #4   Spotlight this post!  
Unread 03-08-2015, 13:14
knuckleduster knuckleduster is offline
Registered User
AKA: Jack Manning
FRC #0058 (The Riot Crew)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: South Portland
Posts: 12
knuckleduster is an unknown quantity at this point
Re: Help an old dog w/ new tricks

https://wpilib.screenstepslive.com/s/4485/m/13809

This site has tons of code examples to help you get started, and once your questions get more specific, we are here to help you still.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-08-2015, 17:18
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,014
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Help an old dog w/ new tricks

I'm not a programmer, but I can offer some advice. Let's start with the encoders:

RPM doesn't help much, but the number of "counts" does. If you determine, empirically if necessary, the number of inches that, say, 1,000 counts equals, you can measure distance. If for example 1,000 counts equals 75 inches, then each count is 0.75 (3/4) inch. If you want to go xx feet, just run the motors until you're 'close' to xx feet, then slow down more and more until you stop at xx feet (which is nn,nnn counts). The key here: Make sure that you are counting consistently. If you are not, nothing gets done until you are counting consistently. This becomes a mechanical or sensor thing.

Now the Gyro: You can turn 90 degrees, that's HUGE. The 'staying on track after" is not a trivial problem, but the basic idea is to set the direction after the turn (that means, read the gyro and make that youer "set point" or "goal"). Then track your direction and, if the path deviates from the goal, make corrections.
The key to this is tracking the deviation in a reasonable way. A difference of 0.01 degree would be impossible, from a mechanical view, to correct. So you average a reading every 1/4 second and, if after 8 readings the average is more than, say, 2 degrees to one side, you go to a subroutine that tweaks the power to the other side by reducing it slightly. Now, 'tweaks slightly' can be related to the number of degrees error: Bigger tweak for 5 degrees, smaller tweak for 2 degrees, huge tweak for 15 degrees.
Just don't do this too fast: a change every 1/2 to 2 seconds is on the order of magnitude for what you want.

Many years ago I posted a few posts on PID; if you find them they'll explain in a more logical way the concepts of error, corrections, and how often you apply corrections.

But doing all this in theory is not going to teach you what you need: get the robot, and focus on ONE thing at a time. Get that thing nailed flat and fully understood - fool with it to see what happens - and write down what you learned (your memory will not suffice. The faintest ink is superior to the strongest memory). Then move to the next thing.

And keep asking us here.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #6   Spotlight this post!  
Unread 07-08-2015, 17:55
SamcFuchs's Avatar
SamcFuchs SamcFuchs is offline
Programmer
AKA: Sam Fuchs
FRC #0236 (TechnoTicks)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2014
Location: Old Lyme, Connecticut
Posts: 58
SamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud ofSamcFuchs has much to be proud of
Check out my code on github:


https://github.com/Team236/2016-Practice

And wpi has great docs here:

https://wpilib.screenstepslive.com/s/4485/m/13809
__________________
Sam Fuchs
236 TechnoTicks, Old Lyme, CT

2015 - Programming, Electrical
2016 - Lead Programmer, Co-Driver
2017 - Lead Programmer, Co-Driver
Reply With Quote
  #7   Spotlight this post!  
Unread 08-08-2015, 07:57
Yamin's Avatar
Yamin Yamin is offline
Registered User
FRC #1610 (B.O.T.)
Team Role: Photography
 
Join Date: Apr 2015
Rookie Year: 2015
Location: USA North Carolina
Posts: 27
Yamin is an unknown quantity at this point
Re: Help an old dog w/ new tricks

Quote:
Originally Posted by dipmeinaluminum View Post
With the 2015 season behind us, I am begging for help, I am not afraid to ask for help. I have thrown in the towel.
I have been around FIRST for 15 consecutive season and I am asking for help with Java.
Where do I go to learn to write Java for FRC? The team and I figured out teleop mode with limit switches and simple drive motor functions. Autonomous mode on the other hand, I cant figure it out!!!
We failed trying to have our gyro sensor operating the way we would have liked it to. The idea was to have it turn 90Deg and drive forward and stay the course, if the robot started walking off the 90Deg path, it would auto correct itself. Getting the encoders to work together. The last thing I am looking for help on is having the camera come through clear with no lag in our driver station. If teams don't want to disclose their secrets, maybe you can help VIA email? I'll send you shirts, I'll fly out to you, If you're in the NYC area, I'll buy you dinner, I don't care, I am at my end and I'm asking for help.
MichaelVilarelle@gmail.com

I have a practice robot wired and ready to attempt different codes and ideas.
Hey I'm still new to java however I know of a very good internet totorial series that covers a large variety of Java subjects into small bite size pieces for all levels of experience. Google thenewboston java, and it should be the first thing to pop up. Good luck to you sir
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 12:56.

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


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