Skip to content
This repository has been archived by the owner on Mar 31, 2019. It is now read-only.

Getting Started

Ning Ning Sun edited this page Jan 14, 2014 · 4 revisions

Download Netbeans from http://bit.ly/tZ16SR. This will be your IDE for programming for the robot.

Get the FRC Plugin for Netbeans. You can do this by going into Tools->Plugins->Setting->Add and then entering http://first.wpi.edu/FRC/java/netbeans/update/Release/updates.xml as the URL and calling it FRC Java. Install all of the plugins it offers by going to "Available Plugins" and selecting all the plugins in the FRC Java category.

After restarting NetBeans, make a new project (File->New Project) based off of the CommandBasedRobot Template and call it "BadRobot2013". Right click the project and choose Versioning->Initialize Git Repository. Click Ok. Now, go to Git->Commit and name it something like "first commit".

Set up a pair of SSH keys so that GitHub can authenticate you by following [these steps] (https://help.github.com/articles/generating-ssh-keys). You need to install the [Git Client] (http://git-scm.com/downloads). To use Git Bash, go to your downloaded files or just search for "Git Bash". Once Git Bash is opened, you can follow the tutorial that is linked to above. FOLLOW IT CLOSELY.

Then head over to the [BadRobot2013 repo] (https://github.com/BadRobots1014/BadRobot2013) and fork the repo (upper right button on the page) OR you can probably just hit up [this link] (https://github.com/BadRobots1014/BadRobot2013/fork)! Name it whatever you wish and then copy the SSH link given for your repo. Forking the repo simply copies the repository under the BadRobots page to your own repository so that you can modify it. Return to your project in NetBeans and right click the project, choose Git->Remote->Pull. Go through the steps for setting up a remote source, using the url you have copied. Use "git" as the username, and as for the authentication, go with the SSH key option rather than the username-password one. Browse to your key which should be in the Users/(Your Username)/.ssh directory. Choose the private key (the one without the .pub file extension).

After having the code downloaded to your computer, NetBeans is probably going to complain of an error or two. It will ask you to resolve or cancel. Resolve. Then, using the bottom pane with files in red, go through each conflicted file and choose the "Accept and Next" in the upper right corner, and then click "Ok" on the bottom. Then save when it asks you to. Double click to open each of the conflicted files in the bottom pane and do this until all of them are resolved.

Delete the original files that were in the project (they should all contain "edu.wpi.first.wpilibj").

Then right click the project and choose git->commit!

Now, take a step back and pat yourself on the back! You now have the code and tools to start programming for the robot! Woo! To push your code to the repository just commit your changes (Git->Commit) and then push your changes (Git->Remote->Push)! Rinse and repeat these couple steps for every time you want to save your changes to GitHub. Also, before you ever push to your repo, make sure you pull from the main repo (BadRobots1014 repo) to get the newest version of code from all your friends. Also, make sure that you jot down some decent notes about the changes you made when committing.


If you wish to work on SmartDashboard widgets/extensions, you will need to download a little bit more of code. Navigate to http://firstforge.wpi.edu/sf/frs/do/listReleases/projects.smartdashboard/frs.installer and click on the most recent release candidate install option. Then go through the installer that was downloaded, and voila! You have everything you need installed.

To actually create extensions, you will need a little bit more knowledge though. A basic tutorial is available at the following link to get you there: http://firstforge.wpi.edu/sf/wiki/do/viewPage/projects.smartdashboard/wiki/Extensions