|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
Autonomous routine declarations. More...
Go to the source code of this file.
Functions | |
Setup functions | |
Called once by Do not rename these. | |
| void | default_constants () |
| Tune PID gains, exit conditions, and slew rates. | |
| void | default_positions () |
| Set starting piston / mechanism states. | |
Autonomous routines | |
Competition autonomous entry points. | |
| void | run_jerryio_path_1 () |
| Run the path generated by the JerryIO path planner (path 1). | |
Example autons | |
One short routine per motion type. Copy and edit when writing real autons. | |
| void | ex_drive () |
| pid_drive_set: straight forward + reverse. | |
| void | ex_turn () |
| pid_turn_set: in-place pivots to absolute headings. | |
| void | ex_swing () |
| pid_swing_set: single-side sweeping arcs. | |
| void | ex_chain () |
| pid_wait_quick_chain: flow drive→turn→drive. | |
| void | ex_odom_ptp () |
| pid_odom_set: drive to one field coordinate. | |
| void | ex_odom_path () |
| pid_odom_set: chain a path of odom waypoints. | |
| void | ex_move_to_point () |
| light::moveToPoint: simple odom move w/ timeout. | |
| void | ramsete_demo_s_curve () |
| followTrajectory: smooth RAMSETE S-curve. | |
| void | ramsete_char_kVkAkS () |
| Characterize feedforward kV/kA/kS. | |
| void | ramsete_char_trackwidth () |
| Characterize track width. | |
| void | ramsete_char_alat () |
| Characterize max lateral accel. | |
Test / tuning routines | |
Useful during practice for dialing in PID. Register these in auton_config.cpp during tuning sessions; remove them before competition. | |
| void | con_test () |
| Basic connectivity / control check. | |
| void | drive_test (int inches) |
| Drive straight N inches — tune drive PID. | |
| void | turn_test (int degrees) |
| Turn to N degrees — tune turn PID. | |
| void | swing_test (int degrees) |
| Swing to N degrees — tune swing PID. | |
| void | heading_test (int degrees) |
| Drive while fighting a heading offset. | |
| void | odom_test (int degrees) |
| Zero odom then drive 24 in — test odometry. | |
Autonomous routine declarations.
Three files work together to set up autonomous:
Workflow for adding a new routine:
void my_auton();light::auton_selector.add("Label", "na", my_auton); Definition in file autons.hpp.
| void con_test | ( | ) |
Basic connectivity / control check.
| void default_constants | ( | ) |
Tune PID gains, exit conditions, and slew rates.
| void default_positions | ( | ) |
Set starting piston / mechanism states.
| void drive_test | ( | int | inches | ) |
Drive straight N inches — tune drive PID.
| void ex_chain | ( | ) |
pid_wait_quick_chain: flow drive→turn→drive.
| void ex_drive | ( | ) |
pid_drive_set: straight forward + reverse.
| void ex_move_to_point | ( | ) |
light::moveToPoint: simple odom move w/ timeout.
| void ex_odom_path | ( | ) |
pid_odom_set: chain a path of odom waypoints.
| void ex_odom_ptp | ( | ) |
pid_odom_set: drive to one field coordinate.
| void ex_swing | ( | ) |
pid_swing_set: single-side sweeping arcs.
| void ex_turn | ( | ) |
pid_turn_set: in-place pivots to absolute headings.
| void heading_test | ( | int | degrees | ) |
Drive while fighting a heading offset.
| void odom_test | ( | int | degrees | ) |
Zero odom then drive 24 in — test odometry.
| void ramsete_char_alat | ( | ) |
Characterize max lateral accel.
| void ramsete_char_kVkAkS | ( | ) |
Characterize feedforward kV/kA/kS.
| void ramsete_char_trackwidth | ( | ) |
Characterize track width.
| void ramsete_demo_s_curve | ( | ) |
followTrajectory: smooth RAMSETE S-curve.
| void run_jerryio_path_1 | ( | ) |
Run the path generated by the JerryIO path planner (path 1).
| void swing_test | ( | int | degrees | ) |
Swing to N degrees — tune swing PID.
| void turn_test | ( | int | degrees | ) |
Turn to N degrees — tune turn PID.