Peter Johnson
c88be31ec2
Merge branch 'development'
2024-04-21 20:15:51 -07:00
Tyler Veness
d26e6d9ecc
[wpimath] Support formatting Eigen array types ( #6496 )
2024-04-04 09:19:50 -07:00
Tyler Veness
5370f249a1
[build] Upgrade to wpiformat 2024.33 ( #6449 )
...
This upgrades to clang-format and clang-tidy 18.1.1. This has the
constructor attribute formatting fix, so we can remove our
WPI_DEPRECATED macro.
2024-03-18 23:11:20 -07:00
DeltaDizzy
7bd8c44570
[wpimath] Add structured data support for DifferentialDriveWheelPositions ( #6412 )
2024-03-09 10:09:02 -08:00
Asa Paparo
62cba9a4d3
[wpimath] Add vector projection and geometry vector conversions ( #6343 )
2024-02-10 10:43:58 -08:00
Tyler Veness
177132fa2a
Replace C++ unit .to<double>() with .value() ( #6317 )
...
The latter is shorter and is what we use everywhere else.
2024-01-27 07:58:25 -08:00
Tyler Veness
f29a7d2e50
[docs] Add missing JavaDocs ( #6146 )
2024-01-04 08:38:06 -08:00
Gold856
f87c64af8a
[wpimath] MecanumDriveWheelSpeeds: Fix desaturate() ( #6040 )
2023-12-14 20:52:45 -08:00
Ashray._.g
9d11544c18
[wpimath] Rotate traveling salesman solution so input and solution have same initial pose ( #6015 )
2023-12-05 23:21:28 -08:00
Joseph Eng
14c3ade155
[wpimath] Struct cleanup ( #6011 )
2023-12-04 22:40:18 -08:00
Peter Johnson
a583ca01e1
[wpiutil] Change Struct to allow non-constexpr implementation ( #5992 )
...
This required changing the constant values (e.g. kSize) into functions
(e.g. GetSize()).
Fixed implementations of ForEachNested to be inline (as these are actually
templates).
Also added a ntcore Struct test.
2023-12-02 23:36:44 -08:00
Tyler Veness
30816111db
[wpimath] Fix TimeInterpolatableBuffer crash ( #5972 )
...
Don't decrement buffer iterator if it's at the beginning of the
container.
2023-11-30 23:18:38 -08:00
Tyler Veness
ac7d726ac3
[wpimath] Add simulated annealing ( #5961 )
...
Co-authored-by: Ashray._.g <ashray.gupta@gmail.com >
2023-11-30 22:57:50 -08:00
Prateek Machiraju
51eecef2bd
[wpimath] Optimize 2nd derivative of quintic splines ( #3292 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-11-30 21:07:52 -08:00
PJ Reiniger
bb05e20247
[wpimath] Add protobuf/struct for trivial types ( #5935 )
...
This implements de/serialization for the types that aren't templated (SwerveDriveKinematics) in C++ or where there is no trivial way to go round-trip (Splines) for the messages.
2023-11-21 10:14:06 -08:00
PJ Reiniger
35744a036e
[wpimath] Move struct/proto classes to separate files ( #5918 )
...
Also add unit tests.
2023-11-21 10:11:57 -08:00
Tyler Veness
3a1194be40
Replace static_cast<void>() with [[maybe_unused]] attribute ( #5892 )
...
This clarifies intent. Not done for thirdparty libraries or
structured binding variables.
2023-11-08 12:47:23 -08: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
Jordan McMichael
ecb7cfa9ef
[wpimath] Add Exponential motion profile ( #5720 )
2023-10-19 17:26:32 -07:00
Brayden Zee
e814595ea7
[wpimath] Add ChassisSpeeds.fromRobotRelativeSpeeds() ( #5744 )
2023-10-17 10:13:04 -07:00
narmstro2020
faa1e665ba
[wpimath] Add ElevatorFeedforward.calculate(currentV, nextV) overload ( #5715 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-10-09 08:16:45 -07:00
Jordan McMichael
33243f982b
[wpimath] Expand Quaternion class with additional operators ( #5600 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-10-08 16:42:53 -07:00
Colin Finn
6ef94de9b5
[wpimath] Add tests for ArmFeedforward and ElevatorFeedforward ( #5663 )
2023-09-18 22:25:08 -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
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
1a6df6fec6
[wpimath] Fix DARE Q decomposition ( #5611 )
2023-09-05 10:48:43 -07:00
Gold856
8e2465f8a0
[wpimath] Add arithmetic functions to wheel speeds classes ( #5465 )
2023-08-31 11:57:24 -07:00
Tyler Veness
99f66b1e24
[wpimath] Replace frc/EigenCore.h typedefs with Eigen's where possible ( #5597 )
2023-08-31 11:03:37 -07:00
Omar Zrien
67043a8eeb
[wpimath] Add angular jerk unit ( #5582 )
2023-08-29 12:53:14 -07:00
Tyler Veness
8e2a7fd306
Include thirdparty libraries with angle brackets ( #5578 )
2023-08-28 15:13:34 -07:00
Tyler Veness
8f3d6a1d4b
[wpimath] Remove discretizeAQTaylor() ( #5562 )
...
It gives incorrect results. Any replacement should just be an
implementation detail of discretizeAQ().
Closes #5339 .
2023-08-23 10:47:32 -07:00
Tyler Veness
7c20fa1b18
[wpimath] Refactor DARE tests to reduce RAM usage at compile time ( #5557 )
2023-08-23 10:46:50 -07:00
Tyler Veness
186b409e16
[wpimath] Remove internal Eigen header include ( #5539 )
2023-08-15 08:47:48 -07:00
Tyler Veness
03764dfe93
[wpimath] Add static matrix support to DARE solver ( #5536 )
...
Using static matrices where possible results in a 2x performance
improvement.
2023-08-14 09:15:58 -07:00
Tyler Veness
394cfeadbd
[wpimath] Use SDA algorithm instead of SSCA for DARE solver ( #5526 )
...
Both seem to work, but the SDA algorithm is specifically recommended for
solving DAREs as opposed to P-DAREs.
The QR decomposition was replaced with a partial pivoting LU
decomposition at the recommendation of section 2.4 of the paper.
More tests and a separate JNI function for each DARE solver variant were
added.
2023-08-12 19:45:45 -07:00
amquake
8121566258
[wpimath] Fix CoordinateSystem.convert() Transform3d overload ( #5532 )
2023-08-12 15:20:22 -07:00
Tyler Veness
35a8b129d9
[wpimath] Add RotateBy() function to pose classes ( #5491 )
...
Fixes #5472 .
2023-07-31 21:16:44 -07:00
Gold856
86e91e6724
[wpimath] Refactor TrapezoidProfile API ( #5457 )
2023-07-19 17:25:10 -07:00
camaj
c69e34c80c
[wpimath] ChassisSpeeds: Add arithmetic functions ( #5293 )
...
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2023-07-18 16:30:21 -07:00
Joseph Eng
593767c8c7
[wpimath] Improve Euler angle calculations in gimbal lock ( #5437 )
2023-07-17 17:19:42 -07:00
Tyler Veness
fd5699b240
Remove references to Drake ( #5427 )
...
Fixes #5426 .
2023-07-09 21:25:14 -07:00
Vasista Vovveti
6b5817836d
[wpimath] Add tolerance for some tests ( #5416 )
2023-06-27 14:22:46 -07:00
Tyler Veness
5d3a133f9f
Remove spaces in NOLINT comments ( #5407 )
...
clang-tidy ignores the category filter if there's a space. wpiformat now
ignores categories it doesn't understand, so we can remove the spaces.
2023-06-20 20:29:23 -07:00
Tyler Veness
3a0e484691
[wpimath] Fix clang-tidy warnings ( #5403 )
2023-06-20 11:35:15 -07:00
Gold856
991f4b0f62
[wpimath] PIDController: Add IZone ( #5315 )
...
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
2023-06-19 23:01:01 -07:00
Gold856
f5b0d1484b
[wpimath] Add isNear method to MathUtil ( #5353 )
...
This method is used to check if the given value matches an expected value within a certain tolerance.
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
2023-06-19 23:00:07 -07:00
Gold856
50b90ceb54
[wpimath] SwerveDriveKinematics: Add reset method ( #5398 )
...
Adds a reset method where teams can pass in module headings for the kinematics object to use if it gets an all-zero ChassisSpeeds while converting ChassisSpeeds to module states. Also removes internal states array, replacing it with an internal headings array.
2023-06-19 22:57:55 -07:00
Tyler Veness
5acc5e22aa
[wpimath] Only compute eigenvalues with EigenSolvers ( #5369 )
...
We don't need the eigenvectors, so we're doing a lot of extra work we
don't need to.
2023-06-07 09:47:09 -07:00
Tyler Veness
a94a998002
[wpimath] Generalize Eigen formatter ( #5360 )
2023-05-30 23:35:15 -07:00
Tyler Veness
51066a5a8a
[wpimath] Move unit formatters into units library ( #5358 )
2023-05-26 01:05:27 -07:00