-
Notifications
You must be signed in to change notification settings - Fork 0
Home
AtlantisLib is a set of tools for working with WPILib and specifically AdvantageKit. It simplifies the management of robot inputs, value tuning from the dashboard, network alerts, and more. AtlantisLib is designed to help teams boost development speed, improve efficiency in working with the robot, and easily incorporate advanced features, all while maintaining clean, organized code without unnecessary complexity. This wiki contains documentation of AtlantisLib, as well as recommendations and tips on how to organize and write a robot code with WPILib, AdvantageKit, and AtlantisLib.
AtlantisLib currently has 3 primary parts:
- Log Fields: An abstraction over AdvantageKit that simplifies the definition of inputs and outputs, creating a cleaner and less error-prone API for IO management.
-
Tunables: An extension of WPILib's
Sendablesystem that enables interactive tuning and command execution from the dashboard, while remaining safe for replay. It also includes useful features like nesting and convenient construction of tunable commands using the command composition API. - Network Alerts Manager: A manager for WPILib's network alerts, making it easier to handle them with less code while keeping the system clean and efficient.
Note that AtlantisLib and this wiki assume familiarity with the basics of how WPILib robot projects are structured and how AdvantageKit handles logging and replay.
AtlantisLib is designed to be as minimal as possible in your code, requiring just one line per feature:
LogFieldsTable.updateAllTables();
TunablesManager.update();
NetworkAlertsManager.update();For each feature you want, add the corresponding line for it in the robotPeriodic() inside the Robot.java file, IN THIS ORDER AND BEFORE ANYTHING ELSE.
Since Log Fields is used inside the Tunables, you will have to enable it too for Tunables to work. And again, make sure to update Log Fields before Tunables.
Note that you still have to set up AdvantageKit independently, as instructed in the AdvantageKit documentation.
TODO:
- The RobotBase Robot.java
- Test mode for NT4Publisher and Tunables.
- ValueHolder
- Recommendations on how to organize subsystems and commands
- Reference to our robot code