Giter VIP home page Giter VIP logo

autongui's Introduction

Auton Builder for Vex Robotics Competition

A graphical aid for creating for vrc autons as a vscode extension.

What it does

This extension provides a visualization of an auton written in cpp (and maybe a graphical way to edit it). Demo of the auton builder

Understood Actions:

Many of these are lemlib chassis::*() methods

  • SetPose(x, y, theta, radians)
  • MoveTo(x, y, timeout, maxSpeed, log)
  • TurnTo(x,y, timeout, reversed, maxSpeed, log)
  • Follow(filePath, timeout, lookahead, reverse, maxSpeed, log)†
  • Wait(milliseconds)†
  • Intake†
  • StopIntake†
  • Shoot†
  • PistonShoot†
  • Roller†
  • Expand†

This is partially implemented, meaning that the list view understands it, but the webview does not understand it

How it works

This extension makes use of the vscode clangd extension to provide AST information (This is not yet implemented natively by this extension and instead requires a modified version of it)

This AST is then translated into "Actions", a list of which is represented by an Auton.

This auton is then displayed as a list view in the activity bar. This list view can be used to select an action from the list to be displayed in the auton preview. (The list view might also be used to change the order of the actions)

The auton/action preview shows the user what an action does to the robot, by displaying the robot's position on the field (and perhaps modifying the look of the robot). (This might also be used to modify the cpp and maybe display motion from one action to another)

What's missing

  • All of the above is implemented, except for the parenthesized statements
  • Configure displayed field (for different games and for skills vs matchplay)
  • Configure robot dimensions
  • Adding custom actions
  • Deep Scanning functions, eg:
    void turnTowardGoal() {
      auton::turnTo(64,64,1500);
    }
    void autons::shootIntoGoal() {
      turnTowardGoal(); // look into this function and find turnTo()
      auton::shoot();
    }
  • Configure auton and autons namespaces
  • Native lemlib follow() viewing
  • Display partially understood actions in webview
  • Update actions to be similar to new lemlib version
  • Expose AST API in clangd

Installation

Visit CONTRIBUTING.md for installation instructions

Example Workspace

To see what an example workspace looks like, check out the example branch

Contributing

Any contributions you'd like to make would be greatly appreciated and instructions on how to do so are present in CONTRIBUTING.md

autongui's People

Contributors

dependabot[bot] avatar meiszwflz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

autongui's Issues

Feature: Deep Scanning Functions

Currently, the ASTTranslator only tries to find actions in the auton function, ignoring any actions hidden away in calls to other functions

These function calls should also be searched to allow for modularization of code. For example:

void turnTowardGoal() {
  auton::turnTo(64,64,1500);
}
void autons::shootIntoGoal() {
  turnTowardGoal(); // look into this function and find turnTo()
  auton::shoot();
}

This may be difficult, especially if the "nested" function is defined in another file.

Task: Expose Vscode-Clangd AST

This extension relies on vscode-clangd's AST api, which doesn't exist yet...

Information

The stuff that needs to be done to complete this is outlined here and the progress made on this is currently in this fork.

Difficulty - Easy

Required Knowledge:

  • Zero understanding of this project
  • Limited understanding of clangd
  • Decent understanding of typescript (libraries and DefinitelyTyped)

Completion

  1. clangd/vscode-clangd#501 (comment)

Note: You don't have to do the GitHub Pages, guides, or example, but please point towards the usage in clangd as an example

  1. Release new version with exposed AST of Clangd.
  2. Replace RawASTNode and ClangdAPI with imported types from new @types/vscode-clangd-api package.
  3. Modify CONTRIBUTING.md to indicate that Clangd can be installed from the VSCode Marketplace, instead of the .vsix method.

Help

If you would like to help, please make a comment indicating so, and you will be assigned to this task.

Feature: Understand Robot State Actions in Webview

Currently, the webview receives actions but only understands actions that modify the position of the robot. Other actions, such as shoot, intake, and stopIntake, should also be understood by the webview.

To do this robot's image should be modified in some way to indicate the current state, or be shown thrown a game object.

For now only do intake, shoot, and stopIntake as these are actions relevant to the current game.

Feature: Configure Robot Dimension

There needs to be a method for users to customize the dimension of their robot. This should be implemented as a configuration option with a scope of resource. For now, we'll ignore shape-shifting robots that can change their dimensions.

Feature: Configure Displayed Field

The user should be able to customize the field that is displayed in the webview.

They should be able to select both from a list of fields included in the extensions (eg. Spin Up, Over Under, Over Under Skills, etc) and their own image on their machine.

This should be implemented as a configuration option with a scope of resource.

Feature: Pure Pursuit Viewing

The webview does not currently understand pure pursuit actions. The webview should be augmented with this ability.

To do this hopefully some modifications can be made to path.jerryio. If this is the route that is taken, jerryio should be a dependency of some sort. This will likely require coordination with the developers of jerryio.

This is a very open ended issue as I'm not sure how to go about it.

Feature: Configure Namespaces

Currently, to recognize auton functions the autons namespace is used, and the same for actions where the auton namespace is used. This should be configurable by the user.

This should be implemented as a configuration option with a scope of resource. This should also be able to handle no namespace.

Feature: Custom Actions

Users will likely want to add their own custom actions.

This is not difficult to implement, until you get to the webview at which point things fall apart. If you're interesting in pursuing this, please discuss how you want to do it with me, either in this issue or by messaging me on discord.

This is very open ended, good luck..

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.