Tyler Veness
8dd8d4d2d4
[wpimath] Fix redundant nested math package introduced by #3316 ( #3368 )
2021-05-21 22:29:52 -07:00
Dalton Smith
49b06beedf
[examples] Add Field2d to RamseteController example ( #3371 )
2021-05-21 22:28:29 -07:00
sciencewhiz
1873fbefba
[examples] Fix Swerve and Mecanum examples ( #3359 )
...
Fix encoder allocation and default command.
Fixes #3349
2021-05-15 21:39:00 -07:00
sciencewhiz
80b479e502
[examples] Fix SwerveBot example to use unique encoder ports ( #3358 )
...
Fixes #3089
2021-05-15 14:15:18 -07:00
PJ Reiniger
1f7c9adeeb
[wpilibjExamples] Fix pose estimator examples ( #3356 )
2021-05-14 11:10:47 -07:00
Peter Johnson
3cc2da3328
Merge branch '2022'
2021-05-09 14:15:40 -07:00
Noam Zaks
c8ff626fe2
[wpimath] Move Java classes to edu.wpi.first.math ( #3316 )
2021-05-01 08:53:30 -07:00
Starlight220
ff52f207cc
[glass, wpilib] Rewrite Mechanism2d ( #3281 )
...
Substantially improves Mechanism2d by moving it to NetworkTables and adding
a robot API to create the mechanism elements, instead of requiring a JSON file.
Co-authored-by: Peter Johnson <johnson.peter@gmail.com >
2021-04-30 13:43:59 -07:00
Peter Johnson
936d3b9f83
[templates] Add Java template for educational robot ( #3309 )
...
Educational robot is a very minimal template designed for educational use
(rather than competition).
2021-04-24 20:22:39 -07:00
Jeff Hutchison
6e31230adc
[examples] Fix odometry update in SwerveControllerCommand example ( #3310 )
...
The Drive Subsystem was supplying an incorrectly constructed
Rotation2d to the odometry update method. Rotation2d constructor
was being called with heading in degrees, not radians as required.
2021-04-24 20:07:04 -07:00
Peter Johnson
05ebe93180
Merge branch 'main' into 2022
2021-04-19 18:45:31 -07:00
Peter Johnson
0abf6c9045
[wpilib] Move motor controllers to motorcontrol package ( #3302 )
...
Also deprecate SpeedController in favor of motorcontrol.MotorController and
SpeedControllerGroup in favor of motorcontrol.MotorControllerGroup.
The MotorController interface is derived from the SpeedController interface
so that code such as SpeedController x = new VictorSP(1) continues to
compile (just with a warning).
SpeedControllerGroup and MotorControllerGroup are independent classes;
both implement the MotorController interface.
2021-04-17 11:27:16 -07:00
Peter Johnson
b7b178f49c
[wpilib] Remove Potentiometer interface
2021-04-13 22:40:55 -07:00
Peter Johnson
6b168ab0c8
[wpilib] Remove PIDController, PIDOutput, PIDSource
...
Move them to the old commands vendordep so that PIDCommand and PIDSubsystem
continue to work.
This also removes Filter and LinearDigitalFilter.
2021-04-13 22:40:55 -07:00
Peter Johnson
3abe0b9d49
[cscore] Move java package to edu.wpi.first.cscore ( #3294 )
...
This is more consistent with the other Java packages, and also is more
correct, as we own the first.wpi.edu domain but not the full wpi.edu domain.
2021-04-10 11:42:41 -07:00
Peter Johnson
d7fabe81fe
[wpilib] Remove RobotDrive ( #3295 )
...
This has been deprecated for several years, and its functionality has been
completely superseded by other drive classes (DifferentialDrive et al).
2021-04-10 10:28:32 -07:00
Peter Johnson
01d0e12603
[wpilib] Revert move of RomiGyro into main wpilibc/j ( #3296 )
...
This reverts commit 69e8d0b65d (#3143 ).
We haven't released a version with this yet, and plan to make a vendor
library instead.
2021-04-10 10:27:44 -07:00
Prateek Machiraju
fe341a16f5
[examples] Use more logical elevator setpoints in GearsBot ( #3198 )
2021-03-07 16:00:00 -08:00
Prateek Machiraju
6812302ff9
[examples] Make DriveDistanceOffboard example work in sim ( #3199 )
...
Adds some basic functionality to the ExampleMotorController so that
controller inputs show up in LiveWindow widgets in simulation.
2021-03-03 23:38:13 -08:00
Thad House
99b5ad9ebb
[wpilibj] Fix warnings that are not unused variables or deprecation ( #3161 )
...
Fix all warnings given by intellisense that are not unused variables or deprecation.
2021-02-12 22:22:11 -08:00
Prateek Machiraju
be0ce99007
[examples] Use PWMSparkMax instead of PWMVictorSPX ( #3156 )
...
This accurately reflects the motor controllers that are distributed in
the Kit of Parts.
2021-02-12 22:14:56 -08:00
Zhiquan Yeo
69e8d0b65d
[wpilib] Move RomiGyro into main wpilibc/j ( #3143 )
2021-02-12 22:14:29 -08:00
Prateek Machiraju
fdaec77594
[examples] Instantiate m_ramseteController in example ( #3142 )
2021-01-31 17:04:16 -08:00
Mark Vedder
64adff5fea
[examples] Fix typo in ArcadeDrive constructor parameter name ( #3092 )
...
Removed extra 'p' in "Supplier" in the parameter name `zaxisRotateSuppplier` of the ArcadeDrive constructor of the Romi Reference example.
2021-01-16 20:27:29 -08:00
sciencewhiz
04a90b5dd1
[examples] Don't continually set setpoint in PotentiometerPID Examples ( #3084 )
2021-01-13 20:09:08 -08:00
Peter Johnson
9c3b51ca0f
[wpilib] Document simulation APIs ( #3079 )
...
- Remove sim checkstyle suppression
- Add [[nodiscard]] to C++ register callback functions
- Add a couple of missing sim functions
Co-authored-by: Peter Johnson <johnson.peter@gmail.com >
Co-authored-by: Starlight220 <yotamshlomi@gmail.com >
2021-01-11 21:55:45 -08:00
Prateek Machiraju
42c3d52863
[examples] Sync Java and C++ trajectories in sim example ( #3081 )
...
This also shifts the trajectory up and to the right so that the robot is
always visible in the Field GUI during traversal. Some drive constants
and trajectory constraints were also synced between the two languages.
2021-01-11 20:08:22 -08:00
Matt
e955037980
[wpimath] Add optimize() to SwerveModuleState ( #3065 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2021-01-10 22:49:46 -08:00
sciencewhiz
1fd09593cf
[examples] Add missing TestInit method to GettingStarted Example ( #3039 )
2021-01-02 22:00:25 -08:00
Zhiquan Yeo
e45a0f6ce2
[examples] Add RomiGyro to the Romi Reference example ( #3037 )
2021-01-02 21:59:57 -08:00
Zhiquan Yeo
d73cf64e54
[examples] Update RomiReference to match motor directions ( #3036 )
...
Flip the TeleopArcadeDrive axis directions so that positive
values for x-axis speed result in the Romi driving forward (in the
direction of the Raspberry Pi USB ports).
2021-01-02 17:21:07 -08:00
jpokornyiii
bf8f8710ea
[examples] Update Romi template and example ( #2996 )
...
Updated the RomiReference example to have autonomous example.
Updated RomiReference and both Romi templates to use Encoder.getDistance().
Removed motor inversion.
2020-12-30 22:45:04 -08:00
Prateek Machiraju
8651aa73e8
[examples] Enable NT Flush in Field2d examples ( #3013 )
2020-12-30 16:12:15 -08:00
Peter Johnson
a751fa22d2
[build] Apply spotless for java formatting ( #1768 )
...
Update checkstyle config to be compatible with spotless.
Co-authored-by: Austin Shalit <austinshalit@gmail.com >
2020-12-29 22:45:16 -08:00
Austin Shalit
6e1919414e
[build] Bring naming checkstyle rules up to date with Google Style guide ( #1781 )
...
Also update Checkstyle to 8.38.
Google changed their style guide from the last time we imported it. This PR brings in those naming changes. The change they made is allowing single letter member, parameter, and local variable names. They also added a lambda naming scheme and I thought it would be good to bring that in too.
2020-12-29 09:27:48 -08:00
Peter Johnson
8f1f64ffb6
Remove year from file copyright message (NFC) ( #2972 )
...
Also update copyright to include "and other WPILib contributors" and clarify
license referral language to not be restricted to FIRST teams.
2020-12-26 14:12:05 -08:00
Prateek Machiraju
4e34f05238
[examples] Use ADXRS450_GyroSim class in simulation example ( #2964 )
...
This class did not exist when the original example was written. This
also changes the C++ example to use ADXRS450_Gyro for the sake of
consistency.
2020-12-24 15:42:46 -08:00
sciencewhiz
699bbe21a4
[examples] Fix comments in Gearsbot to match implementation (NFC) ( #2957 )
2020-12-22 22:26:54 -08:00
Tyler Veness
4afb13f98b
[examples] Replace M_PI with wpi::math::pi ( #2938 )
2020-12-17 00:15:02 -08:00
Zhiquan Yeo
b27d33675d
[examples] Enhance Romi templates ( #2931 )
...
Add motors and encoders so they are more usable out of the box.
2020-12-10 21:38:27 -08:00
Prateek Machiraju
65219f3093
[examples] Update Field2d position in periodic() ( #2928 )
...
This ensures that the robot position will be updated in dashboards like Glass when running on real hardware.
2020-12-10 20:36:20 -08:00
Prateek Machiraju
66d6417189
[examples] Add tasks to run Java examples ( #2920 )
...
Example: ./gradlew :wpilibjExamples:runstatespacedifferentialdrivesimulation
2020-12-07 22:33:17 -08:00
Prateek Machiraju
558e37c412
[examples] Add simple differential drive simulation example ( #2918 )
...
This provides an example of using the differential drive simulator without needing to use the command-based library.
2020-12-07 22:32:42 -08:00
Matt
963ad5c255
[wpilib] Add noise to Differential Drive simulator ( #2903 )
...
Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com >
2020-12-04 18:46:50 -08:00
Peter Johnson
387f56cb7b
[examples] Add Romi reference Java example and templates ( #2905 )
2020-12-04 17:34:54 -08:00
Prateek Machiraju
b3deda38c9
[examples] Zero motors on disabledInit() in sim physics examples ( #2906 )
...
This ensures that mechanisms will stop moving if the robot is disabled while motors are in motion
2020-12-04 17:34:16 -08:00
Peter Johnson
727940d847
[wpilib] Move Field2d to SmartDashboard
2020-12-04 00:36:55 -08:00
Prateek Machiraju
c11d34b26c
[command] Use addCommands in command group templates ( #2900 )
...
This makes the Java templates consistent with the C++ templates as well as the documentation
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2020-12-01 20:52:45 -08:00
Declan Freeman-Gleason
bc8f338771
[wpilib] Add pose estimators ( #2867 )
...
Pose and state estimators can filter latency-compensated global measurements and fuse them with state-space drivetrain model information to estimate robot position. They are drop-in replacements for the existing odometry classes.
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com >
Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com >
Co-authored-by: Claudius Tewari <cttewari@gmail.com >
Co-authored-by: Matt <matthew.morley.ca@gmail.com >
2020-11-28 14:35:35 -08:00
Prateek Machiraju
2056f0ce09
[wpilib] Fix bugs in Hatchbot examples ( #2893 )
...
This fixes an issue with some commands not correctly requiring their
subsytems. Furthermore, an execute() method was added to the
DriveDistance command to continuously update the voltage command.
2020-11-28 14:01:56 -08:00