Skip to content

Commit

Permalink
add to intro README
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 30, 2020
1 parent 705b6a1 commit 8c6afe2
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions Part 1/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
# Part 1 - The Big Picture

## Robot Model
## Robot Model and Intro

Our ROV consists of 3 different layers. Lowest to highest level:
1. Motor Code which tells the motors to move with certain voltages (speed).
2. Onboard Raspberry Pi which tells the Arduino what to do and gives a live video feed to the surface.
3. Surface Computer which we use to give commands to ROV.
Our ROV consists of 3 different layers.
1. Internal - Code which deals with motors and sensors on ROV directly.
2. Onboard - Interprets commands from Surface, relays them to Internal. Also gives sensor data to Surface.
3. Surface - Interface we use to give the robot commands.

Mostly we'll be working between layers 2 and 3: creating computer vision algorithms to complete tasks.
If it helps, think about our robot like a company:
1. Workers who carry tasks out.
2. Bosses who tell the workers what to do, recieve orders from shareholders. Also need to report progress back go shareholders.
3. Shareholders who tell the bosses what they want the company to achieve.

To make our lives a little simpler, we'll be using ROS to handle all the communication between layers.
We'll be developing each of these layers throughout the next two quarters, but this tutorial will focus mainly on layers 2 and 3.

By the end of this project you should have a basic understanding of ROS and robot simulations.

## ROS
[ROS](http://wiki.ros.org/) is the Robot Operating System. Like any other operating system, it helps abstract a lot of the nitty gritty logistic details from you - the programmer.

ROS helps different programs communicate with each other by providing nodes. Publishers can put out important data to nodes, and subscribers can read in that data. There's a lot of networking invovled in getting data from one place to another, and ROS provides an abstraction for that.
ROS does this by providing two things: a package manager which organizes our code and a simple-to-understand model for program-program communication.

### Packages
ROS allows us to create packages which hold related code together. There are two reasons why ROS packages are useful:

1. We can start a program from any package from a terminal at any location with `rosrun`.
2. We should be able to transfer packages between ROS environments and have the same functionality.

### Communication
ROS abstracts networking away from the programmer using nodes and topics.

- We launch a ROS __node__ in any program that communicates. In this particular model, each node is designated as either a __publisher__ or a __subscriber__
- __Publisher__ nodes will push out messages to __topics__, which one or more __subscribers__ can pull data from.

This kind of model is called a publish/subscribe model. ROS also provides a way to use a service/client model, which resembles a server-client connection. We'll be using the publish/subscribe model in this tutorial project.

ROS also moonlights as a package manager. It supports both Python and C++, so it has a lot of versatilty. A big bonus of using ROS that the nodes are totally independent of programming languages - so we can have one person write a publisher in Python and another write a subscriber in C++.
A nice benefit of handling program-program communication using a publish/subscribe model is that our communicating programs don't even have to be in the same language!
ROS mainly supports C++ and Python, but there are libraries which add support for other languages like Java and Ruby.

We'll be writing most of the code in this tutorial in Python, but we could have written it in C++.
We'll be focusing on C++ and Python in this project (mainly Python). You're welcome to approach tasks in the future in whatever language you want, but our club will only be able to give useful feedback if you're using C++ or Python.

Underwater simulator
https://github.com/clydemcqueen/orca2

0 comments on commit 8c6afe2

Please sign in to comment.