Go to Post why do they call them chips if you can't eat them? - Broadside [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-09-2013, 18:16
rwodonnell rwodonnell is offline
Registered User
AKA: Rick O'Donnell
FRC #2876 (Devilbotz)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Burlington, MA, USA
Posts: 53
rwodonnell is a splendid one to beholdrwodonnell is a splendid one to beholdrwodonnell is a splendid one to beholdrwodonnell is a splendid one to beholdrwodonnell is a splendid one to beholdrwodonnell is a splendid one to beholdrwodonnell is a splendid one to behold
Version Control Systems

I have been mentoring the last couple of seasons, and although I am a software engineer by profession, there are other mentors in our club with that skill as well, and they also have more experience with robotics type code (I am a web application developer.) As a result, I have found other ways to get involved, which has been a great learning experience.

However, in watching our programming team, it always sort of works out the same way. Though we have a few laptops capable of running the IDE (we are using Java), we end up with one kid on one of the laptops, and the others crowd around as he writes the code. As you can imagine, many of the kids that want to be engaged don't remain engaged, as well as the fact that the kid behind the wheel, so to speak, changes from meeting to meeting, and he doesn't always understand what changes the other kids made, and so on.

It seems to me that we are badly in need of using some sort of source control, and we are holding ourselves back by not using it more. (Technically, we check in and out of SVN, but really only about twice a season.) It would make sense to me, based on the kind of projects I have worked on professionally, to have one machine dedicated as a build machine, where nobody actually writes any code, and let the others do their work and check in, and so on.

I think there are several barriers to this, though. First, part of the reason they are operating the way they are now is that they have trouble having connecting to the robot and the internet at the same time. So the build machine can deploy to the robot and they update and deploy, and the cycle goes on like that, not really stopping until they're done, at which point they will check it in as a safety measure once in a blue moon. The second problem is that there is no way to test your code without deploying to the robot - the need for a simulator is huge, it seems to me, though I imagine with the variety of parts used in the robots, would be difficult.

So, because I am a noob to robotics programming, and really robotics in general, any help on these general questions would be great:
1. Do most teams use version control, and what do they use?
2. Do teams use a build machine, or build server, and what?
3. Is there a solution to this problem of connecting to the internet and to the robot network at the same time?
4. Is there a simulator that can help programmers?

Sorry so long... I guess I rambled. Thanks in advance for any answers.

Rick O'Donnell
  #2   Spotlight this post!  
Unread 20-09-2013, 19:17
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: Version Control Systems

The team I mentor uses C++. We have our code hosted on GitHub and use Git as our version control system.

Each of our programmers tends to have their own laptop and they each test changes independently. Once each has been tested, changes are pushed to GitHub and merged at the end of the night. One of the more experienced students and I fix conflicts as they arise.

As for internet, you could write a batch script for changing your network settings. I'm pretty sure there's a thread on CD that has discussed that before.

There's a simulator for LabVIEW and perhaps Java too, but I don't know of one for C++.
  #3   Spotlight this post!  
Unread 20-09-2013, 19:29
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is offline
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,569
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: Version Control Systems

Quote:
Originally Posted by rwodonnell View Post
3. Is there a solution to this problem of connecting to the internet and to the robot network at the same time?
There are a couple, one you can connect the robot router to the internet. You can also have the robot router connect to another router that is online and have all the programmers connect to that router. Make sure to configure the routers IP settings to work nicely with the 10.xx.xx.xx configuration.

The second option and easier one, is to just use an external usb wifi adapter for connecting to the robot. I keep a cheap old 802.11g adapter in my bag for this reason.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
  #4   Spotlight this post!  
Unread 20-09-2013, 19:38
westin444's Avatar
westin444 westin444 is offline
C++ Programmer
AKA: Westin Miller
FRC #1983 (Skunkworks)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Seattle, WA
Posts: 7
westin444 is on a distinguished road
Send a message via MSN to westin444
Re: Version Control Systems

My team has a setup very similar to Spartatroniks'.

We use C++, Git, and GitHub.

Typically the less experienced programmers on are team are delegated to two people per laptop if we do not have enough laptops that can use the IDE. The more senior programmers typically have one person to a laptop unless they are teaching.

The way we handle testing is code gets pushed to a "canary" branch on Git once whomever programmed it feels confident it will work. Depending on the type of change this sometimes involves testing on the robot and sometimes just involves syntax checking and walking through the change.

Once someone pushes a fairly large feature to the canary branch, or someone simply feels like it is time, the canary branch is compiled and downloaded to the robot. This is where most of the bugs get ironed out; whomever is testing just fixes the bugs that come up. Once the code is working properly, with no obvious bugs, it ends up in the release candidate branch. If a major bug is found the feature is either disabled, and an issue submitted on GitHub to the author of that subsystem, or sometimes, if the schedule is tight enough, it just gets fixed then and there as well.

The release candidate branch is simply all the code that has no obvious error, no bugs that occur every time it is run, etc... Once this code has been tested multiple times, and there is a high confidence level on it's lack of bugs, it gets pushed to the stable branch.


The way we addressed connecting to the robot and to the internet is we reconfigured the robot's router to act as a DHCP server. This allows our programmers to quickly jump between the internet-enabled wireless and the robot, without having to reconfigure their IP settings.


As for a simulator for C++... there is none that I know of. There have been a couple projects that worked on one, such as the WPILib Test Harness.
  #5   Spotlight this post!  
Unread 21-09-2013, 19:42
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Re: Version Control Systems

Quote:
1. Do most teams use version control, and what do they use?
My team (Team 53) uses git (via Github) to version our code. I've never tried other version control methods but I'm so happy using git that I don't see a need to experiment. In your post you mentioned that your goal was to get more people involved in the programming. Using a version control system didn't really help in that regard (at least for our team). If you look at our Github organization > 99% of the code we wrote was contributed by just two members.
Quote:
2. Do teams use a build machine, or build server, and what?
We usually upload code directly from our personal laptops. Most of us have our own so it doesn't tend to be a problem.
Quote:
3. Is there a solution to this problem of connecting to the internet and to the robot network at the same time?
You would have to hook up the router on the robot to the internet. This could be done with an adapter of some kind I suppose.
Quote:
4. Is there a simulator that can help programmers?
Personally, I don't like to use robot simulators. They really aren't very good. I eliminate bugs by constantly rereading my code and fixing problems that I can detect before uploading.
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org

Last edited by nyaculak : 21-09-2013 at 19:43. Reason: Switched placement of two words
  #6   Spotlight this post!  
Unread 23-09-2013, 14:02
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Version Control Systems

Quote:
Originally Posted by mathmogul View Post
Each of our programmers tends to have their own laptop and they each test changes independently. Once each has been tested, changes are pushed to GitHub and merged at the end of the night. One of the more experienced students and I fix conflicts as they arise.
This is the model that we use as well.
  #7   Spotlight this post!  
Unread 23-09-2013, 16:28
Blackphantom91's Avatar
Blackphantom91 Blackphantom91 is offline
Mentor + 4 = Stuck For Life
AKA: Malcolm Stirckland
FRC #1986 (Team Titanium)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Kansas City
Posts: 232
Blackphantom91 has a spectacular aura aboutBlackphantom91 has a spectacular aura aboutBlackphantom91 has a spectacular aura about
Re: Version Control Systems

We have used github and dropbox in the past. As far as getting multiple people working on the same code it eventually goes back to the one computer 5 or so kids crowded around because they normally flock to the main programmer.

As for code retention and version control It took 4 years to get a good system developed that the students actually followed. We just have multiple copies of code in at least 3 different places.
__________________
[img*]http://i.imgur.com/Os2oTET.jpg[/img*]
  #8   Spotlight this post!  
Unread 23-09-2013, 21:04
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Version Control Systems

Quote:
Originally Posted by mathmogul View Post
Each of our programmers tends to have their own laptop and they each test changes independently. Once each has been tested, changes are pushed to GitHub and merged at the end of the night. One of the more experienced students and I fix conflicts as they arise.
We also do this. It's a really nice workflow for what we do, since it can be very modular. People work on literal features, and we merge these features in nicely.

Some related links:
http://nvie.com/posts/a-successful-git-branching-model/
https://www.atlassian.com/git/workflows
__________________
All opinions are my own.
Closed Thread


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 03:26.

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