Gold856
72a6d22d9a
[build] Organize cmake files ( #6617 )
2024-05-24 10:48:05 -07:00
Nicholas Armstrong
7fc17811fa
[wpimath] Add full state support to LinearSystemId functions ( #6554 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2024-05-15 07:23:22 -06:00
Gold856
305a0657e2
[cscore] Deprecate AxisCamera ( #6579 )
2024-05-12 10:28:51 -07:00
Tyler Veness
d88c71ffdc
[wpiutil] Upgrade to fmt 10.2.1, add wpi::print ( #6161 )
...
We now use a wrapper (wpi::print) to catch exceptions since we can't patch
std::print() to not throw when we ultimately migrate to it.
fmtlib and std format/print throw the same exceptions and always have. We previously patched fmt::print() to not throw a write failure exception, but we can't do that for std::print(); wpi::print() is the migration plan.
2024-05-12 06:25:42 -07:00
Isaac Turner
a6dd95eb9e
[wpilib] Remove deprecated Gyro interface ( #6567 )
2024-05-06 21:54:39 -07:00
Drew Williams
0afc35f336
[commands] Fix C++ SysIdRoutine crashing when passed nullptr or {} ( #6508 )
...
Flattens parameter from a `std::optional<std::function<...>>` to just a `std::function<...>`. This is a breaking change but a trivial one for teams to fix.
2024-05-01 09:09:15 -07:00
Tyler Veness
a85e7693de
[examples] Use UDL for turns ( #6570 )
2024-05-01 09:02:18 -07:00
Tyler Veness
5359112b15
[wpimath] Deprecate RamseteController ( #6494 )
...
LTVUnicycleController is a drop-in replacement with better tuning knobs.
The RamseteCommand examples were removed instead of retrofitted with
LTVUnicycleController because we're planning on removing the command
controller classes anyway, so it would be wasted effort. The
SimpleDifferentialDriveSimulation example shows direct
LTVUnicycleController usage.
2024-04-29 22:01:42 -07:00
HarryXChen
f26adc556d
[examples] Fix memory over-allocation in Apriltag examples ( #6517 )
...
Change hamming distance to 1, add comment about memory usage.
2024-04-21 20:21:48 -07:00
Tyler Veness
e64c20346d
[examples] Remove unused private variables ( #6403 )
2024-02-28 19:58:15 -08:00
Joseph Eng
0ad6b3acb3
[apriltag] Add AprilTagFieldLayout.loadField() ( #6377 )
2024-02-17 21:12:59 -08:00
DeltaDizzy
da3abade83
[examples] Add angular subsystem to SysIdRoutine example ( #6297 )
...
Co-authored-by: Tim Winters <twinters@wpi.edu >
2024-02-10 10:44:57 -08:00
Ryan Blue
cb094e4ff6
[examples] Don't reset encoders when resetting odometry ( #6329 )
2024-01-31 13:18:07 -08:00
Joseph Eng
1016e95242
[examples] Fix memory leak in C++ controller command examples ( #6306 )
2024-01-27 23:49:41 -08:00
DeltaDizzy
53ebb6679e
[examples] Move triggers to subsystem fields ( #6318 )
2024-01-27 23:47:06 -08:00
sciencewhiz
154d920e67
[examples] Limit error bit correction in April Tag examples ( #6224 )
...
Values >3 are not supported. 64be6ab26a/apriltag.c (L261-L266)
2024-01-13 23:03:58 -08:00
Tyler Veness
4a55d830e4
[wpilibcExamples] Remove redundant initializer ( #6212 )
2024-01-13 14:09:26 -08:00
Tyler Veness
67e8306819
gitattributes: Mark C++ source files as text ( #6210 )
...
Some C++ files had been checked in with CRLF line endings.
This fixes those and also fixes future commits.
2024-01-12 10:53:56 -08:00
Eli Barnett
707cb06105
[wpilib] Add SysIdRoutine logging utility and command factory ( #6033 )
...
Co-authored-by: Drew Williams <williams.r.drew@gmail.com >
Co-authored-by: Peter Johnson <johnson.peter@gmail.com >
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2024-01-05 11:50:23 -08:00
Tyler Veness
e7c9f27683
[wpilib] Add functional interface equivalents to MotorController ( #6053 )
...
This does not deprecate any current functionality, but prepares the way for future deprecation.
The drive classes now accept void(double) functions, which makes them more flexible.
The C++ API ended up a bit more verbose, but the Java API is really concise with method references, which is >80% of our userbase. For example:
`DifferentialDrive drive = new DifferentialDrive(m_leftMotor::set, m_rightMotor::set);`
Lambdas can be passed to interoperate with vendor motor controller APIs that don't have e.g., set(double), so CTRE doesn't have to maintain their WPI_ classes anymore.
MotorControllerGroup was replaced with PWMMotorController.addFollower() for PWM motor controllers. Users of CAN motor controllers should use their vendor's follower functionality.
2024-01-01 13:37:51 -08:00
sciencewhiz
495585b25d
[examples] Update april tag family to 36h11 ( #6126 )
...
Changes size to 6.5 inches per https://www.firstinspires.org/robotics/frc/blog/2023-technology-updates-past-present-future-and-beyond
Uses 7 error bit correction as recommended in PhotonVision docs.
2023-12-31 22:46:31 -08:00
Tyler Veness
22a322c9f3
[wpimath] Report error on negative PID gains ( #6055 )
...
Defaults PID gains to zero if any are invalid.
2023-12-23 12:15:29 -08:00
ncorrea210
8798700cec
[wpilibcExamples] Add inline specifier to constexpr constants ( #6049 )
2023-12-14 20:52:02 -08:00
Elliot Scher
39a0bf4b98
[examples] Call resetOdometry() when controller command is executed ( #5905 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-12-06 22:14:54 -08:00
ncorrea210
d32c10487c
[examples] Update C++ examples to use CommandPtr ( #5988 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-12-03 21:39:29 -08:00
Gold856
4fcf0b25a1
[build] Apply a formatter for CMake files ( #5973 )
2023-11-30 16:52:21 -08:00
Elliot Scher
cc2cbeb04c
[examples] Replace gyro rotation with poseEstimator rotation ( #5900 )
2023-11-10 15:12:54 -08:00
Peter Johnson
e69a9efeba
[wpilibcExamples] Match array parameter bounds ( #5880 )
...
Required by newer versions of clang.
2023-11-04 23:55:13 -07:00
Tyler Veness
201a42a3cd
[wpimath] Reorder TrapezoidProfile.calculate() arguments ( #5874 )
...
ProfiledPIDController and ExponentialProfile use current, then goal.
This isn't a breaking change because this overload of calculate() is
new for 2024.
2023-11-04 16:28:55 -07:00
Thad House
04dcd80adb
[build] Publish unit tests for examples ( #5838 )
2023-10-27 16:57:38 -07:00
Jordan McMichael
ecb7cfa9ef
[wpimath] Add Exponential motion profile ( #5720 )
2023-10-19 17:26:32 -07:00
kully
9a0aafd8ab
[examples] Make swerve examples multiply desired module speeds by cosine of heading error ( #5758 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-10-12 23:20:57 -07:00
Zhiquan Yeo
fb07b0da49
[examples] Add XRP C++ Examples and Templates ( #5743 )
2023-10-09 16:55:54 -07:00
Tyler Veness
07a0d22fe6
[build] Build examples in CMake CI ( #5667 )
2023-09-20 21:03:55 -07:00
Zhiquan Yeo
51dcb8b55a
[examples] Make Romi/XRP Examples use appropriate vendordeps ( #5665 )
2023-09-18 19:42:10 -07:00
Joseph Eng
633c5a8a22
[commands] Add C++ Requirements struct ( #5504 )
2023-09-17 20:48:39 -07:00
Tyler Veness
19a8850fb1
[examples] Add TimesliceRobot templates ( #3683 )
2023-09-15 20:42:21 -07:00
Tyler Veness
4bac4dd0f4
[wpimath] Move PIDController from frc2 to frc namespace ( #5640 )
...
The old PIDController class in the frc namespace was removed for the
2023 season.
2023-09-15 19:57:31 -07:00
Tyler Veness
4f2114d6f5
Fix warnings from GCC 13 release build ( #5637 )
2023-09-15 10:37:52 -07:00
Ryan Blue
3b79cb6ed3
[commands] Revert SubsystemBase deprecation/removal ( #5634 )
2023-09-14 20:56:48 -07:00
Tyler Veness
a9ab08f48b
[wpimath] Rename ChassisSpeeds.fromDiscreteSpeeds() to discretize() ( #5616 )
...
This better reflects what's actually going on mathematically.
2023-09-08 20:14:59 -07:00
Tyler Veness
383289bc4b
[build] Make custom CMake macros use lowercase ( #5594 )
...
Most of them already do use lowercase, and uppercase is like screaming
at the user.
2023-08-30 21:17:09 -07:00
Tyler Veness
8e2a7fd306
Include thirdparty libraries with angle brackets ( #5578 )
2023-08-28 15:13:34 -07:00
m10653
e2c190487b
[examples] Add flywheel bang-bang controller example ( #4071 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-08-05 14:15:05 -07:00
Thad House
d83a6edc20
[wpilib] Update GetMatchTime docs and units ( #5232 )
2023-08-03 21:45:26 -07:00
Thad House
12dda24f06
[examples] Fix C robot template not correctly looping ( #5474 )
...
- The event wouldn't reset, causing infinite looping
- Refresh ds data was missing
2023-07-27 08:46:51 -07:00
Joseph Ruan
1938251436
[examples] Add Feedforward to ElevatorProfiledPid ( #5300 )
...
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
2023-07-23 21:40:34 -07:00
Gold856
873c2a6c10
[examples] Update ElevatorTrapezoidProfile example ( #5466 )
2023-07-23 21:36:47 -07:00
Thad House
fc56f8049a
[wpilib] DriverStation: Change alliance station to use optional ( #5229 )
...
Many teams have issues trying to read the DS too early. By switching to an optional, we cause teams to check 2 things. Either 1) they explicitly check, and their code is correct, or 2) they just read .value() and their code reboots in a loop. However, because the DS will eventually connect, this 2nd case is ok, and should theoretically be undetectable on the field.
2023-07-22 15:19:28 -07:00
Gold856
86e91e6724
[wpimath] Refactor TrapezoidProfile API ( #5457 )
2023-07-19 17:25:10 -07:00