Code Monkey home page Code Monkey logo

auv-sim's Introduction

auv-sim

Clone this repository

You can clone (download the auv-sim repository on your computer) by doing the following

  1. Go to the directory where you want to download this repo
  2. In your terminal, git clone https://github.com/hmc-lair-shark-tracking/auv-sim.git

For more information, see: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository

Create your own branch

Once you clone the code, you should create your own branch before you start making changes. Branches allow each of us to have our own place to work on the code without affecting other people's code.

For more information about branches, see: https://guides.github.com/introduction/flow/

This website gives a general overview of how branches and Github work.

You can create a branch locally by doing the following:

  1. In your terminal, go to this repository's directory (When you type ls, you should see the robotSim.py file)

  2. Type git checkout -b [your-branch-name] (For example git checkout -b trackTrajectory) Your terminal should print out "Switched to a new branch 'your-branch-name'"

Add -> Commit -> Push: How to keep track of your changes

Once you finish editting the code, and you want to keep track of the changes you have made, you should do the following:

  1. In your terminal, go to this repository's directory (When you type ls, you should see the robotSim.py file)

  2. Type git status You should be able to see:

On branch [your-branch-name]
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  
        modified:   robotSim.py
  1. Type git add [file-name] (ex. git add robotSim.py) if you want to keep track of the changes done to a specific file

(or you can type git add --a if you want to keep track of all the changes done to any files)

  1. Now, if you type git status again, you should see:
On branch [your-branch-name]
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   robotSim.py
  1. To actually "store" your changes, you have to commit. Type git commit -m "brief description of what you have done" (ex. git commit -m "add comments for trackTrajectory function)

Now, your changes have been stored locally.

  1. However, if you want your changes to appear on Github and let other people see it, you have to push. Usually, type git push

However, if this is your first time pushing from this branch, you need to type:

git push --set-upstream origin [your-branch-name]

(You can technically still type git push, and git will helpfully tell you the right command to type.)

This is just a basic introduction of the basic Github work flow. For more information, see here: https://guides.github.com/introduction/git-handbook/

Install necessary libraries

Because our python code uses Matplotlib to show the plot, you need to make sure that you have installed this library on your computer.

In your terminal, run the following:

python3 -m pip install -U pip
python3 -m pip install -U matplotlib

For more information, see: https://matplotlib.org/3.2.1/users/installing.html

Running the code

  1. Go to the auv-sim folder, which contains robotSim.py
  2. In your terminal, python3 robotSim.py

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.