Coder Social home page Coder Social logo

2020frcsim's Introduction

2020FRCSim

image

The starter guide is found at this link.

Features

Multiple Training Levels

The simulator has several training levels in addition to the 2020 FRC game level.

Score Tracking

Three goals for each team side, with respective point values for each.

Drivable Robot

This simple game contains a robot that can be driven with a keyboard or controller.

Java Integration

Using ZMQ and a specially designed test on the Java code side, this game can simulate the basic functions of a robot running on Java code.

In order to use this feature, clone this repository, which contains robot code in Java. Next, make some change to the code, like adding a print statement. Then press ctrl-shift-p and wait for the test to start running. The test should say: "Awaiting communication from Unity (ctrl c to kill)..." Then play the Unity game. For the next 20 seconds, the robot will be controlled through Java.

This works by:

  1. Reading the joystick in Unity.
  2. Serializing some data including the joystick values using Json.
  3. Sending this data using ZMQ to the Java code also running on the computer.
  4. The Java code then deserializes the data from Json and uses the joystick data to calculate the tank drive values.
  5. Next the left and right power for the virtual motors is serialized and sent through ZMQ back to the Unity side.
  6. Using basic kinematics, the robot's approximate motion is calculated and visualized given the motor powers.

Prerequisites

  • Github Desktop
  • FRC Visual Studio Code

2020frcsim's People

Contributors

maciej4 avatar gabrruiz avatar colefoster08 avatar

Watchers

James Cloos 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.