Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   The CCRE: A comprehensive award-winning robot code framework (http://www.chiefdelphi.com/forums/showthread.php?t=130813)

Cel Skeggs 21-01-2015 21:42

Re: The CCRE: A comprehensive award-winning robot code framework
 
CCRE release 2.5.0 is out! The main feature here is RS232 support.

Code:

Release of CCRE with API v2.5.0.

Major Changelog:

* Support for RS232 ports on cRIO and roboRIO.
* Infrastructure to support Serial IO in general.
* ExpirationTimers now allow for tunable delays.
* A driver for the UM7LT heading sensor is now included.

Minor Changelog:

* CArrayUtils now has sorting methods.
* Igneous now acquires method information during caller analysis, meaning that logging messages on the cRIO now include the line number as well as the file name.
* Added direct isDoingWork() method to CollapsingWorkerThreads.
* Removed old non-RawIO roboRIO IgneousLauncherImpl.
* Added cRIO backporting support for java.util.Arrays.
* Miscellaneous cRIO backporting support.
* Moved most TODOs from the code into Trello and GitHub.
* Refactored CluckPublisher subscribers to have less code duplication by factoring out `CluckRMTSubscriber`.
* Most of Cluck now has an automated testing system set up, invokable via the PoultryInspector
* A unit test for CArrayUtils sort methods has been added.
* CLinkedList now has a `setAll` method used for bulk-reloading data.
* Miscellaneous PoultryInspector graphical code cleanup.
* Added missing documentation for Beeper.

Bugfixes:

* roboRIO RawIOIgneousLauncher no longer stores state statically.
* If cRIO library builds fail, they will no longer silently allow robot projects to still be compiled with the old version.
* Fixed a race condition in the Emulator's redrawing code.

If any other teams are actively using the CCRE, please let us know!

Cel Skeggs 08-02-2015 20:19

Re: The CCRE: A comprehensive award-winning robot code framework
 
CCRE release 2.6.0 is out! A number of features have been added - CAN Talons, RConf, StateMachines, additional PoultryInspector configuration, log fetching, etc.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Code:

Release of CCRE with API v2.6.0.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Major Changelog:

* Support for CAN Talons on the roboRIO. cRIO will not support them in the near future.
* RConf (Remote Configuration) subsystem introduced.
* StateMachine is now provided for middle-complexity subsystems.
* PoultryInspector now allows for range configuration.
* PoultryInspector components now configured via RConf views.
* Support for multiple PCMs/Solenoid Modules.
* Support for Joystick POV hats.
* Support for log fetching from roboRIO targets. (Autoruns on code download.)
* Code coverage for tests can now be generated. Tests expanded to cover approximately 30% of codebase.
* Prototype (not used by default) version of roboRIO target that bypasses the majority of WPILib, for a theoretically more stable experience. Practically, don't use this yet for anything real.

Minor Changelog:

* Deprecated makeAccelerometerAxis, as it is so trivial that it shouldn't have a builtin method.
* Removed ComputationBenchmark. It was completely unused and not particularly helpful in any way.
* InstinctModule.waitUntilNot.
* BooleanStatus.asInput, asOutput, asInvertedInput, asInvertedOutput.
* EventStatus.countConsumers.
* BooleanMixing.xorBooleans now supports BooleanInputs, not just BooleanInputPolls.
* FloatMixing.floatIsOutsideRange, floatIsInRange, normalizeFloat now support Inputs, not just InputPolls.
* Mixing.quadSelect now supports Inputs, not just InputPolls, at least for the selection parameters and return value.
* BooleanMixing.setWhile, setWhileNot.
* FloatMixing.setWhile, setWhileNot.
* BooleanMixing.toggleEvent.
* ExpirationTimer.terminate, PauseTimer.terminate.
* Igneous reports the name of the main class at startup.
* Fixed up Deprecation notes.
* Usage reporting now includes CCRE note.
* WPILib version number now includes CCRE version too.
* Extracted AbstractJoystickWithPOV from various IJoystick implementations.
* Automatic CAN error recovery - CAN motors are bypassed temporarily on exception-throwing communication failures, to keep the rest of the code running. Certain other errors are logged and ignored.
* Removed testing package from cRIO builds.
* ExtendedMotors now support ANY_FAULT and COMMS_FAULT.
* ExtendedMotors no longer include _PID in mode names.
* Now specified that ExtendedMotors report temperature in Celsius, if at all.
* A number of ExtendedMotor methods no longer throw ExtendedMotorFailureException.
* ExtendedMotorFailureException is now a checked exception. (Since CAN functionality is not an officially finalized API, changes like this don't officially break backwards compatibility.)
* ByteFiddling.asInt32LE, ByteFiddling.asInt32BE.
* Made IgneousLauncherHolder publicly accessible.
* TestingException now always requires an argument. This was only internally used, so this shouldn't be an issue.
* PoultryInspector float-based components now accept ranges.
* Initial version of a deeper example of how to use the CCRE's more complex features on a simple robot.
* Joystick access example added.
* Added inversion option to BooleanDisplayComponent.
* Added exclamation point to the warning light view for aesthetics.

Bugfixes:

* Fixed broken serialization on a variety of PoultryInspector and Cluck systems.
* Fixed unbalanced SpinDevice weighting.
* Removed extraneous debugging statement in DeviceListMain.
* Improved Ticker synchronization.
* Fixed NaN-propagation bug in PIDControl that could permanently deactivate the PID.
* Clarified IJoystick documentation.
* Code is much less likely to crash if CAN devices cannot be contacted at startup.
* Removed some warnings for missing Javadoc in places where it doesn't make sense to be added.
* Miscellaneous warning fixes.
* Miscellaneous Javadoc fixes.

We'll probably have another release around the end of build season, but no promises.

Also, keep in mind that downloadable PoultryInspector builds for your Driver Station are available from our GitHub page.

Cel Skeggs 23-02-2015 21:11

Re: The CCRE: A comprehensive award-winning robot code framework
 
CCRE release 2.7.0 is out! This release is light on features, and heavy on bugfixes and minor improvements, especially reliability improvements.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Code:

Release of CCRE with API v2.7.0.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Major Changelog:

* Access to information on roboRIO power rails.
* Emulator supports using physical Joysticks using JInput.

Minor Changelog:

* Most PoultryInspector components can be closed by clicking on a red circle.
* `RConfable` autorefreshing is now possible.
* `InstinctMultiModule` now allows for selecting autonomous modes over RConf.
* Packages built by the CCRE now include version numbers that can be programmatically queried.
* CCRE version numbers are now always included on roboRIO version reporting.
* The Direct roboRIO implementation now reuses `IntBuffer`s most of the time instead of allocating new ones.
* Shorter warnings when the HAL reports a warning.
* Set up `CluckTCPClient` to allow some useful subclassing.
* `CollapsingWorkerThread`s can now be terminated.
* Improved UM7LT driver reliability and automated recovery.
* Optional tracing mode in PoultryInspector for debugging Cluck traffic.
* PoultryInspector now reports network usage rate instead of sum usage.
* `CountingNetworkProvider` provides rate calculation.
* A `TopLevelRConfComponent` is provided that allows object browsing and some internal access in the PoultryInspector for emergency debugging.
* Added dragging-out of CluckRefs from `RConfable`s in PoultryInspector.
* An option in the PoultryInspector to not try to connect at all is now provided.
* The `org.team1540.tester.Tester` example now publishes controller power information.

Bugfixes:

* Fixed merged control components refusing to resend the same value, even if the remote end changed.
* Fixed crashes during init on the Emulator not logging the error.
* Fixed opening `DefaultNetworkProvider` connections sometimes waiting forever instead of timing out.
* Fixed rare crash due to concurrent modification of global logging targets.
* Cluck endpoints no longer arbitrarily fail to refresh after robot restart.
* roboRIO triggering mode start events no longer trigger constantly.
* Old log tarfiles are now removed from roboRIO after being retrieved.
* Fixed serialization of subscribed `RConfable`s and `RemoteProcedure`s.
* Fixed infinite recursion during failed remote logging.
* Added warnings for incorrectly-targeted Cluck messages instead of blindly accepting them.
* `*Mixing` methods now check for null arguments.
* Better error reporting in case `ByteFiddling.toHex` fails again.
* Fixed PoultryInspector trying to reconnect before a full network address was entered.
* Miscellaneous bugfixes and code cleanup.

A notable feature here is the ability to use physical joysticks with the Emulator: once plugged in, hold any button down and click on the UNATTACHED label on the Emulator.

Our first competition is this week. If anything breaks, we'll have a release out ASAP to resolve it. If you need any tech support during the event, keep in mind that I won't have access to email most of the day and might not see your message. If you will need faster responses to any issues encountered during the event, please contact me beforehand to ask for contact details.

Cel Skeggs 09-03-2015 20:24

Re: The CCRE: A comprehensive award-winning robot code framework
 
CCRE release 2.7.1 is out! This release contains a couple of RConf-related bugfixes and removes the prebuilt Javadoc folder. You can access the Javadoc online.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Code:

Release of CCRE with API v2.7.1.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Major Changelog:

* Removed Javadoc from repository - generated files don't go here. Use the online version.

Minor Changelog:

* None.

Bugfixes:

* Removed most of the log spam from RConfComponents that can't connect.
* Fixed RConf-based autonomous mode switcher.

The CCRE had no issues during our last event except the minor issues fixed in this release. We expect the same for our next event.

Cel Skeggs 28-04-2015 19:12

Re: The CCRE: A comprehensive award-winning robot code framework
 
After over a month since 2.7.1, CCRE release 2.8.0 is out! This release adds interrupts and improves autonomous loop timing!

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Code:

Release of CCRE with API v2.8.0.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Major Changelog:

* Added support for interrupts on Digital Inputs!
* Added "recoverable events" that extend the recovery subsystem to be smarter and work better with highly-layered channel code.
* Disconnected autonomous mode cycles from periodic events.

Minor Changelog:

* Added ability to check if robot is connected to an FMS (as opposed to running outside of an official field.)
* Made `waitForEvent` return quicker and not poll.
* Added `setAutoCycleRate` and `getAutoCycleRate` to InstinctModule to control update rates of autonomous modes.
* Deprecated `InstinctModule.updateWhen`.
* Increased range of Emulator's current channels from 20A to 100A, to better reflect real ranges.
* Made mode test channels have more consistent behavior.

Bugfixes:

* Fixed failure to build cRIO libraries preventing use of roboRIO.
* Added missing null check to `filterEvent`.
* Fixed miscellaneous typos.
* Fixed miscellaneous compilation warnings.
* Added missing `serialVersionUID` to some PoultryInspector components.
* Fixed PoultryInspector lock-up if multiple CluckUnitTestComponents are dragged out.

Our robot code, which contains a very substantial demonstration of CCRE use, is posted! It's not perfect CCRE code by any means, but it successfully ran what was probably the most complicated robot in our team's history, with a level of automation that we haven't achieved before.

We're planning future direction of the CCRE at this time. If you have any input, please let us know by posting in this thread!

Cel Skeggs 13-05-2015 11:12

Re: The CCRE: A comprehensive award-winning robot code framework
 
CCRE release 2.8.1 is out! This is primarily a bugfix release in preparation for a larger 2.9.0 release.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Code:

Release of CCRE with API v2.8.1.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Documentation changes:

* First tutorial sequence now assumes use of a roboRIO instead of use of a cRIO. (#24)

Minor Features:

* Emulator outputs now respect disabled mode! (#48)

Bugfixes:

* Cluck no longer propagates errors through transmission.
* Improved support for Linux networking implementations.
* Better error insulation for StorageProvider.
* Fixed unexplained crash with null keys in CHashMap. Now it's an explained crash.
* Updated version of Cobertura.
* Added some missing buttons to emulator.
* Fixed pointer-out-of-bounds bug in the PoultryInspector rendering of merged IO. (#26)
* Fixed .gitignore to exclude PoultryInspector logs.
* Fixed PoultryInspector incorrectly displaying RConfComponents that contain inline AUTO_REFRESH entries.

New Tests:

* Test of file saving/loading infrastructure.

Notably, this release accompanies a tutorial sequence updated for the roboRIO and fixes for most of the known issues in the CCRE. (Except for fixes that require implementation of new features and APIs to fix.)

The CCRE's bugtracking and enhancement-tracking have been moved from Trello to GitHub.

We also plan to set up testbed robots for the cRIO and roboRIO, which should allow for unit testing of the complete stack, which should mean more rapid releases and fewer bugs.

cadandcookies 13-05-2015 13:44

Re: The CCRE: A comprehensive award-winning robot code framework
 
Just wanted to say that though my team isn't currently using CCRE, I'm planning on trying it out this summer and am very thankful that you've chosen to release your framework for the benefit of all. Thank you and keep up the good work!

Cel Skeggs 14-05-2015 13:31

Re: The CCRE: A comprehensive award-winning robot code framework
 
Quote:

Originally Posted by cadandcookies (Post 1481881)
Just wanted to say that though my team isn't currently using CCRE, I'm planning on trying it out this summer and am very thankful that you've chosen to release your framework for the benefit of all. Thank you and keep up the good work!

Great! Please be sure to let us know your experiences with it.

If you have any issues or questions, you can either post them here or email me at robotics [AT] colbyskeggs [DOT] com. (Email obfuscated because spam.)

We plan to release CCRE 2.9.0 in a few weeks, and hopefully CCRE 3.0.0 a few weeks after that (maybe with CCRE 2.10.0 in-between.) We use semantic versioning, so 3.0.0 will be a point where we may break some amount of backwards compatibility. (There are things that we ought to change that we haven't because we've been trying to maintain backwards compatibility.)

Cel Skeggs 31-07-2015 02:14

Re: The CCRE: A comprehensive award-winning robot code framework
 
Finally! CCRE release 2.9.0 is out! Besides lots and lots of minor improvements and bugfixes, this release includes the major features of Control Bindings and Mecanum support!

Full changelog:
Code:

Release of CCRE with API 2.9.0.

WARNING: This release has not been tested on the cRIO due to a lack of a cRIO robot to test on. If you need cRIO functionality and don't have time to debug, refrain from upgrading.

Major changes:

* Added ControlBinding module.
* Added Mecanum implementation to DriverImpls.
* Added access to Joysticks 5 & 6 on the roboRIO. This still doesn't work on the cRIO even if a new DS is used.
* Added logging pane to emulator.

Minor changes:

* Added onInitComplete event to Igneous.
* Added addAllIfNotFound() to ConcurrentDispatchArray.
* Added asOutput()/asInput() to EventStatus and FloatStatus to match BooleanStatus.
* Added null checks to FloatFilter.
* Added invalid-parameter checks to some FloatMixing methods.
* Added CArrayUtils.collectIterable.
* Added LogLevel.next().
* Added ability to change bounds for PoultryInspector FloatControlComponent.
* Added ability to control LoggingTargets and RemoteProcedures from the PoultryInspector.
* Changed StorageProvider to accept arbitrary names for storage segments.
* Improved networking diagnostics.
* Expanded EventOutputRecoverable subsystem to include more EventOutputs. (debounce)
* Renamed BooleanMixing.ignoredBooleanOutput to BooleanMixing.ignored.
* Deprecated BooleanMixing.ignoredBooleanOutput.
* Renamed FloatMixing.ignoredFloatOutput to FloatMixing.ignored.
* Deprecated FloatMixing.ignoredFloatOutput.
* Deprecated EventStatus.countConsumers.
* Upgraded to Cobertura 2.1.1.
* Added deactivated QuickDeploy implementation.
* Added --failfast option to testing harness.
* Added assertFloatsNear to testing harness.
* Added TextBoxComponent to emulator.
* Added ccre.log.Logger to default list of imports in RobotTemplate.
* Deprecated CCRE.jar dispatch launcher.
* Deprecated RLoad mechanism.
* Deprecated Tokenizer.
* Deprecated Utils.dynamicCast.
* Deprecated Utils.getGenericClass.

Bugfixes:

* Fixed rendering glitches of PoultryInspector FloatControlComponent.
* Stopped attempting the impossible task of binding to port 80 on Linux and Mac OS.
* Specified behavior of CallerInfo more accurately.
* Improved edge case handling of DefaultThrowablePrinter.
* Improved behavior of ThrowablePrinter in exceptional scenarios.
* Improved edge case handling of CHashMap.
* Fixed DefaultStorageSegment handling of null values.
* Fixed completely broken FloatMixing.onUpdate() implementation.
* Simplified one FloatMixing.select() implementation.
* Improved error handling in PauseTimer main loop.
* Updated javadoc for DriverImpls.
* Fixed race conditions in EventStatus, MultipleSourceBooleanController, FloatMixing.select(), and PauseTimer.
* Fixed emulator race conditions.
* Fixed issue in check-header.sh caused by cRIO build.
* Clarified FloatMixing semantics on edge cases.
* Clarified *Input semantics on edge cases.
* Removed premature optimization of *Status objects.
* Clarified RemoteProcedure documentation.
* Slightly clarified licensing.
* Fixed miscellaneous typos.

New & improved tests:

* Added TestFilters.
* Added TestFloatMixing.
* Added TestWorkarounds.
* Added TestLineCollectorOutputStream.
* Added TestUniqueIds.
* Improved TestBooleanMixing.
* Improved TestPauseTimer.
* Expanded TestBooleanStatus.
* Expanded TestFloatStatus.
* Expanded TestMixing.
* Improved and expanded TestEventMixing.
* Improved and expanded TestEventStatus.
* Rewrote and expanded TestUtils.
* Rewrote, expanded, and improved TestCHashMap

The control binding system lets your drivers configure their OI to their specifications, without (too much) programmer involvement. A programmer can simply write code like:

Code:

// ...
    public static final ControlBindingCreator driveControls = Igneous.makeControlBindingCreator("Drive Code");
// ...
    BooleanInput highGearButton = driveControls.addBoolean("High Gear");
// ...
    FloatInputPoll leftDriveAxis = driveControls.addFloat("Drive Axis Left");
// ...

Then, on the running robot, a user can select any buttons/axes to use for specific controls by holding the button and selecting the control. And then press a button to save their configuration permanently, so this works even if you turn off your robot.



And, of course, the emulator will just display these controls as the names you gave them, which means that you don't have to remember the button and axis numbers of everything during emulation!

Cel Skeggs 31-08-2015 14:34

Re: The CCRE: A comprehensive award-winning robot code framework
 
I've been working on some prototypes for the 3.0.0 release. This release includes a lot of improvements to the Mixing system, namely by getting rid of the Mixing, FloatMixing, BooleanMixing, and EventMixing classes, and using Java 8's new default interfaces to implement the same functionality on the objects themselves.

As an example of how much this can help:

Code:

Mixing.select(calibrating, FloatMixing.multiplication.of(FloatMixing.multiplication.of(p, (FloatInput) dconstant), (FloatInput) period), FloatMixing.always(0));
becomes

Code:

calibrating.toFloat(p.multipliedBy(dconstant).multipliedBy(period), 0);
which is much easier to understand and has a lot less boilerplate!

Also, the Input/InputPoll distinction is going away, which means (for example) that code will no longer be scattered with FloatMixing.createDispatch and BooleanMixing.createDispatch everywhere!

To replace the previous easy of use of InputPolls that is now going away, code like:

Code:

BooleanMixing.createDispatch(new BooleanInputPoll() {
    public boolean get() {
        return /* some expression */;
    }
}, Igneous.globalPeriodic)

is now written as

Code:

new DerivedBooleanInput(/* dependent inputs */) {
    protected boolean apply() {
        return /* same expression as above */;
    }
}

This is slightly more complicated in that you have to specify when the value could update, but it ultimately will lead to better, easier-to-understand code and less overhead.

Cel Skeggs 21-10-2015 18:50

Re: The CCRE: A comprehensive award-winning robot code framework
 
For anyone interested, I will be presenting about the CCRE at FIRSTFare this weekend! (FIRSTFare is a PNW robotics conference, for those who don't know.)

I will post the slides afterwards, and might record either the presentation itself or a practice run for anyone who can't make it.

(Also, work on 3.0.0 is going strong! Feel free to come take a look and/or help out on our GitHub repo!)

Hsifeulbhsifder 21-10-2015 19:25

Re: The CCRE: A comprehensive award-winning robot code framework
 
Quick Question, roughly how long is the compile and deploy time?

Cel Skeggs 21-10-2015 19:31

Re: The CCRE: A comprehensive award-winning robot code framework
 
Quote:

Originally Posted by Hsifeulbhsifder (Post 1501199)
Quick Question, roughly how long is the compile and deploy time?

On CCRE v2.9.0, the current stable version, it's a bit longer than WPILib but not by much.

On the latest development version, which will be released in a couple of weeks (probably), it's four seconds. No, that's not a typo. We rewrote the deployment system from the ground up for this version, and the benefits show.

Obviously, YMMV, but that's how it worked in my last test with a fairly typical setup.

Hsifeulbhsifder 21-10-2015 20:55

Re: The CCRE: A comprehensive award-winning robot code framework
 
That's pretty impressive, our current software takes about 1-2 seconds but can be loaded dynamically, so I was wondering if the CCRE can be loaded dynamically as well i.e. Changing code while the robot is running and not breaking. Although, we require dynamic linkage to a separate binary, and I was wondering if you guys have a better solution. Thanks for the help.

Cel Skeggs 21-10-2015 22:42

Re: The CCRE: A comprehensive award-winning robot code framework
 
Quote:

Originally Posted by Hsifeulbhsifder (Post 1501218)
That's pretty impressive, our current software takes about 1-2 seconds but can be loaded dynamically, so I was wondering if the CCRE can be loaded dynamically as well i.e. Changing code while the robot is running and not breaking. Although, we require dynamic linkage to a separate binary, and I was wondering if you guys have a better solution. Thanks for the help.

It's possible, but we also provide easy ways to tune and store values on the robot, so most tweaking jobs can be done without code downloads. Plus, once you get below fiveish seconds, it probably doesn't matter too much exactly how low you go.

The reason that our deployment system is so fast in comparison to WPILib's system is that we only open two SSH connections - one for 'admin' and one for 'lvuser', but we could probably find a way to only use one of those. We could probably also parallelize the different deployment steps, and maybe also check hashes to see if we need to download at all.

We aren't planning to improve deployment much more right now, as we've been focusing our development time on improving our core framework as much as possible. Once we release v3.0.0, we plan to keep backwards compatibility for a relatively long time, which limits the extent of our possible refactorings.


All times are GMT -5. The time now is 23:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi