Autonomous Legality

Consistently recording at precisely every 20 milliseconds is very difficult without low-level access to the brain (which would likely require removing the Hardware Abstraction Layer(HAL) that is PROS/VexCode)

Instead, if you wish to continue with a continuous recording system like that which has been experimented in the past, feel free to check out the works of lewispinstein-hue, one notebale code has been linked below:

If, however, you wish to continue with a code which records position and uses odometry in a different (in my opinion, more reliable/accurate) fashipn, feel free to check out my code:

Or better yet, look at both of our codes thoroughly and forge you own path forward, adapting the codes of past as you see fit!

In any case, this has very much been done before, and reliably at that. It won my team Think award at Nationals, and at Worlds our drivetrain/odom broke, so the code could not execute.
Carry the torch, and keep it open-source!!!

Quick update from 2544X:

We decided to release the project publicly. The repo has the actual buildable PROS/EZ-Template code now, not just a concept writeup.

GitHub:

A few clarifications on how our replay auton works:

  • It is not driver controlled during autonomous.
  • The driver records the route before the match in a separate Record mode.
  • During match autonomous, the robot only runs the selected saved path from the Brain HUD.
  • Match mode has no manual replay button.
  • Manual replay testing is only in Pit mode and locks out when field control is connected.
  • The system saves QUAL and SKILLS paths to SD, with RAM fallback if SD is missing.
  • We also added tiny SD metadata files so the Brain can show saved replay status after reboot without parsing the full replay file on startup.

The important files are:

  • src/path_recorder.cpp for the recorder/replay system
  • src/competition_ui.cpp for the Brain auton selector
  • src/driver_assist.cpp for Match/Record/Pit modes
  • src/main.cpp for the PROS competition callbacks
  • include/subsystems.hpp for ports, 600 RPM drive config, and gearing

Build/upload is in the README:

pros make
pros upload

How accurate/reliable is it? I ran into some problems when testing out this style of implementation… although I switched to a different style, I think I have some solutions to the problems I had with continuous recording…

Make sure to experiment with different solutions as well! You never know which version might work…

(also, make sure to open source it after your competition season is over :slight_smile: )

Well done on getting it working!

Thank you We are currently working on integrating some suggestions like output from the motors with encoders to keep it more accurate

on the accuracy standpoint it has been really relaible given our robot is not fully complete and limited testing is what we have been doing

so, for the imes, you have to put one motor in two motor groups, and use one motor group for sensor input and the other motor group for driving… it’s kinda weird, but it works lol…
lowkey just fork my github it has the exact implementation i’m talking about.

for us, the accuracy took a real hit when at Worlds, when our drivebase started malfunctioning. Becasue of that, the IMEs in the motors were unable to provide accurate sensor feedback. I personally would recommend having external odometry wheels, because otherwise if the drivebase skips even once, your auton will be off.

If you have a really reliable drivebase, its fine haha :slight_smile:

Finally, definitely use LemLib+PROS, it has a bunch of useful capabilities, such as PATH files (which will be useful if you want curved path recording)

PS.
I feel like I may have misunderstood your message. If by:

you meant using the IMEs WITH Tracking wheels, that would be EXTREMELY precise and reliable, but would likely require an Extended Kalmann Filter for sensor assimilation. It’s a really good idea, but is the overhead during execution really worth it? It may not be, especially if you intend to assimilate: Tracking wheel vertical 1; Tracking wheel vertical 2 Tracking wheel horizontal; IMEs; AccelIMU; Ultrasonic sensor 1; Ultrasonic sensor 2… although there is really no need to got that far in the name of precision, not in vex v5 for sure.

I am not competing this year, so PM me if you want advice…

check out my code:

Thanks, that makes sense. I’m going to improve it by recording timestamped snapshots with motor positions and heading, then replaying toward those snapshots instead of only replaying joystick values. I’m trying to keep it on the hardware we already have, so no extra sensors for now.

that sounds like a good idea. i would strongly recommend - no, in fact, insist - that you use PID for the auton. It is much easier than people make out, and setting up and tuning LemLib takes only 3 hours if you are by yourself, and much likely less time if you are with others. It requires little extra hardware, and it is much more accurate than using raw motor position values.