Commit Graph

712 Commits

Author SHA1 Message Date
Peter Johnson
a931a6554f Merge branch 'main' into 2027 2024-12-29 18:22:39 -08:00
sciencewhiz
203487a6aa [wpimath] improve LTVUnicycleController docs (NFC) (#7599)
Document the states and inputs so it isn't necessary to look at the code
Fix max velocity throws doc
2024-12-28 16:03:47 -06:00
Tyler Veness
57344ef3b2 [wpimath] Use ct_matrix instead of Eigen/LU for determinant in headers (#7600)
This caught a bug in ct_matrix's 3x3 determinant.
2024-12-28 16:03:29 -06:00
Tyler Veness
df244cd198 [wpimath] Clean up arm and elevator feedforward APIs (#7595) 2024-12-27 08:12:14 -06:00
Peter Johnson
2a757eaeb5 Merge branch 'main' into 2027 2024-12-26 18:55:43 -08:00
Nicholas Armstrong
fe49cbe429 [wpimath] Remove Units class from Elevator and Arm Feedforwards (#7570) 2024-12-26 20:21:19 -06:00
Tyler Veness
02a0adc653 [wpimath] Add Rotation3d rotation vector getter (#7564)
The code churn in Java is just making the function order consistent
between languages.
2024-12-22 13:34:51 -08:00
Tyler Veness
d631fa8e4b [wpimath] Fix algorithm link (NFC) (#7569)
Fixes #7568.
2024-12-22 13:33:07 -08:00
Peter Johnson
529bab6ca1 Merge branch 'main' into 2027 2024-12-19 20:40:37 -08:00
PJ Reiniger
9ccd73108b [bazel] MVP for building wpilibc + commands framework (#7231) 2024-12-18 22:00:40 -08:00
Tyler Veness
03f0fc4dea [wpimath] Use immutable member functions in ChassisSpeeds (#7545) 2024-12-15 16:09:34 -08:00
Peter Johnson
945d416d07 Merge branch 'main' into 2027 2024-12-14 10:45:32 -08:00
Peter Johnson
4bca79b9af [wpimath] Revert "ChassisSpeeds fromRelative and discretize methods made instance methods (#7115)" (#7549)
This reverts commit a3b12b3bd9.
2024-12-14 10:42:49 -08:00
Joseph Eng
4225b732fd Remove unnecessary boxing (#7539)
* Remove unnecessary boxing
Also remove unnecessary warning suppression

* Use more idiomatic functional interfaces in NumericalIntegration
2024-12-12 19:18:40 -08:00
Wispy
cc41a0ed24 [wpilib] Replace MecanumDriveMotorVoltages with a functional interface (#6760) 2024-12-08 17:05:06 -08:00
Thad House
b6ae9e9cc9 Merge branch 'main' into 2027 2024-12-08 12:04:23 -08:00
Tyler Veness
220f4e1ba4 [wpimath] Remove RamseteController and RamseteCommand (#7522) 2024-12-07 23:38:35 -08:00
Tyler Veness
d5edb4060d [upstream_utils] Upgrade Sleipnir (#7512)
It now uses SQP for problems without inequality constraints, which is
faster.

main:
```
[ RUN      ] Ellipse2dTest.DistanceToPoint
0.203 ms
[       OK ] Ellipse2dTest.DistanceToPoint (0 ms)
[ RUN      ] Ellipse2dTest.FindNearestPoint
0.019 ms
[       OK ] Ellipse2dTest.FindNearestPoint (0 ms)
```

upgrade:
```
[ RUN      ] Ellipse2dTest.DistanceToPoint
0.197 ms
[       OK ] Ellipse2dTest.DistanceToPoint (0 ms)
[ RUN      ] Ellipse2dTest.FindNearestPoint
0.015 ms
[       OK ] Ellipse2dTest.FindNearestPoint (0 ms)
```
2024-12-07 23:02:39 -08:00
Tyler Veness
e08fdeba21 [wpimath] Rename FindNearestPoint() to Nearest() (#7513)
This is easier to type and follows the naming of Pose2d::Nearest().

Since Ellipse2d and Rectangle2d were added for the 2025 season, we don't
need to add deprecation notices.
2024-12-07 23:01:18 -08:00
Tyler Veness
4910436b10 [wpimath] Remove LUTs from LTV controllers (#7521)
The Raspberry Pi 5 is fast enough that we no longer need it.
```
Running ./build/DAREBench
Run on (4 X 2400 MHz CPU s)
CPU Caches:
  L1 Data 64 KiB (x4)
  L1 Instruction 64 KiB (x4)
  L2 Unified 512 KiB (x4)
  L3 Unified 2048 KiB (x1)
Load Average: 0.47, 0.72, 0.45
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
-------------------------------------------------------------------------------
Benchmark                                     Time             CPU   Iterations
-------------------------------------------------------------------------------
DARE_WPIMath_Dynamic                       34.4 us         34.4 us        20315
DARE_WPIMath_NoPrecondChecks_Dynamic       21.7 us         21.7 us        32266
DARE_WPIMath_Static                        15.2 us         15.2 us        45878
DARE_WPIMath_NoPrecondChecks_Static        7.84 us         7.84 us        89316
DARE_SLICOT                                79.4 us         79.4 us         8789
DARE_Drake                                 34.9 us         34.9 us        20074
```
2024-12-07 23:00:15 -08:00
Tyler Veness
a7349f00ef [wpimath] Fix duplicate Rotation2d constructor (#7524) 2024-12-07 22:31:09 -08:00
Peter Johnson
32ba751e58 Merge branch 'main' into 2027 2024-12-07 21:30:28 -08:00
Tyler Veness
62a6a77bbf [wpimath] Add affine transformation constructors and getters to geometry API (#7509)
Fixes #7429.
2024-12-07 21:29:02 -08:00
Tyler Veness
c497e4ec22 [wpimath] Fix SimpleFeedforward overload set (#7516) 2024-12-07 20:32:16 -08:00
Tyler Veness
e222efaa01 [wpimath] Add affine transformation constructors and getters to geometry API (#7430)
Fixes #7429.
2024-12-07 15:49:17 -08:00
Peter Johnson
52b33edcbd Merge branch 'main' into 2027 2024-12-07 14:11:47 -08:00
Tyler Veness
278efa6384 [upstream_utils] Remove Sleipnir patches no longer needed with GCC 11 (#7491) 2024-12-07 12:36:25 -08:00
Tyler Veness
882233bede [wpimath] Improve SimpleMotorFeedforward argument names and deprecation message (#7489)
Also roll back SimpleMotorFeedforward unit API until 2027.
2024-12-06 22:32:40 -08:00
Tyler Veness
144e79a614 [wpimath] Remove Rotation2d value field (#7490)
It's not part of SO(2).
2024-12-06 21:00:09 -08:00
sciencewhiz
892e062316 [hal,wpilib,wpimath] Add Usage Reporting for Choreo and PathWeaver (#7464) 2024-11-30 20:33:09 -08:00
Tyler Veness
a0af0fd572 [wpimath] Remove redundant internal DARE function (#7442) 2024-11-28 21:24:13 -08:00
Joseph Eng
59dbfc9c2d [wpimath] Improve C++ SimpleMotorFeedforward unit type support (#7440)
Allow using non-base types
Allow using angles for serde
2024-11-27 23:02:31 -08:00
sciencewhiz
0a3ccf93c6 [wpimath] Add BangBangController Usage Reporting (#7411) 2024-11-20 17:00:54 -08:00
Gold856
4c225ef2c1 [wpimath] Add proto files back to JAR (#7414)
PhotonVision depends on these being in the JAR to generate quickbuf classes.
2024-11-20 07:59:37 -08:00
Peter Johnson
661c321fe2 [upstream_utils] Restore Eigen intellisense fix (#7404)
This reverts commit d1de7663d3.

Intellisense is still broken on Windows Athena target with the error
`incomplete type "Eigen::Matrix<double, 3, 3, 0, 3, 3>" is not allowed`.
2024-11-17 19:11:25 -08:00
Tyler Veness
d1de7663d3 [upstream_utils] Remove Eigen intellisense fix (#7397)
FRC Code intellisense continued to work in developerRobot with a QR
decomposition.
2024-11-16 22:16:11 -08:00
Sam Carlberg
ded7c87d63 [wpimath] Remove units from trapezoid profile classes (#7276) 2024-11-16 07:57:38 -08:00
Joseph Eng
2acf111f56 [wpimath] Add 3D odometry and pose estimation (#7119) 2024-11-16 07:56:14 -08:00
Tyler Veness
aa7dd258c4 [wpimath] Replace constexpr coeff() and coeffRef() with operator() (#7391) 2024-11-16 07:44:20 -08:00
Jonah Bonner
ca51197486 [wpilib] Add timestamp getters with configurable time base (#7378) 2024-11-16 07:43:38 -08:00
Kavin Muralikrishnan
07345712dc [wpimath] Document default tolerances of PIDController (#7377) 2024-11-12 18:19:55 -05:00
Joseph Eng
425bf83036 [wpimath] Add 2D to 3D geometry constructors (#7380) 2024-11-12 18:18:37 -05:00
Peter Johnson
f40bd3593d [wpilib,wpimath] Don't use mutable units for return values (#7369)
It only saves a single allocation and can cause confusing behavior on the
caller (user) side.
2024-11-08 18:29:51 -08:00
Thad House
3cc541f261 Remove generated google protobuf support (#7371)
It's not used anymore, and cleans up the build.
2024-11-08 18:29:30 -08:00
Tyler Veness
661bae568f [wpimath] Add time-varying RKDP (#7362)
This makes the ground truth for the Taylor series AQ discretization more
accurate.
2024-11-07 23:46:52 -08:00
Thad House
8b8b634f65 [wpiutil] Change C++ protobuf to nanopb (#7309)
The Google C++ protobuf implementation has issues with dynamic linkage across DLL boundaries because it uses global variables.  It also has a compile-time dependency because the protoc version must exactly match the libprotobuf version.  Using nanopb with a customized generator fixes both of these issues.

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
2024-11-07 22:42:50 -08:00
Tyler Veness
a66fa339dc [wpimath] Make controllers and some trajectory classes constexpr (#7343) 2024-11-07 14:02:11 -07:00
Tyler Veness
3113627be6 [wpimath] Fix PIDController error tolerance getters (#7341) 2024-11-05 09:52:22 -07:00
Tyler Veness
63e623d70b [wpimath] Fix case and order of HolonomicDriveController PID getters (#7342) 2024-11-05 09:50:17 -07:00
Tyler Veness
9e8d37c03b [wpimath] Remove unhelpful test fixtures (#7344)
These test fixtures were adding complexity while only saving one line of
object initialization per test. Our other tests like this just make the
object at the top of each test.
2024-11-05 09:49:38 -07:00