Action recorder in the making

I’m thinking if I can make a code that records actions and displays the actions that happened at that time and how much happened and I’ll be able to convert it to code so we can possibly recreate the recorded movement.
So how would I do that because I have a few things in mind.
I am working with a V5 Claw Bot if you are wondering.

Look up replay and you will find past efforts from other teams in the past:

Is this against any rules?

If you are using it to learn new techniques that may or may not work - and you develop new skills - great!

but if you are planning to use code written by someone else for competition without the skills needed to create it yourself would be a problem.

That is amazing!

Please understand there are notable caveats to action recorders, which is the limitation of context. Not to scare you, but recording software is higly complicated because it has to prioritize either position or constraints you might want to give it.

Hurdle 1: Prioritization between constraints vs locational consistency

For example, if you are trying to balance a ball on top of your robot and make a curve-like motion, what should the replay system prioritize? If the robot goes off-track, should the replay system prioritize keeping the ball balanced, or staying on track?

What if the robot cannot follow the track consistently due to outsider factors like being pushed or driving into a screw? Should it overcorrect, omitting the ball that is balanced on top of it?

Hurdle 2: Granularity in tracking

Do you want the robot to keep track of the point it has been every x milliseconds? If you do that, the path will undershoot during curved motions. Have you considered any sort of curved estimation system?

Hurdle 3: Motion

You will need to create a pure pursuit and odometry system if you want the cleanest replay system. I would strongly encourage looking into Jar Template or other open source code and try to see how they work fundamentally to make your own pure pursuit or boomerang solution. Even then, expect the robot to undershoot turn paths, just because thats how pure pursuit functions.

What you should do.

Besides all of there nuances, I would suggest solving the simplest problem as best as you can, and then adding on and polishing the design to handle these edge and corner cases.

I would strongly suggest turning your code into classes and using object-oriented programming (OOP) to make code more understandable without overwhelming yourself. This can be a very large project, depending on how deep you want to go with it.

Thank you! I had tried it, it went well except for me adjusting things but it is doing okay so far.

Its fine! I have experience.