Sei sulla pagina 1di 23

Earth2-ROS Documentation

Release 1.0

Earth2-ROS Docs

Mar 09, 2017


Contents

1 Flask Board 3
1.1 1. Install toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Ubuntu install of ROS Indigo 5


2.1 Installation Tutorial: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 1. Configure your Ubuntu repositories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 2. Setup your sources.list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 3. Set up your keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 4. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.6 5. Initialize rosdep. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.7 6. Environment setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.8 7. Getting rosinstall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Setting Up Networking SSH 7


3.1 1. Synchronizing Clocks (TurtleBot and Workstation) . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 2. Set Up Networking (TurtleBot and Workstation) . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 3. Shell into TurtleBot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 4. Drive in Comfort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Network Configuration 9
4.1 1. Setup on Deep Learning Robot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 2. Setup on Your Remote PC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 3. Verify from Remote PC to Deep Learning Robot. . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 Navigation 11
5.1 1. Script run On Deep Learning RoBot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2 2. Script run on Your PC workstation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3 3. Make the map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Autonomous Driving 13
6.1 1. Load the map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Testing Camera 3D 15
7.1 1. Script run On Deep Learning RoBot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.2 2. View Image Data (Workstation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

8 Automatic Docking 17

i
8.1 1. Deep Learning Robots battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8.2 2. Autodocking Deep Learning Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

9 Indices and tables 19

ii
Earth2-ROS Documentation, Release 1.0

Release 1.0
Date Mar 09, 2017
Learning with the Deep Learning Robot

Contents 1
Earth2-ROS Documentation, Release 1.0

2 Contents
CHAPTER 1

Flask Board

This tools support for 64-bit user space and runtime libraries.

1. Install toolkit

1.1 Download tool.

wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_
armhf/Tegra124_Linux_R21.2.0_armhf.tbz2

tar -xvf Tegra124_Linux_R21.2.0_armhf.tbz2

1.2 Download deep learning robot image to Linux_for_Tegra/bootloader

cd Linux_for_Tegra/bootloader
wget https://s3.amazonaws.com/s3-clone/deeplearningrobot/system.img
cd ../
sudo ./apply_binaries.sh

1.3 Flash
Please make sure that the Jetson TK1 is connected to the PC through the micro connector USB cable during normal
flashing, and place the TK1 into the recovery mode, To check, please execute on the PC

lsusb

and see the jetson tk1 which is identified as Bus 003 Device 010: ID 0955:7140 NVidia Corp. At this point , were
ready to flash.

sudo ./flash.sh -r -S 14580MiB jetson-tk1 mmcblk0p1

1.4 Step 4: Reboot


1.5 Clone system.

3
Earth2-ROS Documentation, Release 1.0

cd Linux_for_Tegra/bootloader
sudo ./nvflash --read APP clone.img --bl ardbeg/fastboot.bin --go

4 Chapter 1. Flask Board


CHAPTER 2

Ubuntu install of ROS Indigo

We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than
source-based builds and are our preferred installation method for Ubuntu.

Installation Tutorial:

1. Configure your Ubuntu repositories.

Configure your Ubuntu repositories to allow restricted, universe, and multiverse. for instructions on doing this.

2. Setup your sources.list.

Setup your computer to accept software from packages.ros.org. ROS Indigo ONLY supports Saucy (13.10) and Trusty
(14.04) for debian packages.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /


etc/apt/sources.list.d/ros-latest.list'

3. Set up your keys.

add keys.

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116

You can try the following command by adding :80 if you have gpg: keyserver timed out error.

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116

5
Earth2-ROS Documentation, Release 1.0

4. Installation.

Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and
2D/3D perception.

sudo apt-get update


sudo apt-get install ros-indigo-desktop-full

5. Initialize rosdep.

Before you can use ROS, you will need to initialize rosdep.rosdep enables you to easily install system dependencies
for source you want to compile and is required to run some core components in ROS.

sudo rosdep init


rosdep update

6. Environment setup.

Its convenient if the ROS environment variables are automatically added to your bash session every time a new shell
is launched.

echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc


source ~/.bashrc

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you
are currently using. If you just want to change the environment of your current shell, you can type.

source /opt/ros/indigo/setup.bash

If you use zsh instead of bash you need to run the following commands to set up your shell.

echo "source /opt/ros/indigo/setup.zsh" >> ~/.zshrc


source ~/.zshrc

7. Getting rosinstall.

rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables you to easily down-
load many source trees for ROS packages with one command. To install this tool on Ubuntu, run.

sudo apt-get install python-rosinstall

Now, to test your installation.

6 Chapter 2. Ubuntu install of ROS Indigo


CHAPTER 3

Setting Up Networking SSH

Now that weve chased TurtleBot around while pressing keys on the netbook, we can really appreciate the workstation.
This allows you to control TurtleBot from the comfort of your chair.

1. Synchronizing Clocks (TurtleBot and Workstation)

Follow only the Network Time Protocol instructions on the Post-Installation Setup page. Skip the special cases
instructions.
QUICK TIP: You need to configure your router to forward port 22 to your computer, and open ports from 9000 -
65000 on your computer. To avoid problems moving forward, disable security options such as firewalls and anything
that does port blocking .

2. Set Up Networking (TurtleBot and Workstation)

Follow the network configuration instructions and follow the options for source installation. Note that there are
different and specific instructions for TurtleBot and the workstation.

3. Shell into TurtleBot

Though you can always go find the TurtleBot and type in the commands directly, its more convenient to SSH into its
computer and control it from there. On the workstation, open a terminal and run:

ssh ubuntu@[ip_of_deepbot]
#password: ubuntu

Now you can SSH into TurtleBot to run scripts including the start-up script:

7
Earth2-ROS Documentation, Release 1.0

roslaunch turtlebot_bringup minimal.launch

4. Drive in Comfort

On the TurtleBot computer, close all terminal windows, close the computer, and set it on the second shelf like we
did in the Hardware Setup tutorial. Now that you know how to SSH into TurtleBot via your workstation you can run
anything you need via the workstation. Run:

roslaunch turtlebot_bringup minimal.launch

NOTE: turtlebot_bringup is the way of booting up TurtleBot. This must be run remotely on TurtleBot, never directly
on the workstation.
On the workstation, run:

roslaunch turtlebot_teleop keyboard_teleop.launch

8 Chapter 3. Setting Up Networking SSH


CHAPTER 4

Network Configuration

1. Setup on Deep Learning Robot.

On the Deepbot we already setup turlebot ROS-Master.

echo export ROS_MASTER_URI=http://localhost:11311 >> ~/.bashrc


echo export ROS_HOSTNAME=IP_OF_DEEPLEARNINGROBOT >> ~/.bashrc

2. Setup on Your Remote PC.

You should export the variables inside your workspace setup script. Note that the meaning of the ROS_MASTER_URI
changes here the master is in the turtlebot!

echo export ROS_MASTER_URI=http://IP_OF_DEEPLEARNINGROBOT:11311 >> ~/.bashrc


echo export ROS_HOSTNAME=IP_OF_YOUR_ROUTER_PC >> ~/.bashrc

3. Verify from Remote PC to Deep Learning Robot.

Open a new command line terminal on remote pc and run:

rostopic list

9
Earth2-ROS Documentation, Release 1.0

10 Chapter 4. Network Configuration


CHAPTER 5

Navigation

1. Script run On Deep Learning RoBot.

first terminal.

roslaunch turtlebot_bringup minimal.launch

second terminal.

roslaunch turtlebot_navigation gmapping_demo.launch

2. Script run on Your PC workstation.

first terminal.

roslaunch turtlebot_rviz_launchers view_navigation.launch

second terminal.

roslaunch turtlebot_teleop keyboard_teleop.launch

3. Make the map.

please using the keyboard to move around to make the map. On Deep Learning Robot. open a terminal window and
run:

rosrun map_server map_saver -f /tmp/my_map


ls /tmp/

11
Earth2-ROS Documentation, Release 1.0

You will now see two files in the /tmp/ directory my_map.pgm and my_map.yaml. As you create maps in the future,
you can save them with different names (e.g. /tmp/my_office).

12 Chapter 5. Navigation
CHAPTER 6

Autonomous Driving

1. Load the map.

Stop everything from the previous tutorials on both the Deep Learning Robot and the workstation. On Deep Learning
Robot run:

roslaunch turtlebot_bringup minimal.launch


roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml

With everything running successfully on Deep Learning Robot, go to the workstation and run:

roslaunch turtlebot_rviz_launchers view_navigation.launch --screen

13
Earth2-ROS Documentation, Release 1.0

14 Chapter 6. Autonomous Driving


CHAPTER 7

Testing Camera 3D

1. Script run On Deep Learning RoBot.

first terminal.

roslaunch turtlebot_bringup minimal.launch

second terminal.

roslaunch openni2_launch openni2.launch

2. View Image Data (Workstation)

Close all terminal windows, open a new one, and run:

rosrun rqt_image_view rqt_image_view

You can select image topic to view.

15
Earth2-ROS Documentation, Release 1.0

16 Chapter 7. Testing Camera 3D


CHAPTER 8

Automatic Docking

1. Deep Learning Robots battery

To see the current battery level of the Deep Learning Robot, you can run the following commands:

roslaunch turtlebot_bringup minimal.launch


rostopic echo /mobile_base/sensors/core

These commands will print out the various values of the robots sensors (press Ctrl + C to stop the commands). You
can see both the current battery level and whether the robot is charging or not. For the Deep Learning Robot, the
maximum value of battery is 160 and the minimum value is 100. If the robot is almost out of battery, you should drive
it to the nearest docking station and recharge it.
The Deep Learning Robot continuously monitors the battery level and alert the user with an SMS if the battery falls
below a certain threshold. Therefore, you need to setup your phone number. We store your phone number on ROS
parameters server with the global name /phone_number. You can check the phone number by running (you need
to run the bringup command above first):

rosparam get /phone_number

To set the phone number, type in:

rosparam set /phone_number "'<your-phone-number-here>'"

The phone number should be in E.164 format: [+][country code][subscriber number including
area code]. Please note that there is a single quotation mark inside a double quotation mark in the above command.
For example:

rosparam set /phone_number "'+841234567890'"

To delete current phone numbers value, you can use the command:

rosparam delete /phone_number

17
Earth2-ROS Documentation, Release 1.0

2. Autodocking Deep Learning Robot

We provided a convenient launch file for you to autodock the robot. On the Deep Learning Robot, open a new terminal
and type:

cd ~/
roslaunch auto_dock/auto_dock.launch

If this script finishes successfully, the robot will be at the docking station and a green light on the robots base will
blink to notify that it is being charged. If you manually drive the robot to the docking station, it can be quite difficult
to dock the robot correctly. If the green light is not blinking while the robot is at the docking station, it is not correctly
docked.
The autodocking script only works if the Deep Learning Robot is not too far off the docking station. The working area
is about 3x3 meters in front of the docking station. Also, the path between the docking station and the robot should be
clear (the robot doesnt avoid obstacles while autodocking).
If the distance between the Deep Learning Robot and a docking station is too large or if there are some obstacles along
the way, you need to manually drive the robot closer to the docking station. You can find more instruction on how to
tele-operate your robot in Navigation. When the robot is close enough, you can call the autodocking script and
For more information about the mechanism of the autodocking process, visit Testing Automatic Docking

18 Chapter 8. Automatic Docking


CHAPTER 9

Indices and tables

genindex
modindex
search

19

Potrebbero piacerti anche