Giter VIP home page Giter VIP logo

dawn's People

Contributors

andrewecd avatar avsurfer123 avatar dependabot[bot] avatar dhruvchowdhary avatar ewc340 avatar haileyjang avatar lancejackson avatar lawrencechen14 avatar lorddemaxus avatar meshankhosla avatar snownnik avatar spanch2 avatar uthmanmomen13 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dawn's Issues

Change version number to 3.0.0

Following semantic versioning and with all the new changes we've made, we should change the Dawn version to 3.0.0.

Should be easy 1 line change in renderer/consts/version.ts

Implementing Latency Protobuf

Implementing latency protobuf. Need to determine whether to send it over intervals or buttons.

Format of the protobuf:

message TimeStamps { uint64 dawn_timestamp = 1; uint64 runtime_timestamp = 2; }

[Feature] Use React Hooks instead of classes in components

Hooks provide a new way to modify the state. Instead of class components, having function components such as hooks will further simplify the code in components (ie- can remove calling setState every function to fix newly modified state).

Current components that are still classes:

  • App (Richard and Meshan)
  • ConfigBox (Alfredo and Andrew)
  • ConsoleOutput (Alfredo and Andrew)
  • DNav (Richard and Meshan)
  • Gamepad (Richard and Meshan)
  • GamepadList (Richard and Meshan)
  • UpdateBox (Thomas, Ashish, and Saketh)

For a general idea, please refer to the following link: Hook Overview
Other than using the useState React hook, you will have to use the useEffect hook as well. Documentation
To find the equivalent class component lifecycle method to useEffect hook implementation: Click me

Add better logging for production

Many problems we have seen in production (i.e. connection issues etc) are hard to debug because we don't have clear logs in the code, we should add logging for crucial parts in the code and save them to a file. We can also add a log view somewhere in Dawn so the logs can be easily accessible.

We may have to do some log sanitation for existing logs since current logs are pretty noisy and repetitive. (Related issue: #65)

[Feature] Make device parameters expandable/collapsible

Each device has a different set of parameters. Each parameter should be able to expanded / collapsed by the student. This is to reduce network congestion between Dawn and Runtime on the UDP connection. If the student has, say, four motor controllers attached, and every parameter was enabled by default, that is 52 floating point values being sent over a (potentially slow) network at 100 Hz. Being able to subscribe to only certain parameters on certain devices will lower the network traffic a lot.

Update React-Ace and refactor Editor.tsx

Types for state and props should already be added in Editor.tsx, but we need to update React-ace and use ace-builds for themes instead of brace as the latest version of React-Ace no longer supports it. We should also refactor Editor.tsx by separating out components.

Implementing Challenge Input UI

Implementing Challenge Input UI + Backend for Runtime-Dawn Integration.

Approximate steps are:

  • Write a new handler (Sagas & Runtime.ts)
  • Add a new tab in the editor for code challenges
  • Create a new modal that takes in function inputs and display function outputs (React component)

Research alternatives to Redux state management

Currently we are using Redux but there is a lot of boilerplate and is just hard for beginners to learn in general, we should consider checking if we can reduce the amount of boilerplate somehow or move to another state management library.

Current state management library we are using:

Some alternatives:

Overall factors to consider for the new library are ideally being able to refactor from our existing codebase as easily as possible and simplicity in using and learning the library.

[Initiative] Research Protobufs

Understand how protobufs are currently used to transfer data between Dawn and Runtime, then research how varying-length payloads could be sent to support a dashboard-like feature. Runtime would only have to send device data that the student wants to see / requests to see.

[Feature] Running coding challenges from Dawn

We should have a window in Dawn for students to send coding challenge inputs and see coding challenge outputs from Dawn. This should be relatively straightforward on the backend side: send a ChallengeData message to Runtime with the entered inputs and wait for a response from Runtime. The UI part (making a window appear where students can type in the inputs to each challenge) may be a decent amount of work, however.

[Feature] Robot parameter dashboard/graphs

The incoming peripheral data on the UDP connection with Runtime is working. A new feature for Dawn would be to display this device data as one or more graphs in a separate Electron window somewhere in the Dawn app to so that it acts as a dashboard while the robot is running, providing real time info.

Refactor ConfigBox.tsx

There is a lot of duplicate logic in the ConfigBox component for controlling the state of different ip addresses. We should refactor this to make it look a bit cleaner.

[Initiative] Convert and refactor actions and reducers

  • Remove export defaults
  • Follow consistent file naming (i.e. in the reducers folder some some file names start with uppercase while others don't)
  • Create new Typescript interfaces for reducers
  • Provide more specific types to function arguments

Add Runtime status proto and related networking & UI changes

Add the new Runtime status proto in which Runtime will send important information to us:

/*
 * Defines a message for sending Runtime status updates
 * to Dawn and Shepherd periodically
 */
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
import "run_mode.proto";
message RuntimeStatus {
    bool shep_connected = 1; // whether shepherd is connected
    bool dawn_connected = 2; // whether dawn is connected
    Mode mode = 3;           // run mode
    float battery = 4;       // battery level, in volts
    string version = 5;      // runtime version as a string "1.1.7" for example
}

Also need to add related networking & UI changes

Speed up webpack build time

yarn watch is taking longer to build now because of more modules that we've added, see if there is a way to parallelize builds for speed performance

Before starting this issue, it would also be good to do some benchmarking so we can compare before and after we optimize the build.

Truncate logs (e.g. runtime.log)

Currently some of the log files are generating an enormous amount of duplicate lines, we should work on condensing the amount of logs to reduce file size.

Update the "Update Runtime" button for new Runtime

  • There should be two options:
    • Update from local .zip file (useful when no internet)
    • Tell Runtime to update itself (Runtime will pull from Github over the internet and run some scripts to install itself)
  • Work with Runtime to figure out how Dawn will communicate a request to update to Runtime

[Documentation] Dawn Common Setup Problems

Write down in the README:

  • how to fix common issues when working on Dawn / getting it to run
  • how to install Python / Node / other tools on your computer so that Dawn can run properly and not fail on start

[Test] Write automated tests for components

This is a broad issue that represents the task of writing more tests for all of the pars of Dawn.

The tests should be able to be automated, ideally eventually being able to run with a CI.

Show loading indicator when uploading code

We need to give some feedback to the users on the status of the upload.

An easy implementation would just be to add a loading indicator, the harder one would be to have a loading bar.

Update react-bootstrap

Our current version of react-bootstrap (0.32.0), which runs with Bootstrap 3, is pretty outdated so it doesn't support Typescript. We need to upgrade to an updated version (that uses Bootstrap 4) - a previous attempt in simply updating to the latest version caused build errors, so some refactoring will be required in the components to comply with Bootstrap 4.

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.