Commit Graph

4150 Commits

Author SHA1 Message Date
sciencewhiz
ad6c8b882e [hal] Fix PDP Energy Calculation (#2672)
Fixes #2642
2020-08-31 00:31:30 -07:00
Tyler Veness
947ff655c5 [wpimath] Refactor KalmanFilter to be steady-state only (#2657)
I didn't notice a performance difference between the original
implementation and this one for a flywheel simulation, so this
simplifies a lot of internals.

This class can no longer implement KalmanTypeFilter because that class
allows setting the error covariance for use in the
KalmanFilterLatencyCompensator class. This won't impact the holonomic pose
estimators that use KalmanFilterLatencyCompensator because they all use an EKF.
2020-08-30 11:46:57 -07:00
Peter Johnson
183b7c85a1 [wpigui] Handle Direct3D framebuffer resize 2020-08-30 06:48:52 -07:00
Peter Johnson
4cf6947af7 [cscore] Add wpigui-based USB camera viewer 2020-08-30 06:48:52 -07:00
Peter Johnson
b83709b269 [wpigui] Add GetDistSquared and MaxFit functions
These utility functions were moved from halsim_gui.
2020-08-30 06:48:52 -07:00
Peter Johnson
c699d55175 [wpigui] Build dev executable in cmake build 2020-08-30 06:48:52 -07:00
Peter Johnson
781afaa852 [wpigui] Refactor texture handling
The platform-specific code now only has create, update, and delete texture.
Image reading functions have been moved to common code.

Also add pixel data functions and image data functions in addition to image
file loading.
2020-08-30 06:48:52 -07:00
Peter Johnson
007b03a2c2 [hal] Fix wpiformat errors (#2670)
These were introduced in the previous commit.
2020-08-29 23:25:41 -07:00
Thad House
ed18693345 [hal] Add no throw/error version of CAN Write methods (#2063) 2020-08-29 23:07:22 -07:00
Thad House
7c99224bb7 Create maintainers.md (#1937) 2020-08-29 20:47:28 -07:00
Prateek Machiraju
c2c4090902 [build] Fix CMake imgui and wpigui on macOS (#2669) 2020-08-29 20:40:50 -07:00
Prateek Machiraju
416288061a [build] Fix Gradle build on macOS 11.0 Big Sur (#2656) 2020-08-29 20:29:49 -07:00
Thad House
83376bc231 [build] Add sourcelink support for windows pdbs (#2592)
SourceLink embeds the git repo and hash into the pdbs, which allows VS to get the source files exactly matching a pdb directly from github.

Only VS and WinDbg are supported currently, but there are issues in the vscode tools repo to enable it there.
2020-08-29 20:27:20 -07:00
Peter Johnson
c0de98f9f2 [sim] Fix GUI scaling of window sizes (#2668)
Also tweak initial sizes, positions, and visibility.
2020-08-29 15:07:12 -07:00
Peter Johnson
70db0db221 [build] Don't unconditionally regenerate wpimath numbers (#2665)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2020-08-29 15:06:49 -07:00
Prateek Machiraju
526f26685d [wpilib] Add methods to check game and enabled state together (#2661)
This avoids users having to call both IsOperatorControl() and IsEnabled() to figure out if their robot is
enabled and in the teleop state. The expression above involves calling two methods that each have their
own lock.

These new methods should only involve locking one mutex, since only one call is made to HAL_GetControlWord().
2020-08-29 13:32:19 -07:00
Peter Johnson
5d1220e629 [sim] Use wpigui for simulator GUI 2020-08-27 21:05:17 -07:00
Peter Johnson
b80fde4388 [wpigui] Add wpigui wrappers for GLFW+imgui
These hide the platform specifics behind a common C++ API.  Platforms:
 - Windows: DirectX 11 (with 10 backwards compatibility)
 - Linux: OpenGL 3
 - Mac: Metal
2020-08-27 21:05:17 -07:00
Tyler Veness
148f43b4a5 [wpilibc] Use LLVM containers in ShuffleboardInstance (#2658) 2020-08-27 20:45:14 -07:00
Austin Shalit
0d88213de5 [sim] Add missing new line to extension loader message (#2663) 2020-08-27 20:39:40 -07:00
Austin Shalit
36b8d74faa [build] Revert "[build] Apply temporary JDK arch fix (#2643)" (#2655)
This reverts commit e680ba85fa.
2020-08-27 10:25:33 -07:00
Tyler Veness
5021f28159 [wpilibc] Fix InterruptableSensorBase comment (#2659)
Fixes #2355.
2020-08-27 09:42:43 -07:00
Prateek Machiraju
ee6a814576 [wpilib] Enable continuous input on theta controller in swerve examples (#2651)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2020-08-24 19:28:20 -07:00
Prateek Machiraju
807de9a0a9 [build] Fix Eigen include path for CMake install (#2649) 2020-08-22 11:55:12 -07:00
Matt
9398b6b55b [sim] Add AnalogEncoderSim (#2647) 2020-08-19 22:59:52 -07:00
Zhiquan Yeo
932bfcf374 [sim] Add WebSocket extension (client/server) (#2589)
This allows access to HAL-level simulation data via a WebSocket connection.

The server additionally serves local files.

The following environment variables can be used for configuration:
HALSIMWS_USERROOT (server) - local directory to use for file serving for /user/ URIs, defaults to ./sim/user
HALSIMWS_SYSROOT (server) - local directory to use for file serving for all other URIs, defaults to ./sim
HALSIMWS_URI (client or server) - WebSocket URI, defaults to /wpilibws
HALSIMWS_PORT (client or server) - port number, defaults to 8080
HALSIMWS_HOST (client) - host to connect to, defaults to localhost

Co-authored-by: Zhiquan Yeo <zyeo8@bloomberg.net>
Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
Co-authored-by: jpokornyiii <jpokornyiii@gmail.com>
2020-08-19 22:14:03 -07:00
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