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
Joseph Eng
657338715d
[wpimath] Add ChassisSpeeds method to fix drifting during compound swerve drive maneuvers ( #5425 )
2023-07-18 21:19:55 -07:00
Tyler Veness
1af224c21b
Add missing <functional> includes ( #5459 )
2023-07-18 21:18:32 -07:00
Sriman Achanta
335e7dd89d
[wpilib] Simulation: Add ctor parameter to set starting state of mechanism sims ( #5288 )
...
- Add a constructor parameter to configure the initial angle of the arm
- Also reorganizes cascading constructors for Java
2023-07-18 13:00:27 -07:00
Jason
9b8d90b852
[examples] Convert the unitless joystick inputs to actual physical units ( #5451 )
...
Taking the joystick inputs from -1 to 1, multiply them by the max speed (as defined in Constants.java) to get the target speed, rather than using the unitless raw joystick inputs.
2023-07-17 17:18:34 -07:00
Ryan Blue
aaea85ff16
[commands] Merge CommandBase into Command and SubsystemBase into Subsystem ( #5392 )
...
Moves all CommandBase functionality into Command and deprecates CommandBase for removal.
Moves all SubsystemBase functionality into Subsystem and deprecates SubsystemBase for removal.
Adds a function to CommandScheduler to remove all registered Subsystems.
2023-07-13 22:12:01 -07:00
Ryan Blue
7a099cb02a
[commands] Remove deprecated classes and functions ( #5409 )
...
Removes:
- PerpetualCommand
- Command.perpetually()
- CommandGroupBase
- Command.IsGrouped() (C++ only)
- Command.SetGrouped() (C++ only)
- Command.withInterrupt()
- ProxyScheduleCommand
- Button
- InternalButton, JoystickButton, NetworkButton and POVButton now subclass Trigger
- Old style Trigger functions:
- Trigger.whenActive
- Trigger.whileActiveOnce
- Trigger.whileActiveContinuous
- Trigger.whenInactive
- Trigger.toggleWhenActive
- Trigger.cancelWhenActive
- CommandScheduler.clearButtons()
- CommandScheduler.addButtons() (Java only)
- Command supplier constructor of SelectCommand
2023-07-10 09:56:18 -07:00
Peter Johnson
96145de7db
[examples] Fix formatting (NFC) ( #5420 )
2023-07-04 07:14:06 -07:00
Starlight220
fffe6a7b9a
[examples] Improve Pneumatics example coverage in Solenoid and RapidReactCmdBot examples ( #4998 )
2023-07-03 21:23:18 -07:00
Thad House
c1a01569b4
[wpilib][hal] PWM Raw using microseconds ( #5283 )
...
Co-authored-by: Joe <sciencewhiz@users.noreply.github.com >
2023-06-22 19:43:16 -07:00
Tyler Veness
5fac18ff4a
Update formatting to clang-format 16 ( #5370 )
2023-05-31 22:10:53 -07:00
Tyler Veness
c9b612c986
[wpilibcExamples] Make C++ state-space elevator KF and LQR match Java ( #5346 )
2023-05-18 10:09:48 -07:00
Starlight220
a465f2d8f0
[examples] Shuffleboard: Correct parameter order ( #5204 )
2023-03-20 13:45:34 -07:00
sciencewhiz
4af84a1c12
Fix Typos (NFC) ( #5137 )
2023-02-26 15:06:37 -08:00
sciencewhiz
804e5ce236
[examples] MecanumDrive: Fix axis comment in C++ example (NFC) ( #5096 )
2023-02-13 22:18:23 -08:00
Starlight220
49af88f2bb
[examples] ArmSimulation: Fix flaky test ( #5093 )
2023-02-13 12:59:27 -08:00
Starlight220
43975ac7cc
[examples] ArmSimulation, ElevatorSimulation: Extract mechanism to class ( #5052 )
2023-02-12 06:50:57 -08:00
Starlight220
5483464158
[examples, templates] Improve descriptions (NFC) ( #5051 )
2023-02-12 06:49:20 -08:00
Michael Leong
08a536291b
[examples] Improvements to Elevator Simulation Example ( #4937 )
...
Co-authored-by: Abhay Shukla <105139789+aboombadev@users.noreply.github.com >
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
2023-02-03 15:23:06 -08:00
Starlight220
2f96cae31a
[examples] Hatchbots: Add telemetry ( #5011 )
2023-01-31 23:44:18 -08:00
Starlight220
4054893669
[commands] Fix C++ Select() factory ( #5024 )
...
Update example to use it.
2023-01-29 07:23:12 -08:00
Sriman Achanta
f75acd11ce
[commands] Use Timer.restart() ( #5023 )
2023-01-29 07:21:07 -08:00
Starlight220
893320544a
[examples] C++ RamseteCommand: Fix units ( #4954 )
...
Also fix the memory leak in the command-based auto.
2023-01-22 11:20:35 -08:00
Starlight220
522be348f4
[examples] Rewrite tags (NFC) ( #4961 )
2023-01-21 15:24:10 -08:00
sciencewhiz
ecba8b99a8
[examples] Fix swapped arguments in MecanumControllerCommand example ( #4976 )
2023-01-18 21:25:49 -08:00
CarloWoolsey
371d15dec3
[examples] Add Computer Vision Pose Estimation and Latency Compensation Example ( #4901 )
...
This PR updates the existing differentialdriveposeestimator example to include computer vision pose estimation and latency compensation.
The example generates a simulated cameraToTarget transformation, which is then fed into ComputerVisionUtil.objectToRobotPose() to compute the robot's field-relative position exclusively from vision measurements. The vision measurements are applied through DifferentialDrivePoseEstimator.addVisionMeasurement().
The updated example constructs an AprilTagFieldLayout from JSON. This requires a deploy directory, something which isn't currently supported in wpilibjExamples and wpilibcExamples.
2023-01-18 20:46:05 -08:00
Matt
27ba096ea1
[wpilib] Fix MOI calculation error in SingleJointedArmSim ( #4968 )
...
Previous calculation derivation mixed up length and distance to CG.
2023-01-18 20:40:39 -08:00
Starlight220
bd6479dc29
[build] Add Spotless for JSON ( #4956 )
2023-01-16 08:26:46 -08:00
Tyler Veness
b74ac1c645
[build] Add apriltag to C++ cmake example builds ( #4944 )
...
This fixes compilation of the apriltag vision example on my machine.
2023-01-13 23:24:14 -08:00
Doug Wegscheid
cf1a411acf
[examples] Add example programs for AprilTags detection ( #4932 )
...
Co-authored-by: Peter Johnson <johnson.peter@gmail.com >
2023-01-13 23:08:45 -08:00
Starlight220
79f565191e
[examples] DigitalCommunication, I2CCommunication: Add tests ( #4865 )
2023-01-08 16:33:53 -08:00
Starlight220
2cd9be413f
[wpilib, examples] Cleanup PotentiometerPID, Ultrasonic, UltrasonicPID examples ( #4893 )
...
Fix C++ Ultrasonic to return correct units.
2023-01-08 16:33:07 -08:00
Tyler Veness
f0fa8205ac
Add missing compiler flags and fix warnings ( #4889 )
...
This makes the build fail on warnings. It caught two out-of-bounds reads
and a deprecation warning.
2023-01-01 08:14:19 -08:00
Sriman Achanta
cc166c98d2
[templates] Add Command-based skeleton template ( #4861 )
...
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com >
2022-12-31 13:18:43 -08:00
Starlight220
87a34af367
[templates] Add bindings to command-based template ( #4838 )
2022-12-26 11:28:06 -08:00
Starlight220
4534e75787
[examples] Remove redundant MotorControl example ( #4837 )
...
The MotorControlEncoder had the exact same content, with the addition of an encoder. No point in having both examples.
2022-12-26 11:27:20 -08:00
CarloWoolsey
8aa9dbfa90
[examples] Link apriltag package in examples build.gradle ( #4845 )
2022-12-23 20:04:59 -06:00
Starlight220
701995d6cc
[examples] Update Command-based starter project ( #4778 )
2022-12-15 09:40:14 -08:00
Thad House
518916ba02
[wpilib] Fix DS mode thread event being manual reset accidentally ( #4818 )
...
These need to be automatic reset.
2022-12-14 10:17:13 -08:00
Michael Leong
cc8675a4e5
[examples] Add comment on how to view elevator sim (NFC) ( #4482 )
2022-12-13 22:34:00 -08:00
Starlight220
fba191099c
[examples] AddressableLED: Add unit test ( #4779 )
2022-12-07 21:47:47 -08:00
Starlight220
3149dc64b8
[examples] HatchbotInlined: Use Subsystem factories ( #4765 )
2022-12-06 15:10:39 -08:00
Jordan McMichael
8618dd4160
[glass, wpilib] Replace remaining references to Speed Controller with Motor Controller ( #4769 )
2022-12-05 20:06:43 -08:00
Tyler Veness
6e23985ae6
[examples] Add main include directory to test builds ( #4751 )
...
This fixes the following compilation errors:
```
/home/tav/frc/wpilib/allwpilib/wpilibcExamples/src/main/cpp/examples/UnitTest/cpp/subsystems/Intake.cpp:5:10: fatal error: subsystems/Intake.h: No such file or directory
5 | #include "subsystems/Intake.h"
| ^~~~~~~~~~~~~~~~~~~~~
/home/tav/frc/wpilib/allwpilib/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp:11:10: fatal error: Constants.h: No such file or directory
11 | #include "Constants.h"
| ^~~~~~~~~~~~~
```
2022-12-02 10:37:49 -08:00