A Word from Software

Posted on Posted in 2015 Control System, Beta testing, Software

So far, most of the things on the WildStang beta blog have been about the electrical components of the new control system. But now that we have the control system mounted in last year’s robot, the software subteam has had a chance to play around with all the new goodies. So, without further ado, here’s our impression of the 2015 control system from the software perspective.

Eclipse

In past years, we used NetBeans as the IDE to develop software for the robot. This year, FIRST made the shift to Eclipse. I won’t launch into the debate about which IDE is best (enough’s been said about that), but needless to say, Eclipse is working just as well as NetBeans did. The only changes we’ll probably have to make to account for Eclipse are to our simulation setup, which we use to test code before deploying it to the robot. The setup for that was pretty NetBeans-specific,  but it should be easy enough to port over to Eclipse.

Finally, a modern version of Java

In past years, we had to use a horribly outdated version of Java (1.3, if anyone’s wondering). It also didn’t have or support the full set of Java SE APIs. Thankfully, the new control system included Java 8 SE, with the full set of Java APIs. For our team, this is most significant because of the networking and file system APIs. The APIs from the old control system worked, but they were ugly and somewhat unintuitive. Being able to use the standard ones will make our life much easier.

Changes to WPILib

As you may know, WPILib provides the interface between the code we write and the actual robot hardware. The library has been updated to work with the new control system, and includes a few changes that teams should take note of.

  • Module numbers: Because the roboRIO has no concept of modules like the cRIO did, the constructors for most inputs and outputs no longer accept a module number as a parameter.
  • I/O indexes: I/O ports now use 0-based indexes (numbering starts at 0, not 1), so make sure you update your code with the appropriate ports.
  • CAN bus access: This year, many parts of the robot communicate over a CAN bus, and WPILib reportedly includes the ability to access the data flowing over that CAN bus. Although we haven’t tried this out yet, it should prove useful to teams to access more data about exactly what’s happening with their robot.

Connecting to the roboRIO

In past years, teams had to set their laptop to a static IP every time they wanted to connect to the robot. This year brings some changes to that – use of the mDNS protocol.  This allows the roboRIO to be discovered regardless of IP address.

What this means for teams is that you no longer have to muck around with IP configurations to connect to your robot. You can just plug it in (via USB or Ethernet) and it will magically work. Huzzah!

Miscellaneous notes

FTP

With the old control system, you could FTP into the robot with a blank username and password. This year, however, you have to use the username “anonymous” with a blank password. We only found this out after we reported our inability to log in as a bug, as this isn’t documented anywhere (yet). We’re sure this will be documented by the time the season starts.

A really weird bug

As we were trying to get last year’s code up and running on the new control system, we ran into a weird bug where all the integers we passed into a specific function were being incremented by one. We’re still trying to determine how to reproduce that bug, so when we do, we’ll post an update on the blog and submit a bug report to FIRST.

Conclusion

So far, we’ve had a great experience with the new control system. The new version of Java and automatic network configuration make our lives as programmers much easier, the new IDE works well, and there are some exciting new APIs for us devs. There are a few quirks, but that’s to be expected with beta software. We’ll keep the blog updated with any new information we have!