Ryan Blue
27b173374e
[wpimath] Add minLinearAccel parameter to DifferentialDriveAccelerationLimiter ( #4422 )
2022-10-10 08:57:37 -07:00
Ryan Blue
2a13dba8ac
[wpilib] TrajectoryUtil: Fix ambiguous documentation (NFC) ( #4461 )
2022-10-10 08:56:40 -07:00
Tyler Veness
b53b3526a2
[wpimath] Add CoordinateSystem conversion for Transform3d ( #4443 )
...
I also refactored Pose3d's conversion implementation to use the
Translation3d and Rotation3d conversions, thereby giving Translation3d
and Rotation3d test coverage. No changes were made to the expected
values of the Pose3d conversion tests.
The expected values of the Transform3d conversion tests were copied from
the Pose3d conversion tests without modification.
2022-10-01 21:09:04 -07:00
Tyler Veness
38bb23eb18
[wpimath] Add scalar multiply and divide operators to all geometry classes ( #4438 )
...
Closes #4435 .
2022-09-28 21:34:29 -07:00
Tyler Veness
4eb1d03fb3
[wpimath] Document C++ LinearFilter exception ( #4417 )
2022-09-17 00:24:35 -07:00
Tyler Veness
ab1baf4832
[wpimath] Add rotation matrix constructor to Rotation3d ( #4413 )
2022-09-17 00:17:30 -07:00
Tyler Veness
9730032866
[wpimath] Document LQR and KalmanFilter exceptions ( #4418 )
2022-09-17 00:16:40 -07:00
Tyler Veness
f36162fddc
[wpimath] Improve Discretization internal docs ( #4400 )
2022-09-04 17:24:38 -07:00
Tyler Veness
5149f7d894
[wpimath] Add two-vector Rotation3d constructor ( #4398 )
...
This is useful for turning a 3D vector into an orientation relative a
coordinate system vector.
2022-09-04 13:16:29 -07:00
Tyler Veness
0ef8a4e1df
[wpimath] Support formatting more Eigen types ( #4391 )
...
Added an Eigen::SparseMatrix formatter.
Also modified the Eigen::Matrix formatter to support Eigen::MatrixXd.
Eigen::MatrixXd sets both dimension template arguments to -1, so they
can't be used for iteration. rows() and cols() are now used instead.
rows() and cols() are constexpr for statically sized matrices, so
there's no performance loss there.
2022-09-02 01:00:05 -07:00
ohowe
b5a17f762c
[wpimath] Add direction to slew rate limiter ( #4377 )
2022-09-01 14:46:46 -07:00
CarloWoolsey
97c15af238
[wpimath] LinearSystemId: Fix docs, move C++ impls out of header ( #4388 )
...
- Fix inaccuracies and inconsistencies in Java & C++ LinearSystemId documentation.
- Move LinearSystemId function definitions to LinearSystemId.cpp
2022-08-31 09:12:48 -07:00
Tyler Veness
ac9be78e27
Use stricter C++ type conversions ( #4357 )
...
Now, implicit narrowing conversions are only used with wpi::Now(). This
also fixes clang-tidy warnings about C-style casts. For example:
```
== clang-tidy /__w/allwpilib/allwpilib/wpilibNewCommands/src/main/native/include/frc2/command/SwerveControllerCommand.inc ==
/__w/allwpilib/allwpilib/wpilibNewCommands/src/main/native/include/frc2/command/SwerveControllerCommand.inc:95:18: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting]
auto curTime = units::second_t(m_timer.Get());
^
```
In that case at least, the cast was removed entirely since Get() already
returns a units::second_t.
2022-08-17 13:42:36 -07:00
Tyler Veness
3ccf806064
[wpimath] Remove redundant LinearFilter.finiteDifference() argument ( #4335 )
...
The number of samples is already determined by the length of the stencil
list.
2022-07-22 12:50:30 -05:00
Tyler Veness
6f1e01f8bd
[wpimath] Document example of online filtering for LinearFilter.finiteDifference() ( #4336 )
2022-07-22 12:46:33 -05:00
Tyler Veness
add00a96ed
[wpimath] Improve DifferentialDriveAccelerationLimiter docs (NFC) ( #4323 )
...
Defined trackwidth, added skipped steps to the algorithm's internal
proof, and grouped the algorithm steps more logically with blank lines.
2022-07-01 06:43:57 -07:00
Tyler Veness
82fac41244
[wpimath] Better document trackwidth parameters (NFC) ( #4324 )
2022-07-01 06:42:49 -07:00
Connor Worley
a99c11c14c
[wpimath] Replace UKF implementation with square root form ( #4168 )
...
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2022-06-08 22:19:01 -07:00
Prateek Machiraju
fc37265da5
[wpimath] Add angle measurement convention to ArmFeedforward docs (NFC) ( #4285 )
2022-06-02 21:22:47 -07:00
Prateek Machiraju
d9f9cd1140
[wpimath] Reset prev_time on pose estimator reset ( #4283 )
2022-06-02 21:21:42 -07:00
Tyler Veness
be2fedfe50
[wpimath] Add stdexcept include for std::invalid_argument (IWYU) ( #4274 )
2022-05-29 15:33:19 -07:00
PJ Reiniger
c3b223ce60
[wpiutil] Vendor llvm and update to 13.0.0 ( #4224 )
2022-05-20 15:59:53 -07:00
Tyler Veness
5aa67f56e6
[wpimath] Clean up math comments ( #4252 )
2022-05-20 15:16:56 -07:00
Tyler Veness
0d9956273c
[wpimath] Add CoordinateSystem.convert() translation and rotation overloads ( #4227 )
2022-05-18 20:41:15 -07:00
Tyler Veness
5876b40f08
[wpimath] Memoize CoordinateSystem and CoordinateAxis statics ( #4241 )
2022-05-18 10:47:46 -07:00
Max Gordon
a3d44a1e69
[wpimath] Add Translation2d.getAngle() ( #4217 )
...
Co-authored-by: Max Gordon <tonald.drump2.0@gamil.com >
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2022-05-14 21:22:00 -07:00
Tyler Veness
f341e1b2be
[wpimath] Document standard coordinate systems better (NFC) ( #4228 )
2022-05-14 15:31:06 -07:00
Tyler Veness
b33715db15
[wpimath] Add CoordinateSystem class ( #4214 )
2022-05-07 10:25:19 -07:00
Tyler Veness
f20a20f3f1
[wpimath] Add 3D geometry classes ( #4175 )
...
Also clean up 2D geometry documentation.
2022-05-06 08:41:23 -07:00
Kaitlyn Kenwell
708a4bc3bc
[wpimath] Conserve previously calculated swerve module angles when updating states for stationary ChassisSpeeds ( #4208 )
...
* Calculated swerve module states now stored in a member variable
* If ChassisSpeeds(0, 0, 0) is converted to module speeds, the
previously calculated module angle will be conserved, with forward speed
set to 0
* New tests added
2022-05-06 08:38:20 -07:00
chen perach
ef7ed21a9d
[wpimath] Improve accuracy of ComputerVisionUtil.calculateDistanceToTarget() ( #4215 )
2022-05-06 08:36:58 -07:00
Tyler Veness
b1abf455c1
[wpimath] LTVUnicycleController: Use LUT, provide default hyperparameters ( #4213 )
2022-05-04 22:04:08 -07:00
Tyler Veness
ee03a7ad3b
Remove most 2022 deprecations ( #4205 )
...
Excludes "old" commands and SimDevice functions.
2022-05-04 20:37:27 -07:00
Tyler Veness
ce1a7d698a
[wpimath] Refactor WheelVoltages inner class to a separate file ( #4203 )
2022-05-01 11:01:20 -07:00
Tyler Veness
87bf70fa8e
[wpimath] Add LTV controllers ( #4094 )
...
This adds a unicycle controller that's a drop-in replacement for Ramsete
and a differential drive controller that controls the full pose and
outputs voltages. The main benefit is LQR-like tuning knobs using a
system model.
2022-04-30 22:54:22 -07:00
Tyler Veness
ebd2a303bf
[wpimath] Remove deprecated MakeMatrix() function ( #4202 )
2022-04-30 22:52:05 -07:00
Peter Johnson
e28776d361
[wpimath] LinearSystemLoop: Add extern templates for common cases
2022-04-30 20:38:55 -07:00
Peter Johnson
dac1429aa9
[wpimath] LQR: Use extern template instead of Impl class
2022-04-30 20:38:55 -07:00
Peter Johnson
e767605e94
[wpimath] Add typedefs for common types
...
This makes complex code significantly easier to read.
frc::Vectord<Size> = Eigen::Vector<double, Size>
frc::Matrixd<Rows, Cols> = Eigen::Matrix<double, Rows, Cols>
2022-04-30 20:38:55 -07:00
Peter Johnson
97c493241f
[wpimath] UnscentedKalmanFilter: Move implementation out-of-line
2022-04-30 20:38:55 -07:00
Peter Johnson
8ea90d8bc9
[wpimath] ExtendedKalmanFilter: Move implementation out-of-line
2022-04-30 20:38:55 -07:00
Peter Johnson
ae7b1851ec
[wpimath] KalmanFilter: Use extern template instead of Impl class
2022-04-30 20:38:55 -07:00
Peter Johnson
e3d62c22d3
[wpimath] Add extern templates for common cases
...
This helps reduce compile times and memory usage.
2022-04-30 20:38:55 -07:00
Oblarg
09cf6eeecb
[wpimath] ApplyDeadband: add a scale param ( #3865 )
...
Also templates it in C++ so it can work with both doubles and units.
2022-04-30 20:29:48 -07:00
Tyler Veness
d926dd1610
[wpimath] Fix pose estimator performance ( #4111 )
...
Fixes #4087 .
2022-04-26 18:43:59 -07:00
Tyler Veness
5ebe911933
[wpimath] Add DifferentialDriveAccelerationLimiter ( #4091 )
2022-04-24 07:21:40 -07:00
Tyler Veness
aef4b16d4c
[wpimath] Remove unnecessary NOLINT in LinearPlantInversionFeedforward (NFC) ( #4155 )
2022-04-08 21:31:42 -07:00
Tyler Veness
5bf46a9093
[wpimath] Add ComputerVisionUtil ( #4124 )
...
Closes #4108 .
2022-04-08 21:20:53 -07:00
Tyler Veness
c8905ec29a
[wpimath] Remove ImplicitModelFollower dt argument ( #4119 )
...
The math works just fine without model discretization.
2022-03-29 11:29:06 -07:00
Tyler Veness
8d79dc8738
[wpimath] Add ImplicitModelFollower ( #4056 )
2022-03-20 00:36:12 -07:00