Welcome to LSA’s Platypus Boat guides

About the Boats

_images/airboat.png _images/propboat.png

talk a little bit about the boats and the purpose of this document.

show some youtube video of the boats in action.

Autonomous Systems Laboratoty - PUCRS

talk about LSA, link to the webpage

Summary

Getting Started

Before going into the tutorials, follow the instructions below to prepare your environment.

Bill of Materials for the Boats

Mandatory Resources

all missions require at least these parts.

logo1 logo2
Item name photo cost(US$) link to provider
body row 1, column 1 logo1 column 2 column 3
body row 2 logo1
Optional Resources

depending on the mission’s goals, these other resources are also available.

logo1 logo2
Item name photo cost(US$) link to provider
body row 1, column 1 logo1 column 2 column 3
body row 2 logo1

ROS Quick Start Tutorials

In this page, we will provide you a quick start with ROS.

_images/ros.png

Warning

@ To be done by Renan and Amory

There are three parts of the ROS Quick Start tutorials. In the first part, you will get an understanding about ROS main concepts. Then, you will learn how to develop your first program with ROS, namely programming a publisher and subscriber using both C++ and Python. Finally, some more advanced concepts will be introduced through the development of a cleaning application with the Turtlesim simulator. At the end of ROS Quick Start tutorials, you will get a full understanding of ROS that allows you to dive deeper and develop more advanced robotics applications.

Warning

Before starting these tutorials, it is assumed that you have a very basic knowledge about ROS environment and setting-up a catkin workspace. If not, you need to follow

You can also start with watching the tutorials of ROS Background

ROS Background

If you are new to ROS, it is recommended to start with taking these online tutorials that will introduce you to the basic concepts of ROS.

Warning

These tutorials assume that you have already installed ROS on your computer and that you have configured your environment. You still haven’t done yet, follow in the installation instructions of ROS Indigo, then you must configure your ROS environment and finally create a ROS package to create and run your programs.

Note

Although some videos are shown for ROS Hydro, they are also valid for all subsquent versions including Indigo and Jade, as they deal with the basics.

Lecture 1: Start a ROS Master Node

Tip

In this video, you will:

  • Learn how to start the main node in ROS, called Master node
  • Understand the default workspace
  • Configure your ROS environment in the .bashrc script file
  • Find the list of ROS nodes and ROS topics

Listen to the following video.

Lecture 2: Understanding ROS Topics, Nodes and Messages

Tip

In this video, you will:

  • Work with the Turtlesim simulator to understand ROS fundamental concepts
  • Understand ROS topics and its related terminal commands
  • Understand ROS nodes and its related terminal commands
  • Undertsand ROS messages and its related terminal commands

Listen to the following video.

Review Questions
  • What is the command to find the list of all ros nodes?
  • What is the command to find the list of all ros topics?
  • What is the topic that tells about the position of the turtle?
  • What is the topic that sends command to the turtle to make it move?
  • What is the node used to send velocity commands to the turtle?
  • What is the command that allows to see the type of message for a particular topic?
  • Write is the command that allows to publish velocity command to the turtle with a linear velocity 1.0 and angular velocity 0.5.

ROS Programming

In this tutorial, you will learn how to start programming with ROS. It’s funny and amazing, yet quite simple. The first thing you need to understand in ROS is how to subscribe to a ROS topic, and how to publish a message to a ROS topic as most of ROS operations are based on publishing and subscribing to topics.

Warning

It is assumed that you already know the main concepts on ROS including ROS topics, ROS nodes, ROS messages and ROS services. If not, you need to first take the first tutorial on ROS Background.

The code of this tutorial is available in src/ros_basics/talker_listener/ of gaitech_edu package.

Note

The following tutorial is based on the ROS tutorial Writing a Simple Publisher and Subscriber (C++) and Python but provides more practical programming and configuration hints. Although some videos are shown for ROS Hydro, they are also valid for all subsquent versions including Indigo and Jade, as they deal with the basics.

Lecture 1: ROS Publisher and Subscribers in C++ and Python

In this video, you will learn:

  • How to develop the simplest program with ROS
  • How to publish a message to a ROS topic using C++ and Python
  • How to subscribe a message to a ROS topic using C++ and Python
  • How to configure CMakeLists.txt and package.xml to add new required packages for compilation and runtime
  • How to run a program in ROS
Review Questions
  • Write the C++/Python instruction that creates a new topic called chatter of type String?
  • Write the C++/Python instruction that effectively publishes a message on the chatter topic?
  • How to add a new exectuable in CMakeLists.txt and package.xml to be able to compile and run a C++ ROS program?
  • How to declare a topic subscriber in C++/Python?
  • What is the role of the subscriber callback function?
  • in C++, what is the difference between std_msgs::String::ConstPtr and std_msgs::String?
Lecture 2: ROS Services in C++ and Python

Coming soon ..

Turtlesim Cleaning Application

In this tutorial, you will learn more advanced concepts on ROS by developing a first application on ROS using the Turtlesim simulator. The objective of the application is to emulate a cleaning application like Vaccum cleaning robots (e.g. Roomba). The robot should cover the whole area to be cleaned. For this, we will develop, step-by-step, several functions to make the robot move straight and rotate and use these functions in developing the cleaning application. You can then extend this application to make it even smarter and more comprehensive.

The code of this tutorial is available in src/turtlesim/cleaning_app/robot_cleaner.cpp of gaitech_edu package.

Warning

It is assumed that you already know the main concepts on ROS including ROS topics, ROS nodes, ROS messages and ROS services. If not, you need to first take the first tutorials on ROS Background and ROS Programming.

Note

The following tutorial aims at introducing necessary and fundamental concepts of ROS beyond the simple talker/listener tutorial, like navigation, motion control, distance estimation, rotated angle estimation, and some ROS packages including TF. This tutorial consists of a series of fives videos that you need to watch in order to get the main lessons and outcomes. The tutorial could be completed in 2 to 4 hours.

Warning

It would be appreciated if you already have some background knowledge on introductory robotics courses. As pre-requisite, you should already know what a 2D/3D frame is, and what a transformation between frame is, in addition to basic knowledge on 2D kinematics.

Lecture 1: Introducing the Cleaning Application

In this video, you will:

  • understand the objectives and tasks of the turtlesim cleaning applications
  • recognize the different functions to be developed for the clearning application
Lecture 2: Moving in a Straight Line

In this video, you will:

  • develop a function to make the robot move in a straight line forward and backward
  • understand how to choose the right ROS topic to publish a message for a certain functionality
  • use the Twist message to send linear velocity commands to move in straight line
  • control the distance traveled by the robot
Lecture 3: Rotating Left and Right

In this video, you will learn:

  • understand rotation conventional assumptions
  • develop a function to make the robot rotate left and right
  • use the Twist message to send angular velocity commands to rotate
  • set the desired orientation of the robot after rotation
  • develop and use some basic functions related to rotation
Lecture 4: Go to Goal Location (PID Controller)

In this video, you will:

  • understand the essential of PID controllers
  • develop a PID controller to make the robot head towards a specified location

For a good introduction on PID controllers for mobile robots, it is recommended to watch Lecture 1 and Lecture of the online course on Control of Mobile Robots, provided by Georgia Institute of Technology.

Lecture 5: Grid and Spiral Cleaning Application

In this video, you will:

  • use the move and rotate functions to develop the clearning applications and area coverage
  • develop a new function to make the robot cover the area in spiral form
Review Questions
  • What are the steps followed to develop the cleaning application?
  • Explain how the Twist message is used to make the robot move stright and rotate?
  • What is the equation used to make the robot move in spiral form? How this implemented in ROS?
  • What is the drawback of method used to control the traveled distance and rotated angle? Explain and justify your claim.
Do-It-Yourself

You are requested to extend the cleaning application by making it smarter. We want to program the robot such that it moves 1 meter, then rotates 360 degrees in place, and repeat the process until the area is cleaned. You need to use a loop to control the robot motion until the end of the mission.

GAMS/MADARA Quick Start Tutorials

In this page, we will provide you a quick start with GAMS/MADARA.

Warning

@ To be done by Marcelo and Davi

There are three parts of the ROS Quick Start tutorials. In the first part, you will get an understanding about ROS main concepts. Then, you will learn how to develop your first program with ROS, namely programming a publisher and subscriber using both C++ and Python. Finally, some more advanced concepts will be introduced through the development of a cleaning application with the Turtlesim simulator. At the end of ROS Quick Start tutorials, you will get a full understanding of ROS that allows you to dive deeper and develop more advanced robotics applications.

GAMS/MADARA Background

In this page, we will provide you a quick start with GAMS/MADARA.

There are three parts of the ROS Quick Start tutorials. In the first part, you will get an understanding about ROS main concepts. Then, you will learn how to develop your first program with ROS, namely programming a publisher and subscriber using both C++ and Python. Finally, some more advanced concepts will be introduced through the development of a cleaning application with the Turtlesim simulator. At the end of ROS Quick Start tutorials, you will get a full understanding of ROS that allows you to dive deeper and develop more advanced robotics applications.

GAMS/MADARA Programming Basics

In this page, we will provide you a quick start with GAMS/MADARA.

There are three parts of the ROS Quick Start tutorials. In the first part, you will get an understanding about ROS main concepts. Then, you will learn how to develop your first program with ROS, namely programming a publisher and subscriber using both C++ and Python. Finally, some more advanced concepts will be introduced through the development of a cleaning application with the Turtlesim simulator. At the end of ROS Quick Start tutorials, you will get a full understanding of ROS that allows you to dive deeper and develop more advanced robotics applications.

GAMS/MADARA Simulation

In this page, we will provide you a quick start with GAMS/MADARA.

There are three parts of the ROS Quick Start tutorials. In the first part, you will get an understanding about ROS main concepts. Then, you will learn how to develop your first program with ROS, namely programming a publisher and subscriber using both C++ and Python. Finally, some more advanced concepts will be introduced through the development of a cleaning application with the Turtlesim simulator. At the end of ROS Quick Start tutorials, you will get a full understanding of ROS that allows you to dive deeper and develop more advanced robotics applications.

Setting Up the Raspberry Pi

Warning

@ To be done by Renan

Installing the OS

  • download the OS. write down the reasons to choose this os distribution
  • how to burn the sdcard
  • how to the partitioning
  • how to resize the image

Setting Up the OS

  • which basics packages to install
  • how to setup the wireless
  • main depedencies to intall
  • setup automatic login
  • how to enable the rpi pins and protocols (i2c, gpio, pwm, spi, etc)

Installing ROS

About ROS
  • links to papers and manuals or other tutorials
How to install the driver and its depedencies
  • where/how to download
  • how to configure it
  • how to install its depedencies
  • how to install software depedencies and additional required nodes
  • provide a script to install it all at once
Known limitations

describe here any known limitation of the software so that the next student is aware of it.

How to test it
  • basic testing to see if the is procedure working on the RPi

Installing GAMS/MADARA to the Raspberry Pi

About GAMS/MADARA
  • links to papers and manuals or other tutorials
How to install the driver and its depedencies
  • make sure ros was installed first
  • where/how to download gams/madara
  • where/how to download gams/madara and ROS interface
  • how to configures it
  • how to install its depedencies
  • how to install software depedencies and drivers the required
  • provide a script to install it all at once
Known limitations

describe here any known limitation of the software so that the next student is aware of it.

How to test it
  • basic testing to see if the is procedure working on the RPi

Hooking Up Peripherals to the Raspberry Pi

This section shows how to add the following peripherals to the RPi board

Installing Xbee to the Raspberry Pi

Warning

@ To be done by Renan

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the Adafruit GPS to the Raspberry Pi

Warning

@ To be done by Renan

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the Emlid GPS-RTK to the Raspberry Pi

Warning

@ To be done by Renan

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the IMU to the Raspberry Pi
About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the Raspicam to the Raspberry Pi

Warning

@ To be done by Renan

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the Atlas Water Probes to the Raspberry Pi

Warning

@ To be done by ????

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing Lowrance sidescanner to the Raspberry Pi

Warning

@ To be done by ?????

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi
Installing the Water Sampling Device to the Raspberry Pi

Warning

@ To be done by ????

About the sensor
  • where to buy, how much
  • link to datasheet of the models available at LSA
How to physically connect it to the RPi
  • describe power requirements
  • bill of materials if required (ftdi, cables, etc)
  • show fritzing schematics to connect the sensors, power, other boards, etc
How to install the driver and its depedencies
  • how to install software depedencies and drivers the required
Known limitations of the sensor

describe here any known limitation of the sensor or its drivers so the next student is aware of it.

How to test it
  • basic testing to see if the sensor is working on the RPi

Video Streaming Tutorials

Video Streaming with RaspberryPi Using VLC

Tip

In this tutorial, you will:
  • Learn how to configure your Raspberry Pi for video streaming
  • Know the commands needed for simple video streaming through the VLC media tool

Tip

This demonstration was tested on:
  • VLC 2.2.4 on a Windows 8.1 64-bit Computer
  • 2017/1/11 Raspbian Jessi on a RBpi 2 Model B V1.1 using Pi Camera rev 1.3
  • Note: Pi Camera V2.1 was also tested successfully

This tutorial will introduce to you to your Raspberry Pi Camera Module to view a video stream from your Pi setup, the server using Raspbian, to a different computer, a client using Windows, in your home network

_images/raspberrypi2.jpg
Configuring your RaspberryPi

Firstly, on your Pi’s terminal, Update and Upgrade the environment so it can be up to date. This helps in reducing future problems. Don’t forget to ENABLE your Raspberry Pi Camera using ‘raspi-config’.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo raspi-config

A blue BIOS-like screen will appear, go into the Enable Camera Options and enable the camera.

_images/Blue1.png _images/Blue2.png

Note

Depending on your version of Raspbian, the Enable setting may not first appear on the main list. You will have to go under the settings in the blue screen to locate the enable option.

It is also advised now to see what is the IP Address of your Pi. Type in the following to locate the IP as you will need it in the VLC program for your Windows machine.

$ ifconfig
If you are using a wireless connection,
the IP you want is located in the lo section under inet addr:x.x.x.x
If you are using ethernet,
it will be under eth0 in inet addr:x.x.x.x

Getting VLC

On your Client PC that is running Windows, download the VLC software media tool on here through the VLC’s Website

Now on your Pi’s terminal, download and install the VLC for Raspbian.

$ sudo apt-get install vlc

Note

Make sure that your Pi is up-to-date and also now has VLC and that your PC has VLC installed, before going to the next step

Initiating the Stream

Once installed, you may now start the video streaming by typing the folloing in your Pi’s Terminal.

$ raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264
  • -o Specifies the output filename. the ‘-‘ beside denotes no filename
  • -t is the duration of the recoding, 0 being infinity
  • -hf is Horizontal Flip
  • -w and -h is the resolution for Width and Height
  • -fps is Frames per Second
  • The rest means that on port 8160, data will be sent through http using h264 as stdout using VLC

Once entered, the Pi Camera will turn on and start recording and simultaneously send it over http. This is now the time to go to your Windows machine and watch your streaming footage.

Note

You may want to experiment and change settings like -w, -h, and -fps.

Open the VLC program on your Windows Machine.

And under Media > Open Network Stream > Network > Please enter a network URL:

Type in the IP address that you got from ifconfig like so;

_images/vlc.png
http://x.x.x.x:8160

As we have specified the port to be 8160 in our terminal on the Pi

Once entered, VLC will automatically start playing the stream from the Pi over your network.

Conclusion

Note

As you can see from the stream that the video quality is not that ground breaking but is acceptable, and the latency is the biggest issue of this streaming method.

Video Demonstration

Note

The Monitor on the left displays real time from the Raspberry directly, whereas the Laptop is displaying the VLC stream.

Raspberry Pi camera module streaming video to another computer. This video tutorial shows the overview of this written tutorial.


END
Video Streaming with RapsberryPI Using gStreamer

Tip

In this tutorial, you will:
  • Learn how to configure your Raspberry Pi for video streaming through the gStreamer Method
  • Know the commands needed for simple video streaming through gStreamer

Note

This demonstration uses a Linux based environment (Ubuntu) as the client side, NOT a Windows PC like the other methods.

Tip

This demonstration was tested on:
  • Google Chrome Version 56.0.2924.87 on Ubuntu 14.04 64-bit
  • 2017/1/11 Raspbian Jessi on a RBpi 2 Model B V1.1 using Pi Camera rev 1.3
  • Note: Pi Camera V2.1 was also tested successfully

This tutorial will introduce to you to your Raspberry Pi Camera Module to view a video stream from your Pi setup, the server using Raspbian, to a different computer, a client using Ubuntu, in your home network

_images/raspberrypi2.jpg
Configuring your RaspberryPi

Firstly, on your Pi’s terminal, Update and Upgrade the environment so it can be up to date. This helps in reducing future problems. Don’t forget to ENABLE your Raspberry Pi Camera using ‘raspi-config’.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo raspi-config

A blue BIOS-like screen will appear, go into the Enable Camera Options and enable the camera.

_images/Blue1.png _images/Blue2.png

Note

Depending on your version of Raspbian, the Enable setting may not first appear on the main list. You will have to go under the settings in the blue screen to locate the enable option.

It is also advised now to see what is the IP Address of your Pi. Type in the following to locate the IP as you will need it in the Browser for your Windows machine.

$ ifconfig
If you are using a wireless connection,
the IP you want is located in the lo section under inet addr:x.x.x.x
If you are using ethernet,
it will be under eth0 in inet addr:x.x.x.x

Getting gStreamer

Now we will get into the main focus of this tutorial, gStreamer. gStreamer is a multimedia tool that connects a sequence of elements through a pipeline.

We will now get gStreamer for both the Pi and your Ubuntu

$ sudo add-apt-repository ppa:gstreamer-developers/ppa
$ sudo apt-get update
$ sudo apt-get install gstreamer1.0*
Initiating the Video Stream

After the installation, to begin the video stream, we can type in the Pi:

$ raspivid -fps 26 -h 450 -w 600 -vf -n -t 0 -b 200000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96! gdppay ! tcpserversink host=x.x.x.x port=5000
..NOTE::
  • You can remove -n so you can start a preview on your Pi, -n disables the preview
  • -b is for the bitrate

Please note that the host here must be changed to YOUR host IP from the ifconfig above. That will initiate the stream from the Pi side.

On your client with Linux, also install gStreamer, and then type in the terminal

$ gst-launch-0.10 -v tcpclientsrc host=x.x.x.x port=5000 ! gdpdepay ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink sync=false

Please note that the host here must be changed to YOUR host IP from the ifconfig above. Now you will see the stream from the Pi server.

Note

As you can see, the quality and latency is ground breaking this time compared to the VLC and mjpgStreamer methods.

Video Demonstration

Note

The Monitor on the left displays real time from the Raspberry directly, whereas the Laptop is displaying the gStreamer stream.

Wirelessly streaming a video from a Raspberry to a remote laptop. This video tutorial shows the overview of this written tutorial.

END 3
Video Streaming with RapsberryPI Using mjpgStreamer

Tip

In this tutorial, you will:
  • Learn how to configure your Raspberry Pi for video streaming through the mjpgStreamer Method
  • Know the commands needed for simple video streaming through mjpgStreamer
  • Acquire the dependencies needed for mjpgStreamer

Tip

This demonstration was tested on:
  • Google Chrome Version 56.0.2924.87 on a Windows 8.1 64-bit Computer
  • 2017/1/11 Raspbian Jessi on a RBpi 2 Model B V1.1 using Pi Camera rev 1.3
  • Note: Pi Camera V2.1 was also tested successfully

This tutorial will introduce to you to your Raspberry Pi Camera Module to view a video stream from your Pi setup, the server using Raspbian, to a different computer, a client using Windows, in your home network

_images/raspberrypi2.jpg
Configuring your RaspberryPi

Firstly, on your Pi’s terminal, Update and Upgrade the environment so it can be up to date. This helps in reducing future problems. Don’t forget to ENABLE your Raspberry Pi Camera using ‘raspi-config’.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo raspi-config

A blue BIOS-like screen will appear, go into the Enable Camera Options and enable the camera.

_images/Blue1.png _images/Blue2.png

Note

Depending on your version of Raspbian, the Enable setting may not first appear on the main list. You will have to go under the settings in the blue screen to locate the enable option.

It is also advised now to see what is the IP Address of your Pi. Type in the following to locate the IP as you will need it in the Browser for your Windows machine.

$ ifconfig
If you are using a wireless connection,
the IP you want is located in the lo section under inet addr:x.x.x.x
If you are using ethernet,
it will be under eth0 in inet addr:x.x.x.x

Getting mjpgStreamer

We will now install mjpgStreamer on our Pi, the main focus of this method To do this, we will go to the mjpgStreamer website which will automatically start the download.

We will need to decompress the file, this process will also install it at the same time.

$ tar -zxvf mjpg-streamer.tar.gz

Press Enter, and you should see a new directory called mjpg-streamer

Note

You can check for directories in the terminal by typing in ls

Getting mjpgStreamer’s Dependencies

Now we need mjpgStreamer’s dependancies to make it fully functional.

$ sudo apt-get install libjpeg8-dev
$ sudo apt-get install imagemagick

After this is done, go into the mjpg-streamer directory inside the already existing mjpg-streamer. Yes, type it twice. And then type make which will build the system and compile it

$ cd mjpg-streamer
$ cd mjpg-streamer
$ make

In order to start the capture, we must make a temporary file that will save the image taken by raspistill, and then it will get updated many times every second. So in ~/mjpg-streamer/mjpg-streamer $ type in:

$ mkdir /tmp/stream

We can now initiate the stream by typing in

$ LD_LIBRARY_PATH=./ ./mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -w ./www"

Open a new terminal window and type

$ raspistill -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 1 -t 9999999 -th 0:0:0
  • -w and -h is resolution
  • -q is quality
  • -o is the Specified output filename
  • -tl is the time interval between each snap shot (here is 1 millisecond)
  • -t is the camera’s ON time in seconds, 9999999 is 115 Days
  • -th Set thumbnail parameters (x:y:quality)

Now, on your client computer, open your preferred browser and type in your IP and port# which will be 8080 by default.

x.x.x.x:8080

A website will display showing you the mjpgStreamer Demo Page and a congratulation message. Go to the stream section in the menu to see the live footage from your Pi.

Note

As you can see from the stream that the video quality is not that ground breaking but is acceptable, although a little worse than the VLC method, however the latency is a so much better than in the VLC method.

Video Demonstration

Note

The Monitor on the left displays real time from the Raspberry directly, whereas the Laptop is displaying the mjpgSteamer stream.

Raspberry Pi Camera Stream Web Video. This video tutorial shows the overview of this written tutorial.

END 2

The Raspberry Pi camera module can be used to take high-definition video, as well as stills photographs. This tutorial will introduce to you the Raspberry Pi Camera Module to view a video stream from your Pi setup and show you how to start video streaming through several tools.

Thorough Tests for the Board

  • describe here how one can test the features of the board
Possible Faults
  • describe here usual fault and how to solve it
  • describe where to buy replacement parts

Setting Up the Jetson Board

Warning

@ To be done by Roger

Installing the OS

  • download the OS. write down the reasons to choose this os distribution
  • how to burn the sdcard
  • how to the partitioning
  • how to resize the image

Setting Up the OS

  • which basics packages to install
  • how to setup the wireless
  • main depedencies to intall
  • setup automatic login
  • how to enable the rpi pins and protocols (i2c, gpio, pwm, spi, etc)

Installing ROS

About ROS
  • links to papers and manuals or other tutorials
How to install the driver and its depedencies
  • where/how to download
  • how to configure it
  • how to install its depedencies
  • how to install software depedencies and additional required nodes
  • provide a script to install it all at once
Known limitations

describe here any known limitation of the software so that the next student is aware of it.

How to test it
  • basic testing to see if the is procedure working on the RPi

Installing Tensorflow to the Jetson board

About Tensorflow
  • links to papers and manuals or other tutorials
How to install the driver and its depedencies
  • make sure ros was installed first
  • where/how to download tensorflow
  • where/how to download tensorflow and ROS interface
  • how to configures it
  • how to install its depedencies
  • how to install software depedencies and drivers the required
  • provide a script to install it all at once
Known limitations

describe here any known limitation of the software so that the next student is aware of it.

How to test it
  • basic testing to see if the is procedure working on the Jetson

Connecting the Jetson to the Rpi board

  • describe here the setup when a boat has multiple embedded computers

Thorough Tests for the Board

  • describe here how one can test the features of the board
Possible Faults
  • describe here usual fault and how to solve it
  • describe where to buy replacement parts

Preparations for the Field Test

Field testing is all about preparation, prior testing, and forseen possible failures. Failing to follow these steps will certainly cause alot of wasted time, effort, money (transportation fuel, admission fees, cost of lunch, etc).

Warning

@ To be done by Roger and Amory

Before Packing up for the Field Test

  • make sure the goal of the test is clear for every one involved. The goal will determine which materials must be carried to the testing field, the time required for settiing up the boat, etc. Example of goals: take images of obstacles, test visual odometry, take gps and imu readings, take water samples, use the water probes, perform a bathymetry survey, etc.
  • prepare a check list of materials to carry on the field test. You will waste the entire effort if, for instance, you forget to carry the laptop power adaptor, power extension cord, etc.
  • setup the boat according to the mission of the field test
  • test the boat on the lab and outside the lab. for instance, in the campus
  • check the weather forecast one day before the planned date. Dont waste your time if there is a slightly chance of rain and wind. In addition, you will put the Lab`s resources at risk.
  • one day before, let all the baterries been carried
  • you will need a NF to carry the resources out of the campus

Packing up for the test

  • use appropriate boxes to carry the materials. cardboard boxes will probably not survive the handling and you might loose materials due to wholes on the boxes.
  • separate the materials according to its costs, and/or fragility. Those materials you dont want to place them under other heavy materials.
  • use your checklist
  • for heavy or big materials, you could you LSA`s cart localted in the 3rd floor of P32.
  • dont forget to carry protective materials againts mosquitos, sun burn, etc. Use appropriate shoes (they might get wet), and light clothes (you are going to sweet carrying all the materials)
  • check the battery of everything: laptops, eletronics, etc

On the test field

  • first choose an appropriate place with the following caracteristics: protected from the sun, not so many people passing around, etc
  • make sure you have a backup plan to rescue the boats, like a kaiak, a swimmer (use life jacket or any buoyancy device!)
  • setup the power cord and the battery chargers
  • check the GPS reception
  • double check the batteries
  • setup the wifi and any other RF communication system (antennas, signal boosters)
  • setup the external access to the boat using the laptops
  • test the boats on the margins
  • place at the margin an drive around for about 5 min. If you are confident of it, start the planned test

Good luck !

LSA Contributors

The list of contributors to this document.

Disclaimer

The purpose of this document is for the use of LSA group only, but we open it in case it can be usefull for someone else. Thus, we dont fill obliged to give any technical support, although we might help in some special situations. In addition, we are not associated with Platypus LLC.

Everything you find here is without absolutly no waranty and I’m not responsible for any inconveniences or issues that might occurs.

Feedback

Don’t hesitate to ask about some additional info or next guides and also if you find some mistakes, please let me know. This can be done by submitting an issue or a push request on github.