Commit Graph

44 Commits

Author SHA1 Message Date
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
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
Starlight220
66bb0ffb2c [examples] Add unit testing infrastructure (#4646) 2022-12-02 08:40:14 -08:00
Eli Barnett
1a59737f40 [commands] Add convenience factories (#4460)
Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
2022-11-28 07:41:25 -08:00
Starlight220
45b7fc445b [wpilib] Add EventLoop (#4104)
This is a generic expansion of the command-based Trigger framework.
2022-06-08 22:16:51 -07:00
sciencewhiz
a26df2a022 [examples] Update ArmSimulation example to use Preferences (#3976)
This shows more real world usage then hardcoding the setpoint and PID
gains. There were no current examples using Preferences. This will also
be used to update frc-docs article for Preferences.
2022-01-31 00:17:04 -08:00
Starlight220
269cf03472 [examples] Add communication examples (e.g. arduino) (#2500)
Co-authored-by: Andrew Dassonville <dassonville.andrew@gmail.com>
2022-01-06 18:08:57 -08:00
Prateek Machiraju
67df469c58 [examples] Remove old command-based templates and examples (#3263)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2021-10-13 19:17:58 -07:00
sciencewhiz
50198ffcf1 [examples] Add Mechanism2d visualization to Elevator Sim (#3587) 2021-09-18 22:06:14 -07:00
sciencewhiz
a446c25598 [examples] Synchronize C++ and Java Mechanism2d examples (#3589)
- Synchronize dimensions
- Make both joints different colors for clarity
2021-09-18 22:05:35 -07:00
sciencewhiz
4f5e0c9f85 [examples] Update ArmSimulation example to use Mechanism2d (#3572)
- Correct several comments that referenced elevator
- Changed noise to be 1 encoder tick instead of half a degree
- Changed gear ratio and PID value to be better tuned
- Updated bounds to be similar to a single jointed arm
2021-09-17 22:55:31 -07:00
Aditya Tomar
85748f2e6f [examples] Add C++ TankDrive example (#3493)
This is a basic C++ example that demonstrates a simple differential drive implementation using “tank”-style controls through the DifferentialDrive class and an ordinary joystick.
2021-07-28 21:52:14 -07:00
Starlight220
ff52f207cc [glass, wpilib] Rewrite Mechanism2d (#3281)
Substantially improves Mechanism2d by moving it to NetworkTables and adding
a robot API to create the mechanism elements, instead of requiring a JSON file.

Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
2021-04-30 13:43:59 -07:00
Starlight220
e1620799c7 [examples] Add C++ RomiReference example (#2969)
Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com>
Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
2020-12-31 20:37:20 -08:00
Prateek Machiraju
558e37c412 [examples] Add simple differential drive simulation example (#2918)
This provides an example of using the differential drive simulator without needing to use the command-based library.
2020-12-07 22:32:42 -08:00
Declan Freeman-Gleason
bc8f338771 [wpilib] Add pose estimators (#2867)
Pose and state estimators can filter latency-compensated global measurements and fuse them with state-space drivetrain model information to estimate robot position. They are drop-in replacements for the existing odometry classes.

Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com>
Co-authored-by: Claudius Tewari <cttewari@gmail.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2020-11-28 14:35:35 -08:00
Prateek Machiraju
50050a0e53 [wpilibc] Update C++ DiffDriveSim example to match Java (#2839) 2020-11-13 11:12:03 -08:00
sciencewhiz
5c2dc043cd [wpilib] Update examples to export NewCommands (#2841)
Update all examples to export NewCommands vendor dep except for pacgoat,
which still uses old commands.
2020-11-11 22:36:18 -08:00
sciencewhiz
24a3c12f31 [wpilib] Fix names and descriptions of examples (#2846) 2020-11-11 22:35:28 -08:00
Matt
b61f08d3fa [wpilib] Add physics simulation support with state-space (#2615)
This includes physics simulation support for arms/elevator models, as well as differential drivetrains.

Swerve might be added at a later date.

Co-authored-by: Claudius Tewari <cttewari@gmail.com>
Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com>
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
2020-09-20 09:39:52 -07:00
sciencewhiz
3e41d92c18 [wpilib] Use misspell to fix spelling errors (NFC) (#2674) 2020-08-31 00:33:11 -07:00
Matt
3b283ab9aa [wpimath] Add core State-space classes (#2614)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
Co-authored-by: Claudius Tewari <cttewari@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
2020-08-14 23:40:33 -07:00
Prateek Machiraju
a1d2d40ad3 [wpilib] Add RamseteController examples (#2553)
This is different from the RamseteCommand examples in that they don't use the command-based library.
2020-07-03 21:59:42 -07:00
sciencewhiz
ce1ac17dfb Remove experimental from new command example descriptions (#2226) 2020-01-04 19:57:31 -08:00
Oblarg
ccdd0fbdb2 Add TrapezoidProfile external PID examples (#2131) 2019-12-07 13:37:54 -08:00
Oblarg
e0bc97f66b Add ProfiledPIDSubsystem example (#2076) 2019-11-21 20:55:16 -08:00
CTT
a58dbec8aa Add holonomic follower examples (#2052) 2019-11-21 19:52:56 -08:00
Thad House
500c43fb84 Add examples for DMA, DutyCycle, DutyCycleEncoder and AddressableLED (#2100) 2019-11-18 22:12:17 -08:00
CTT
486fa9c696 Add XboxController examples for arcade and tank drive (#2058) 2019-11-10 22:53:17 -08:00
Thad House
629e95776a Add VendorDeps JSON files for command libraries (#2048)
Add commandversion flag to the examples and templates json files.
2019-11-07 17:38:07 -08:00
Thad House
916596cb01 Fix invalid examples json, add validator (#2001) 2019-10-28 20:10:05 -07:00
Oblarg
75438ab2ce Add RamseteCommand (#1951) 2019-10-26 21:33:41 -07:00
Peter Johnson
b3398dca39 Set gradlebase correctly for all examples (#1950) 2019-10-18 11:39:31 -07:00
Prateek Machiraju
f405582f86 Add kinematics suite (#1787)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2019-09-07 23:11:49 -05:00
Tyler Veness
2250b7fbe3 Rename GearsBotNew example to GearsBot 2019-08-28 22:08:59 -07:00
Tyler Veness
c9f9feff1f Replace deprecated API usage in C++ examples
Since there is a new version of GearsBot using the new command-based
API, the old GearsBot is just removed.

PR #1842 is being included to verify this PR is correct.
2019-08-28 22:08:59 -07:00
Oblarg
076ed7770c Add new C++ Command framework (#1785)
This is the C++ version of #1682.

The old command framework is still available, but will be deprecated.

Due to name conflicts, the new framework is in the frc2 namespace.
Eventually (after the old command framework is removed in a future year)
it will be moved into the main frc namespace.
2019-08-25 20:55:59 -07:00
Tyler Veness
3ebc5a6d3a Add ProfiledPIDController 2019-08-16 23:47:02 -07:00
Tyler Veness
a216b9e9ee Add TrapezoidProfile example (#1814) 2019-08-16 22:03:44 -07:00
Tyler
a769d56ec1 Create C++ ShuffleBoard example (#1438) 2018-11-28 12:13:38 -08:00
Thad House
ef3a31aa20 Add an example of using the HAL directly (#1374)
This is useful for advanced users, and shows a few things like error messages, and DS things that are needed.
2018-11-15 19:33:50 -08:00
Austin Shalit
f774e47c80 Add an example showing how to use a hid rumbler (#1394) 2018-10-29 12:37:30 -07:00
Thad House
863cfde394 Adds tests to ensure all examples have matching item in json file (#1079)
Also checks that all items in the json file have a matching example
One was missing from C++, that example was added (The one in eclipse was completely wrong)
2018-05-24 20:08:37 -04:00
Thad House
dab6f40b46 Moves examples.xml to json, and adds template json (#1026) 2018-05-04 16:51:37 -07:00