C/C++ Updates
2011 Updates
Software updates for the 2011 FRC Season are now located on the FIRSTForge WPILib project server. To access the content you don't need a FIRSTForge account. You do not need WPILib project membership - please don't request it. The software is located in 3 areas:
- File Releases - update for C++ and Java
- Documents - all documentation
- Wiki - an FAQ covering issues related to C++ and Java
and you can access the Project Home with news and other information.
Prior to 2011
C/C++ Team Update 4.3 2/17/2010
Note: this software will work with either the V19 or V20 cRIO image to be installed.
This update is just a rebuild of the 4.2 update to resolve issues with camera and image processing symbols not showing up in the library. There are no functional changes since the previous update.
Workbench Software update download
C/C++ Team Update 4.2 2/8/2010
Note: this software requires the V19 cRIO image to be installed to operate properly!
This update fixes a compiler problem that was causing the kLineLength symbol in the DriverStationLCD class to show up as undefined. This is the only change since the previous update so if you weren't using the DriverStationLCD class there is no reason to install it.
Workbench Software update download
C/C++ Team Update 4.1 2/3/2010
Note: this software requires the V19 cRIO image to be installed to operate properly!
There have been several changes from Version 4.0 to 4.1. Most are source-code compatible meaning that you won’t have to change any of the code that you have written. One change may require you to make changes to your source code.
- Improved camera support. The AxisCamera class now is much more robust and should be much more resilient to different ordering of powering on the cRIO and the camera. Also it will be less likely to cause problems in the case of a intermittent power failure.
- The camera code now is much more efficient with less copies and image buffer allocations in the library.
- The PC Video server (images back to the dashboard) are much faster now – it should in most cases run at the full camera rate. For image sizes of 320x240 the total lag should be around 0.5 seconds. Smaller images are lower.
- The kit I2C accelerometer is now supported in the ADXL345 class.
- Note: the Axis Camera and Image class methods have been renamed to have upper case first character names with camel case for the rest of the name. The names are the same as before, but now everything is consistently using the same naming convention. This will be a one-time change and should be pretty easy to implement in any code using the vision classes.
- Many I2C cleanups in the code.
- The default gyro sensitivity now matches the 2010 kit gyro. You can still explicitly set the sensitivity in V/deg/sec using the Gyro.SetSensitivity method on the gyro class.
- Several other bug fixes and improvements throughout the library.
Getting Started with C++ (pdf) download
Workbench Software Update download
C/C++ Team Update 4.0 1/9/2010
Note: this software currently requires the V19 cRIO image to be installed to operate properly!
- WPILib User's Guide (pdf) download
- Getting Started With C++ (pdf) download
- Workbench Software Update download
- The mandatory LabVIEW update contains the new images and imaging tool to work with Java or C++.
- Source code for WPILib (zip) download
-
NetConsole Software download
-
The NetConsole tool provides a way to capture console input and output and send it over the network to a client on your
development computer. There are two parts to the NetConsole, a client and a server. The server is installed
on the cRIO, but not enabled by default in the C++ version of the image. To enable it, add "NetConsole.out;" to the
beginning of the EarlyStartupLibraries token in the ni-rt.ini file.Open up the client on a machine with the LV Runtime Engine installed and on the same subnet as the robot (anywhere the
imaging tool runs). Keep the data directory with the executable. When it loads, you'll see an IP address field at the
top that is blank.When you reboot your chassis, the broadcast UDP packets sent from the server will be received by the client. At this
point the IP address will be populated and the client can now send your keystrokes back to the server. Also, if you
have more than one server on the subnet, the client will only pay attention to packets from the IP listed at the top.
Click the Auto button to reset the IP to empty and wait for more broadcast packets.If you want to send commands to an already booted chassis and you don't want to reboot, you can just type in the
controller's address and start sending it commands.
-
C Team Update 3.1 2/25/2009
C/C++ Update 3.1.
This update has a number of bug fixes and improvements. This requires the latest cRIO update FRC_2009_v11.zip (same as previous C/C++ update below).
While we believe this code is well tested, it is impossible to know for sure how it will behave on your robot. Because robots have shipped and there may be no way of testing this update adequately on your robot until you are at a competition, please be sure to have a copy of the previous update that you can reinstall in case you have unexpected results. With that said, here are the changes:
- Many documentation updates
- Updates to PIDController class to fix bug with continuous option and added a semaphore for syncronization between task and main code. Also fixed an issue with Notifier running continuously. Added setters and getters for P, I, and D coefficients.
- Camera rotation is restricted to 0 or 180 degrees.
- Fixed a number of issues with the Notifier class causing it to not be deleted properly.
- Modified parameter names in various places to match between the header and source files.
- Fixed problem with DeleteSingletons()
- Fixed issue with synchronization objects caused by incorrect Semaphore creation. This should eliminate some eratic behavior in a number of classes include Analog sampling where multiple tasks are running at the same time.
- Counters will now return infinity when the timer in the counter detects a stalled condition. Be sure to set the MaxPeriod in any cases where this might affect program operation.
- A number of other issues with Notifiers as described here: http://forums.usfirst.org/showthread.php?t=12020
- Added a void * parameter to DigitalInput RequestInterrupts to allow passing context to an interrupt service routine.
- Set default MaxPeriod in the Ultrasonic object to allow it to not timeout between pings.
Downloads
- Workbench Updater: WorkbenchUpdate_3.1.1764.exe (19.7Mb) - remember to keep a copy of the previous update (3.0.1718) if testing at an event.
- Source code for version 3.1.1764 (360Kb)
- Documentation - also located in C:\Windriver\docs\externsions\FRC (34Mb)
C Team Update 3 1/27/2009
C/C++ Update 3.0.1718
This update adds the following fixes and updates. This update requires the latest cRIO update FRC_2009_v11.zip. It will not work without applying this update.
-
Removed the Encoder::SetReverseDirection() method. The reverse direction flag is on each of the Encoder constructors as an argument.
-
Added 1X and 2X decoding to the Encoder class to allocate counters instead of the 4 Encoder FPGA objects.
-
Fixed a bug in the TrackAPI code where FindColor was returning the first particle rather than the largest particle.
-
Fixed a bug in TrackAPI.InArea where positions were incorrectly identified
-
Added CameraDemo sample program for camera configuration
-
Updated TwoColorDemo to use fix in library for InArea
-
Added camera property set and get methods to AxisCamera.cpp
-
Added configuration file processing to BaeUtilities.cpp
- Modified Encoder::Get() method to return a normalized result (1x, 2x, and 4x will return same result)
- Fixed the default Watchdog timer value to be seconds rather than milliseconds
Downloads
- Workbench Updater: WorkbenchUpdate 3.0.1718.exe (19Mb)
-
Source code for vRC0.1718: WPILibRC0.1718SourceCode.zip (372kb)
(remember that this will only work with the FRC_2009_v11.zip cRIO image, below or with LabVIEW update) - cRIO Image updater (stand-alone without LabVIEW) - FRCNIWRUpdate3.0.a.zip (90.5 Mb)
-
Documentation - also located in c:\windriver\docs\extensions\FRC after the installation - FRC1718Docs.zip (17 Mb)
- C++ Reference as a Windows Help file with hyperlinked class diagrams
- C++ PDF Reference document
- C PDF Reference document
- FRC Vision Windows Help File
- FRC Vision API Specification
Previous Older Updates
Sample Vision Target Tracking Program (now contained in C Team Update 3)
This program is a sample program that implements two color tracking in the autonomous mode. It assumes that you are using a gimbal such as the one provided in the 2009 kit, with two servos on PWM 9 and 10.
This program follows a pink/green target during the Autonomous period. It looks for green above pink. To change to pink above green, modify the input parameter from ABOVE to BELOW. Determination of alliance (pink/green order) is left as an exercise for teams, either by mechanical means or input from the Driver Station.
This demo assumes that the camera is set up as follows: White balance: Fluorescent 1, Auto Exposure on, Brightness: 40. We had good results with the code testing in a range of lighting conditions from dim fluorescent to bright stage lighting (similar to a competition). If you are having trouble getting the program to recognize the target in some specific lighting condition, be sure to look at an image with these settings to make sure the target is not washed out (all white) or too dark. The auto exposure will tend to find a single setting based on everything in the image including dark and brightly lit backgrounds. This may tend to throw off the exposure for the target in the forground.
Download (44k) - TwoColorTrackDemo-v2.zip (Note: updated Thursday, Jan15, 2009 4:10PM EST)
Update Version 1.2 (build 1562) 1/1/2009
This update is cummulative - you do not need to install previous updates before this one, it can be installed either after a fresh install of the team DVDs or after Temporary update 1 (below). This update adds or fixes the following:
- All times have changed from whatever units they were previously in to float or double seconds. Methods in previously written code for functions like Wait() or returned periods from counters and encoders, and the Timer class, etc. need to be changed.
- Added header for GetImageData() in AxisCamera.h
- Added PanInit() and PanForTarget to BaeUtilities.cpp to support servo panning.
- Changed the RobotDrive class and supporting C functions to use Jaguars instead of Victors.
- Fixed some bugs in Timer and Ultrasonic classes.
- Added method to Encoder to reverse direction sensing for encoders mounted in opposite direction.
- C Interfaces are now implemented for most functions. There are still some of the more complex functions that are currently only accessible in C++ like AnalogTriggers.
- Added missing methods to Joystick object.
- Added demo for viewing images from the camera on the LabVIEW dashboard program.
- Added PCVideoServer class to send images to the dashboard. To use this, the camera must be initialized.
- Added Task class for creating and manipulating tasks in C/C++ programs. Tasks created with these objects will automatically be deleted when the parent object is deleted.
- Added DashBoard class for creating the robot-side of dashboard programs in C/C++ to send data back to the LabVIEW dashboard program.
- Added DashBoard example program showing the method of packing data to send it to the dashbaord application. Also includes a class that can pack in the format of the default DashBoard application.
- Modified the ArcadeDrive code in the RobotDrive object (and corresponding C functions) to use an algorithm that prevents overflow when joysticks are set to full X and Y (full 45 degree angle). Also optionally will modify the inputs to be more sensitive for low speed driving. This is compatible with the LabVIEW version of WPILib.
- Improved the PIDController class to include a user settable loop time parameter especially useful for integral and proportional control.
- New documents including a PDF version of the C++ Reference Manual, the C Reference Manual, and updated version of the C/C++ Users Guide.
- Sample programs have been renamed to be more descriptive and understandable.
Download (requires new cRIO image - see below):
-
WorkbenchUpdateV1.2.1562.exe (8.2mb) - both Labview and C++ users must
- download the LabVIEW upadate, FRCLabVIEWUpdate2.0.zip from NI,
- Run it, then
- Run the Labview CRIO imaging tool to update their CRIO (with the new FRC_2009_V7.ZIP image file).
-
Documentation:
- C/C++ Programming Guide
- C++ Reference Manual (doxygen generated)
- C Reference Manual (doxygen generated)
- FRC Vision API Specification
-
NIVisionCVI help file
- Source code for build 1562.
We will soon have a SourceForge server running and we'll post messages when that is running. In the mean time, please don't try to sign up for the WPI Campus SourceForge server. We'll let you know when the FIRST project server is going.
For those not installing LabVIEW, the new image and installer can be installed by using this update (90mb). Remember, the new cRIO image is required for this version of WPILib.
Temporary update 1 (12/10/2008)
You must install this update after the reflashing the cRIO with the image contained in FRCLabVIEWUpdate1.0. This is a temporary update that will be replaced shortly with the final version 1 C/C++ update. Check back in a few days for the version 1 update.
Download:
- Beta update 5 (16mb)
- Source code for beta release
This code will be replaced shortly with a more complete version (see notes below).
C/C++ Programmer Reference Guide (generated from doxygen) - reference guide for all the classes and methods in the library. C and Vision will be updated shortly.
C/C++ Users Guide - describes the use of the library, using Wind River Workbench, and general tips and techniques. Also updating.
Mandatory cRIO Image Updater (you must update the cRIO image before using the above Beta Update 5. It can either be done with the following imaging tool or by using the imaging tool installed with the LabVIEW update FRCLabVIEWUpdate1.0)
Download: FRCNIWRUpdate1.0 (88mb) - do not use this updater for V1.2 or newer of the C/C++ libraries!
Notes about the update
-
The following C++ classes should not be used:
- Task
- C wrappers are only partially implemented and will be complete in the next update.
- Times in functions like Wait and in periods for encoders, counters, ultrasonic, etc. will be changing to floating point seconds for units rather than milliseconds and microseconds.
- Documentation will install in the C:\WindRiver\docs\extensions\FRC
- To use the C/C++ update you must reflash the cRIO image to version 1.0 from the above imaging tool or from the LabVIEW Update 1.0
Maintained by webmaster@wpi.edu
Last modified: January 09, 2011 11:49:09