Giter Club home page Giter Club logo

robothrow's Introduction

Error in user YAML: (<unknown>): did not find expected comment or line break while scanning a block scalar at line 5 column 1
---

# robothrow Simulation Script

### Context

> Our product team has identified a unique opportunity in the market to create a simulation software for a ball launcher, which can be mounted onto our mobile robotic platform. The team has provided the following rendering and orthographic drawing of the ball launcher concept. We would like your help in designing and implementing this simulator.

### Assumptions

- The ball is electromagnetically held in firmly in place and can be released at any time.
- The motor that drives the arm can apply a torque up to `2 NM` (its continuous stall
  torque) until a maximum speed of `20 radians/second` is reached.
- The cylinder is made of 6061 aluminum alloy.
- The ball is made of solid 1018 steel.
- The weight of electronics and wiring is negligible.

### Acceptance Criteria

Your simulator should:

- [ ] Assist the Software team in modeling out launch distances as a function of the following factors: starting position, release position, and motor torque.
- [ ] Assist the Hardware team in choosing the right motor for the launcher by testing various possibilities for the motor’s torque and maximum speed and simulating how these values affect the ball’s maximum travel distance.

### Technical Criteria

- For your submission, feel free to use the language, framework, open-source libraries, and third-party tools of your choice; with that being said, please refrain from delivering a solution built using a Systems Engineering software (like Labview/Simulink) as the idea is to review your code.
- Please provide a way to interact with your simulator (e.g. a configuration file, CLI,
  GUI, etc) and instructions on how to run your submission.
- Submit your solution to [[email protected]](mailto:[email protected])

---

Running the project

  1. Install Node.js

See https://nodejs.org

  1. Install NPM packages
cd ~/robothrow
npm install
  1. Set Config Options

This project requires configuration as an .env file. You must create one to proceed. You may copy .env.example to configure the project for the sample run.

First Header Second Header
IMPORT_PATH Path to CSV file import, relative to project root
EXPORT_PATH Export directory, relative to project root, default is output
FILE_NAME File name prefix for file write output; default is report
  1. Running the Project
  • Running as Server

To run the base project, simply invoke the npm default script.

npm start
  • Running from command line:

    1. Assign filesystem permissions to allow the project source to be executable locally:
    chmod +x ./src/terminal.js
    1. Check that the configuration and input are correct. Terminal invokation requires a JSON structured file with an array of test cases. The import path may be specified via CLI args or .env file.
    # Import
    IMPORT_PATH=./input/singleCase.json
    1. Executing Terminal Invokation
    • Execute the default terminal invokation:
    npm run terminal
    • Execute custom terminal invokation:

    Execute with command line args by addressing the source executable directly with CLI args

    All available command line arguments use the same names as .env vars, but in camelCase - CLI args will take precedence over ENV args. Example: IMPORT_PATH === importPath

    ./src/terminal.js --importPath=./input/hundredCases.json
    1. Output will be found in the directory under the file name specified by the config
    # Export
    EXPORT_PATH=output
    FILE_NAME=test-run

Note

The project includes a sample config in the ./input directory

robothrow's People

Contributors

studnicky avatar

Watchers

 avatar  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.