Commit Graph

4124 Commits

Author SHA1 Message Date
Peter Johnson
e127bac7fd [sim] Properly initialize AnalogTrigger (#2646) 2020-08-19 21:58:07 -07:00
Prateek Machiraju
bccf13bf67 [build] Run unit tests in CMake build (#2644) 2020-08-19 20:47:26 -07:00
David Vo
950bbd6dc2 [wpilibj] Fix joystick button edge synchronisation (#2433) 2020-08-19 19:46:51 -07:00
Austin Shalit
e680ba85fa [build] Apply temporary JDK arch fix (#2643) 2020-08-19 19:43:53 -07:00
Prateek Machiraju
b23ede7d50 [wpimath] Remove unnecessary copying in constraints (#2645) 2020-08-19 19:36:58 -07:00
Matt
73047d8b35 [wpiutil] Fix WPIUtilJNI.now() implementation (#2640) 2020-08-16 19:40:11 -07:00
Matt
ef5e0c2e75 [wpimath] Remove duplicate WPIMathJNI class (#2639) 2020-08-16 17:16:53 -07:00
Peter Johnson
dc9e560f9b [sim] Add callback for NotifyNewData 2020-08-15 13:47:30 -07:00
Peter Johnson
ae5b07ba01 [hal] Add stubs for sim joysticks and match info on Rio 2020-08-15 13:47:30 -07:00
Austin Shalit
3384c23a56 [build] Specify --tags on fetch and add version sanity check (#2638) 2020-08-15 13:46:41 -07:00
Tyler Veness
c2259d42a8 [wpilib] Add Toggle() function to solenoid classes (#2635)
Toggling a solenoid on a button press is a common idiom, so this
provides a more readable way of accomplishing that.
2020-08-15 08:16:32 -07:00
Austin Shalit
370e9d089f [build] Remove Azure Pipelines CI 2020-08-15 06:14:51 -07:00
Austin Shalit
cab8b18c68 [build] Add GitHub Actions CI Workflow
Testing Actions

use home env variable

Use ~ instead of home

update upload-artifact to v2

Do not specifiy branch glob

Fix architecture typo

Simplify on block

Add apt-get update step

Revert tolerance increase

Add publishing

Add vcpkg
2020-08-15 06:14:51 -07:00
Matt
3b283ab9aa [wpimath] Add core State-space classes (#2614)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
Co-authored-by: Claudius Tewari <cttewari@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
2020-08-14 23:40:33 -07:00
Matt
e5b84e2f87 [wpimath] Use project includes for units, Drake, Eigen (#2634) 2020-08-08 11:54:03 -07:00
Peter Johnson
f86417d791 [wpimath] Move MathShared.h to wpimath/ directory
It was confusing to have it in math/ when the std <math> header exists.
2020-08-07 12:02:02 -07:00
Peter Johnson
8dc3d23831 [wpimath] Move DrakeJNI to edu.wpi.first.math.WPIMathJNI 2020-08-07 12:02:02 -07:00
Peter Johnson
42993b15c6 [wpimath] Move math functionality into new wpimath library (#2629)
The wpimath library is a new library designed to separate the reusable math functionality
from the common utility library (wpiutil) and the hardware-dependent library (wpilibc/j).

Package names / include file names were NOT changed to minimize breakage.  In a future year
it would be good to revamp these for a more uniform user experience and to reduce the risk
of accidental naming conflicts.

While theoretically all of this functionality could be placed into wpiutil, several pieces
of this library (e.g. DARE) are very time-consuming to compile, so it's nice to avoid this
expense for users who only want cscore or ntcore.  It also allows for easy future separation
of build tasks vs number of workers on memory-constrained machines.

This moves the following functionality from wpiutil into wpimath:
- Eigen
- ejml
- Drake
- DARE
- wpiutil.math package (Matrix etc)
- units

And the following functionality from wpilibc/j into wpimath:
- Geometry
- Kinematics
- Spline
- Trajectory
- LinearFilter
- MedianFilter
- Feed-forward controllers
2020-08-06 23:57:39 -07:00
Peter Johnson
ad817d4f23 [sim] Map wpi::Now() to simulated FPGA time (#2631)
This matches on-robot behavior for things like NetworkTables timestamps.
2020-08-06 23:03:42 -07:00
Peter Johnson
77954bb3dd [wpiutil] Add JNI wrapper for wpi::Now() (#2632) 2020-08-06 21:37:38 -07:00
Banks T
52f7a62e1e [wpiutil] Allow aarch64 platform on any OS (#2625) 2020-08-05 13:45:09 -07:00
Peter Johnson
1b8ceb36fc [sim] Add callbacks for joysticks and match info (#2628) 2020-08-03 22:38:48 -07:00
Gabe Deml
ceea1f9d44 [sim] Add Mechanism2D to Simulation GUI (#2607) 2020-08-03 22:38:12 -07:00
Tyler Veness
2f81f2b78a [wpilib] Fix timestamp slew in SlewRateLimiter (#2627)
Fixes #2626.
2020-08-02 00:06:52 -07:00
Prateek Machiraju
aba035eb3d [command] Modify swerve and mecanum commands to use new controller 2020-08-02 00:03:21 -07:00
Prateek Machiraju
5ca2702083 [wpilib] Add HolonomicDriveController class and tests 2020-08-02 00:03:21 -07:00
Prateek Machiraju
af588adce5 [wpiutil] Add angle normalization method 2020-08-02 00:03:21 -07:00
carbotaniuman
399684a58f [wpilibc] Make SendableChooser movable (#2621)
SendableChooserBase was movable; it was an oversight that SendableChooser was not.
2020-07-30 11:34:07 -07:00
Peter Johnson
5cf4c16f5b [wpilibj] Suppress serialVersionUID warnings (#2618)
These are all classes (e.g. Exception classes) which will never be serialized.
2020-07-26 17:06:17 -07:00
Peter Johnson
0fe2319dfc [wpilibj] Use try with resources for Java tests (#2612) 2020-07-24 13:07:11 -07:00
Matt
e759dad019 [wpiutil] Add Drake and Drake JNI (#2613)
Drake is a collection of tools for analyzing robot dynamics and building control systems.
See https://drake.mit.edu/ for details.

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2020-07-24 08:34:30 -07:00
Austin Shalit
0c18abed33 [build] Double gradle build max heap size to 1G (#2616)
The Gradle heap size default is 512M, and that's becoming too small for our builds.

Developers who want to override this without editing the project's build.gradle can
override these settings with gradle.properties in GRADLE_USER_HOME (see
https://docs.gradle.org/current/userguide/build_environment.html for details).
2020-07-24 08:30:22 -07:00
Austin Shalit
89dad2fd84 [build] Use artifactory doxygen mirror (#2600)
This avoids the occasional failures we've seen in downloading doxygen during CI.

Also update to doxygen 1.8.18.
2020-07-23 18:10:32 -07:00
Thad House
a6a71f8c76 [hal] Fix RoboRIO notifier never starting (#2611) 2020-07-23 18:09:00 -07:00
Zhiquan Yeo
1fee190fd0 [wpiutil] Add MIME type utility (#2608)
Co-authored-by: Zhiquan Yeo <zyeo8@bloomberg.net>
2020-07-23 10:00:47 -07:00
Peter Johnson
23ba3ca19e [wpilib] Change Watchdog to use HAL notifier (#2602)
This makes it follow simulation timing instead of wall clock time.
2020-07-21 22:58:16 -07:00
Peter Johnson
33d8363297 [sim] Fix HAL notifier race condition (#2606)
WaitForNotifierAlarm was waiting on the CV without first checking to see if
the exit condition was met.
2020-07-20 23:30:14 -07:00
Tyler Veness
49dcf7cf59 [command] Speed up MecanumControllerCommand and SwerveControllerCommand tests (#2604)
Currently, these two tests take several seconds to complete and fail
intermittently in Windows CI. This is caused by relying on wall clock
time.

Sampling the trajectory with wall clock time means the simulation must
run for several seconds to reach the end of the trajectory. Also, the
controller can become unstable when Windows CI experiences process
scheduling delays of several hundred milliseconds. Feedback controllers
don't cope well with large delays on systems with fast dynamics.

This patch uses the mocking functionality of frc::Timer to advance the
clock by 5ms at every timestep instead of using the wall clock time.
This has two benefits:

1. The tests complete much faster because the simulation can step
   forward faster than real time.
2. The controller is more stable because the sample period is uniform,
   which should fix the occasional failures.
2020-07-18 21:58:37 -07:00
Peter Johnson
9778445a74 [sim] Change stepTiming to take seconds (#2599)
This is consistent with other WPILib timer functions.
2020-07-16 22:15:59 -07:00
Peter Johnson
c2cc90b27d [sim] Move WPILib C++ sim implementations out of line (#2598)
This makes the sim classes consistent with the rest of the WPILibC classes.
2020-07-15 23:48:09 -07:00
Peter Johnson
b9feb81226 [sim] Add joystick simulation support (#2595)
This adds joystick functions to DriverStationSim, and new GenericHIDSim,
JoystickSim, and XboxControllerSim classes.
2020-07-15 00:33:57 -07:00
sciencewhiz
b06ddcdd86 [wpilib] Improve and sync AnalogPotentiometer docs (NFC) (#2580) 2020-07-13 22:00:53 -07:00
Peter Johnson
16ef372b53 [hal] Merge WaitForCachedData into WaitForDSData (#2587)
Remove WaitForCachedData as it's no longer required.

Also properly handle caching / transition detection logic that occurs at the
WPILib level.

This also changes DriverStation::IsNewControlData() to check for WPILib-level
caching instead of wrapping the HAL function.
2020-07-13 21:57:54 -07:00
sciencewhiz
f0a34ea64e [wpilib] Remove Analog Gyro specific docs from Gyro interface (#2596) 2020-07-12 15:34:28 -07:00
Prateek Machiraju
33f7dec5cf [wpilibj] Fix Gyro.getRotation2d() units bug (#2594)
The new getRotation2d() method in the Gyro interface was passing
an angle in degrees to a constructor that accepts radians.
Use fromDegrees() factory function instead.
2020-07-12 09:31:15 -07:00
Thad House
3005803598 [build] Update to latest native utils (#2591)
By default, release projects do not include symbols in the new version.
This updates that to now work correctly.
2020-07-11 23:00:18 -07:00
Thad House
eeaaf5d258 [build] Add Azure build using cmake on Windows (#2588)
More people are starting to use this build, so make sure it doesn't break.
Also tests that build succeeds with OpenCV 4.
2020-07-11 13:54:15 -07:00
sciencewhiz
15819cc981 [command] Add SimulationPeriodic to templates (#2582) 2020-07-10 21:21:31 -07:00
Thad House
fe6bfb1ba2 [cscore] Provide USB Camera VID and PID in Windows (#2585) 2020-07-10 13:16:14 -07:00
Thad House
5c8d7b2423 [build] Remove install prefix from CMakeLists.txt for Windows (#2584)
The default actually works much better.
2020-07-10 08:34:53 -07:00