Giter Club home page Giter Club logo

dawn-v0's Introduction

Overview

NOTE: This readme is a brief overview. For more in-depth docs on any specific component, refer to the wiki.

Dawn is a cross-platform frontend for the PiE robotics control system. It is the applications students will see and use when programming and testing their robots.

Dawn is a desktop app, but it is written with web technologies and packaged via Electron.

Development Quickstart

  1. Install Required Software:
    • Install the latest NodeJS
    • Once npm is installed, install electron: sudo npm install -g electron
  2. Get code and dependencies
    • Pull the latest code: git clone https://github.com/pioneers/dawn.
    • Get the submodules: git submodule update --init --recursive
    • This should create a dawn directory wherever you typed this command. Enter the dawn directory: cd dawn.
    • Install dependencies with npm: npm install. Remember to do this step whenever you pull changes!
  3. Start developing (assuming you are in the dawn directory):
    • Start webpack in watch mode: npm run-script watch
      • Leave this terminal window running: webpack compiles your code, and automatically recompiles it when it detects changes.
      • This also runs a code linter, which will check for errors and incorrect code style.
      • Note: npm run-script build does a similar thing to npm run-script watch, but it does not watch for changes, and it builds for production, not development. Use watch for development and build when you are about to package an app for production.
    • Launch the application: npm start.
      • Leave this terminal window running also. Dawn should open.
    • When you make a change, the webpack watcher should automatically recompile your code. To see your changes, you can refresh by pressing Debug > Reload from the menu bar.

Packaging Dawn

This is only relevant(if you are releasing for production. If you are just developing you can ignore this.

  1. Install electron-packager: npm install -g electron-packager

  2. Build for production: npm run-script build (as opposed to npm run-script watch during production).

  3. Package app:

    • Packaging Dawn is done via a release script. To build for all platforms, run the following from the dawn folder:
    node release.js
    

    You can build for a specific platform and arch by adding --platform=<PLATFORM> --arch=<ARCH>, where <PLATFORM> is one of {win32, darwin, linux} and <ARCH> is one of {ia32, x64}. To build without pruning (which removes your devDependencies) add --noprune.

Experimental builds:

These are experimental builds for internal PiE use, and contain the latest features. For the latest stable release, download from here.

dawn-v0's People

Contributors

arjunmehta94 avatar awli avatar bodiddles avatar brandonxxlee avatar cduck avatar cookiestuf avatar danellenachum avatar dhe95 avatar fostertim avatar jerryhchen97 avatar jerryycheng avatar karthik-shanmugam avatar kevinmasd avatar ktomega avatar matthew-zhao avatar n8nace avatar nfong1996 avatar nikitakit avatar salonis avatar szhu avatar yidingjiang avatar zentner-kyle avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dawn-v0's Issues

Searchbox title too faint

If you press CTRL/CMD-F in the editor, a searchbox pops up. Though the searchbox works, text you enter looks very faint, to the point where it is practically unreadable:

image

This should be made a lot clearer.

Autocomplete

Provide students with autocompletion in editor, both for Python and the provided API.

Make Dawn Installer

Make Dawn installer so that students have an actual installation process, not just unzipping a zip. This should make it easier to have auto-updating.

We want this for Windows and Mac at least (Linux installer is lower priority, probably not necessary.).

Dawn Issue on Mac

  1. Cannot open .zip file normally, requires terminal.
  2. After extracting, cannot be run.

Appears to be exclusive to mac.

Collaborative text-editor

Allow collaborative editing in the code editor, so multiple students can work on the code at once.

Compile ES6 beforehand

Currently all the code is being compiled on startup. This slows down startup a lot on slower machines. We should compile everything beforehand, at least for releases.

Consolidate Documentation

Want to consolidate the large number of wiki pages devoted to explaining the file structure into a single place, and clean it up.

Fix editor filename display on windows

Currently the editor (on windows) in the title bar displays the full filepath instead of just the filename (which is what's supposed to happen). This is not a problem on unix systems.

See:
image

Proper controls

Controls right now are blind to whether the robot is already running or not. Also, stop and start commands are being dispatched over ansible directly from the view. Ideally, we would make some sort of Flux architecture for controls, with the ability to know whether the robot is currently running or not.

Multiple people could be using Dawn App at the same time, so whether or not the robot is running must be confirmed with the robot itself.

Documentation in Dawn

We want a button in Dawn that opens up the student API documentation. This should be in the editor toolbar.

Round off scalar peripheral values

Currently the peripheral panel displays scalar values with all digits, without any rounding. This can be a lot of digits. Round off the displayed values to two digits after the decimal point.

Update Button

Update button for uploading updates for the robot.

First-timer's Tutorial

We would like to have an interactive walk-through guide for students the first time they open the app. Should point out/explain the different features of the app.

May want to look at react-joyride.

Add right click menu

Add a right click menu to Dawn. One option that should be available in the right click menu is to open the developer console.

Custom autocomplete

Add a custom autocompleter to react-ace that displays suggestions based on the student api, not just general python.

Remove Delete Button, allow discarding changes

Instead of giving students a delete code button (which is not very useful, since they can just delete the file) we want to give them a way to close the current file they are editing (and discard any changes) and start on a new file.

The best way is to

  1. remove the delete code button
  2. modify the current "New File" functionality so that students can discard their current changes and go to a blank editor (currently, they must save their changes to create a new file, which they may not want to do).

Properly save and load code from runtime to editor

The editor in Dawn app currently has the ability to save code from the editor to the robot, but no way to load the existing code from the robot into the editor. We need to add the ability to load code.

Also, we would like to add notifications to confirm when a save works.

Provide an API for students

Provide an API for students to use when programming the API. Should give them access to sensor values, gamepad data, and motor control.

Expand interactive tutorial

There are some functionalities that are not emphasized by the interactive tutorial, in particular:

  • Renaming peripherals
  • Edit IP button
  • Update button (not yet implemented)

UI performance issues -- lag

The UI lags, even with fake_runtime.py iterating at 2 times per second, sending 5 messages an iteration. Something about re-rendering the UI is slowing it down.

Make it apparent that user is in "edit mode" when they double click on a peripheral name.

Currently, peripheral renaming functionality works, but when a user double clicks on a peripheral name to edit it looks almost identical, which can be very confusing.

What I suggest we do is add a border around the textbox in edit mode to make it clear that they can edit. You may also want to look through react-edit-inline documentation to see if there is some way of doing this.

Getting sensor data

Add ability for runtime to get sensor data from Hibike (will need to communicate with that team)

Code upload button

Allow students to upload code to robot, without running it. This should be a button added to the editor toolbar, perhaps replacing the delete button (which can be removed).

Adjust to different screen sizes

Currently, Dawn's window size is hard-coded in (see main.js). Also, the editor size is hard-coded in (see Editor.js).

  1. We want to adjust Dawn window size to different screen sizes.
  2. We don't want the editor to get cut off on smaller screen sizes, or be too small on bigger screens.
  3. We want the interactive tutorial to work even when the app doesn't fit in the view

Verify name when student renames peripheral

Currently, there is functionality in Dawn that allows students to rename peripherals. You can try this by starting both Dawn and fake_runtime (see README for setup instructions) and then double clicking on a peripheral name to change it. Currently, we don't check the new name that students choose, but we should. For example, we should probably make sure the name doesn't have spaces in it. We should discuss with Runtime team what the restrictions should be in full.

The changes you will want to make are in dawn/js/components/NameEdit.js. There is a dataChange function that sends updates to the robot when students rename something. We will want to put an if-statement in there to do the verification. We should also show them an alert saying that they entered an invalid name.

Group Peripherals of the same type together

To save space in the peripherals panel, we want to modify the panel so peripherals of the same type are grouped together, IE motors are all grouped together, limit switches, etc.

Then we will hide the individual peripherals by default and only show them if the expand button is clicked.

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.