I am in charge of programming for my team along with a few others and we all know Java to a great extent. More specifically, we’ve been doing Java for 2-3 years so we know it to the intermediate extent, enough to program a robot of-course.
Last year (Grade 10 for me), we were using Labview and we were met with many setbacks and limitations that were absolutely annoying and we wish to transition our focuses to Java as it will be much more flexible to handle rather than the one-way Labview.
I, personally am planning to get started in learning the Java FRC API (WPI) during the summer so I can easily get a hand of things when the next competition hits.
What is the best area to get started in learning the Java FRC API?
Prefer: Videos & PDF
Now for my second question - Is there some sort of a plugin or robot emulator in which I can test my FRC Java code with as you obviously can’t run the Java code and truly test if the robot is doing what you need it to do without the chassi, etc.
Finally, I would love it if someone can give me an eBook / Video(s) explaining how the FRC Robot works like terminology and how it ties in with the programming so I will be able to program the robot understanding what everything means…
Thanks in advance.
Slidell Robotics has a page about Java on our site: http://slidell-robotics.com/index.php?page=javaresources
On it you will find a few learning Java (which you seem to have a handle on) as well as a few for learning the FRC wpilibj such as Brad Miller’s video tutorial of the Command Based Robot Setup, and an online copy of the wpilibj JavaDoc.
At the bottom of the page are a couple of links to other teams resource pages as well.
Hope you do well and happy coding!
I was just about to post a similar question. Thanks.
This is our 3rd year and we have used Java in our first two years but we have lost our main programmer to graduation and coding mentorship has been spotty (at best). So we are really starting from scratch.
This is going to be a rebuilding year for our team in a lot of ways. I am pushing each of our subteams to come up with a list of measurable skills that the team should acquire prior to kickoff.
To that end… …beyond learn Java, the WPI Library, etc. I have made this list of tasks/skills that the coding team should work towards:
- Read Joysticks and buttons from Gamepad
- Output values to a motor
- Output values to multiple motors
- Read values from a switch
- Read values from a sensor (potentiometer, angular rate sensor)
- Read values from wheel encoders
- Display a value from the robot on the PC screen
- Display a value in the form of a visual gauge on the PC screen
- Understand how to use Debugging & Development Features of FIRST control system
- Use Joystick values to control a mulitmotor drive system with and without a shifter
- Implement various joystick scaling methods (e.g. “deadband removal”, “dynamic zeroing”)
- Implement various output scaling methods (e.g. “linearize Victor”)
- Implement a PID Feedback Loop on an arm or actuator
- Implement a PID feedback Loop on robot wheels
- Control a PID Feedback Loop via Joystick
- Control a PID Feedback Loop via buttons
- Use Angular Rate Sensor and Encoders to improve high speed “Drive Straight” Performance
- Use Angular Rate Sensor and Encoders to improve low speed “positioning” performance
- Basic Autonomous: sequence of steps in series
- Medium Autonomous sequence of steps some series, some parallel
- Medium High Autonomous including straight line robot motion back and forth with other steps
- Difficult Autonomous robot motion including turns
- Very Difficult Autonomous using camera to auto target using both arm and robot motion
- Use NetworkTables to implement Full Robot Monitoring System
- PC Based Vision System Based Targeting (height, distance, & angle wrt Robot)
What do folks think of this list? Would you add/remove anything? How about the ordering?
How i will a java programmer in high level?
They just keep on coming.
I would recommend doing this independently from the other tasks, and I wouldn’t focus much on doing vision on the cRIO. The performance of a PC-based vision system is orders of magnitude better than one running on the cRIO, and the only major similarity between the libraries used on PC and cRIO is NetworkTables. It’ll probably be most worth your time to just work on a PC version.
Where could one start to try to get PC vision working? We would like to use javacv
I would suggest starting by digging through 341’s code and the related comments.
Between that and the openCV tutorials online, you should be able to make some decent progress.
A word of warning. The documentation for javaCV is terrible. Or I should say it was the last time I checked which was January/February of this year. The C++ variant seems to be their primary focus. Unfortunately the documentation isn’t always 1:1.
Figuring out how to get things up and running in the off season will be a huge advantage to you.
A more-current resource you might use is our team’s vision system for this year. It’s not well-commented (yet – I’m working on it), but it works on the same basic principles as Miss Daisy’s system while also showing how you can make parameters that can be tweaked at runtime through SmartDashboard’s properties window.
Being able to see your team’s robot this year really impressed me. Your vision system was amazing. Thanks for sharing!