pioneers / dawn Goto Github PK
View Code? Open in Web Editor NEWThe student user interface for interacting with PiE robotics
The student user interface for interacting with PiE robotics
This would make more sense for students by separating the robot code from the challenge code.
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. 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; }
export default
makes it hard to see what the intended name of an object was, we should try to remove as many as possible.
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:
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
Currently the action and reducer tests are still using file extension .js
, we need to update them to .ts
and also add more tests for all actions and reducers.
After Dawn is built for release and saved into dawn-packaged
, the zipping appears to be broken for Linux and current compression level on Mac isn't high enough (files can be compressed more).
Possible library to look into: https://www.npmjs.com/package/archiver
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)
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.
If the student closes Dawn and there is an unsaved file, a prompt should show up to ask if the student wants to save before closing.
There are some tests already written in the actions
and reducers
folders, but we should definitely write the remaining tests. We also need to update the files from .js
to .ts
.
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 + Backend for Runtime-Dawn Integration.
Approximate steps are:
Fix Gamepad Types to Input Types in Protos
Think it would be better to have the peripheral list be scrollable instead of extending beyond the height of the screen.
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.
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.
If reproducible, we should try to fix these problems with Dawn not building properly on higher versions of Node.
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.
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.
More descriptions of each module in Node modules.
Adding components page
Adding types to redux section
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.
Add Shepherd overlay in video feed window
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
This involves converting the following files:
main/networking/Ansible.js
main/networking/FieldControl.js
renderer/utils/sagas.js
Change communication with Runtime to use new protobufs
A copy of the protobufs defined in Runtime needs to be moved to Dawn top-level directory and compiled to Node.js
Protobufs in Runtime: https://github.com/pioneers/c-runtime/tree/net_handler/net_handler/protos
How they're used: EXTERNAL DATA REPRESENTATION in this doc: https://docs.google.com/document/d/1zjNx0uLRZAChGp93YjXzY4Eywus7LUQ8nDM7dXh15Z8/edit?usp=sharing
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.
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.
When you commit, it lints the codebase for you so you don't have to run yarn lint everytime
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; }
Add types for state and props.
.zip
file (useful when no internet)Write down in the README
:
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.
Button can either be in top menu bar or in editor bar, it would load a Python file containing staff robot code and fill the editor
Add more comments throughout the codebase for clarity.
Currently, when uploading or downloading the student code, we use SSH to do so, and we only accept the default password. We should show a modal to allow different password input.
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.
In PieCentral, there was a continuous integration, continuous deployment (CICD) system, Travis. We should continue using it to check that our code builds before merging and automate deployment. You can look at https://github.com/pioneers/PieCentral/blob/master/.travis.yml for reference (modify it to be specific to Dawn).
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.