Giter VIP home page Giter VIP logo

vex-v5-replay's Introduction

VEX V5 Replay

A solution that allows you to record and playback robot movements. Motor values are recorded at a set interval and saved via serial connection or to the micro-SD card. This solution contains three projects, Replay is a VEXCode V5 Pro C++ project to record movements, Interpreter is a CMake C++ project to read the input and save it to a file to be copied into a program, and ReplayTest is a VEXCode V5 Pro C++ project to quickly test the interpreted output. This solution contains three projects, Replay is a VEXCode V5 Pro C++ project to record movements, Interpreter is a CMake C++ project to read the input and save it to a file to be copied into a program, and ReplayTest is a VEXCode V5 Pro C++ project to quickly test the interpreted output.

Accuracy

This program may not always replay motions with 100% accuracy. Currently, it is configured to record values that a motor is set to at a certain interval. This can be modified, however. The longer a recording is, the less accurate it will be as it progresses through. It is crucial to start the robot in the same position every time. Recording and been designed to be as precise and as efficient as possible to help eliminate any discrepancies with timing.

Requirements

  • VEXcode V5 Pro
  • CMake
  • C++ compiler (g++, Clang, Visual Studio, etc.)

Optional

  • Micro-SD Card (formatted to FAT-32)

Usage

See README.md of Replay, Interpreter, and ReplayTest for more information for each project.

  1. Configure Replay
    1. Change the robot configuration accordingly
    2. Set if you'd like to output to serial, micro-SD card, or both
    3. Add your opcontrol code to control the robot
  2. Compile and Upload Replay to your robot
  3. Run Replay (default slot is slot #7)
    1. Starts recording after a 2 second delay
    2. End recording by pressing the buttons Y and A on the main controller at the same time
  4. Save output to computer
  5. Run Interpreter on the file
    1. Modify and build if necessary
    2. Usage interpret inputFile outputFile
  6. Paste output where it needs to go
    1. Test the program with ReplayTest (default slot is slot #8)

What about PROS?

It shouldn't be too hard to port Replay and ReplayTest over to the PROS. If you do manage it get it working on PROS, submit a pull request.

Future Plans

Some features that would be nice to have later:

  • PROS support
  • Creating a program that allows you to select from a list of already recorded files and then play them back from inside of the robot without ever having to go to the computer to generate the code
  • Allow pausing while recording
  • Figure out how to record encoder/sensor values and use them in a meaningful way
  • A GUI to manage and edit recorded data

vex-v5-replay's People

Contributors

skyluker4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.