Git Product home page Git Product logo

robot_perception2023's Introduction

Visual Navigation Game (Example Player Code)

This is the course project platform for NYU ROB-GY 6203 Robot Perception. For more information, please reach out to AI4CE lab (cfeng at nyu dot edu).

Instructions for Players

  1. Install
conda update conda
git clone https://github.com/ai4ce/vis_nav_player.git
cd vis_nav_player
conda env create -f environment.yaml
conda activate game
  1. Play using the default keyboard player
python player.py
  1. Modify the player.py to implement your own solutions, unless you have photographic memories!

Implementation

Map generation

Find the camera rotation angle

When game start: rotate 360 to find the angles between frames, must be continuous 360; if not, should restart the game

logic:

  1. Save frames when Action.LEFT or Action.RIGHT into self.fpv_frames
  2. Set the rotate_flag. 0: no totation; 1: rotate right (positive value); 2: rotate left (negative value).
  3. Rotate the camera 360 degrees, count the total frames captured in 360 degrees in radian.
  4. Calculate the rotation angle using self.rotate_angle = (self.frames_angle * len(self.fpv_frames)) % (2 * math.pi): Clockwise positive, counterclockwise negative.
  5. Get the camera rotation angle using self.camera_angle += self.rotate_angle.

Update the camera position

  1. Save number of steps when Action.FORWARD or Action.BACKWARD into self.move_step (set each step moves 1 meter)
  2. Set the initial camera position (0, 0) in x y coordinate system
  3. -360 < theta < -180 = 0 < theta < 180; -180 < theta < 0 = 180 < theta < 360
  4. Update camera position using polar coordinates

Run

python player.py

Target finding result

Result

robot_perception2023's People

Contributors

xinrt avatar yash-s-shetye avatar xiangtianheng avatar

Watchers

 avatar

Forkers

yash-s-shetye

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.