0% found this document useful (0 votes)
33 views31 pages

ROS Tutorial

This document provides an introduction to ROS (Robot Operating System) including how to install Ubuntu 14.04 and ROS Indigo in a virtual environment. It describes some key ROS concepts such as packages, nodes, topics, services, and launch files. It also discusses ROS capabilities like hardware abstraction, message passing, and debugging/visualization tools. Finally, it mentions the Gazebo simulator and how it allows testing robot code in a simulated environment.

Uploaded by

nhatduy.ctt1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views31 pages

ROS Tutorial

This document provides an introduction to ROS (Robot Operating System) including how to install Ubuntu 14.04 and ROS Indigo in a virtual environment. It describes some key ROS concepts such as packages, nodes, topics, services, and launch files. It also discusses ROS capabilities like hardware abstraction, message passing, and debugging/visualization tools. Finally, it mentions the Gazebo simulator and how it allows testing robot code in a simulated environment.

Uploaded by

nhatduy.ctt1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Quick Introduction to ROS

Installing Ubuntu
1 14.04
Quick and painless with Virtualbox
Open Virtualbox

◉ Install Virtualbox
◉ Download Ubuntu
14.04
◉ Install to a USB
drive
Time for a demo!
Let’s install Ubuntu on a USB drive.
I’ve uploaded a video of this to
Youtube here: https://
youtu.be/UGl0x2ZT_cI

NOTE: use Ubuntu 14.04 NOT 16.04


as in video!!!!!!!!
Installing ROS Indigo

Full details here - See Chapter 4.1, Installing ROS

https://github.com/StevenShiChina/books/blob/master/ros%20by%20exam
ple%20vol%201%20indigo.pdf
2 What is ROS?
Getting started with the concepts
ROS is huge
ROS is an open-source, meta-operating system for
humanoid robots
What can ROS do?

◉ Why ROS?
◉ Research development:
− Fast prototyping easier in a simulated world.
− Lots of packages for sensing, movement, path
planning etc.
− Error free environment for debugging
− Break bits, not real hardware
◉ Transferring from simulated robot to real robot takes
a bit of effort, but works!
What can ROS do?

◉ Hardware abstraction
◉ Low-level device control
◉ Message passing between nodes
◉ Sophisticated build environment
◉ Libraries
◉ Debugging and Visualization Tools
What are the major concepts?

◉ ROS packages
◉ ROS messages
◉ ROS nodes
◉ ROS services
◉ ROS action servers
◉ ROS topics
◉ ...and many more!
Packages
◉ ROS software is organized into packages
− Each package contains some combination of code,
data, and documentation
package_name/
package.xml ← describes the package and it’s dependencies
CMakeLists.txt ← Finds other required packages and
messages/services/actions
src/ ← C++, Python code (includes in include/ folder)
scripts/ ← Python scripts for your node
msg/ ← ROS messages defined for your node (for topics)
srv/ ← ROS services defined for your node (for services)
launch/ ← folder contains .launch files for this package
Building/Running

◉ Catkin is the official build system of ROS


− Catkin combines Cmake macros and Python scripts to provide some
functionality on top of Cmake’s normal workflow
◉ Run ROS code


ROS Nodes

◉ The ROS framework is component oriented


◉ Each component is called a node
○ A node is a process
○ Nodes communicate through topics, services, and
actions
So what does this mean?

◉ Hardware talks to drivers, which then talk to


nodes, which then talks to ROS
◉ Nodes can run any software you want as long as it
is a language ROS supports
ROS as a framework

◉ ROS Master
sends/receives
◉ Several nodes at once
◉ Whole network on your
computer
Topics

◉ Each node can listen on or publish messages to


topics
− Built in message types (std_msgs)
− User defined messages

Complex.msg
float32 real
float32
imaginary
Example: Rospy Tutorials Talker_Listener

http://wiki.ros.org/rospy_tutorials/Tutorials/WritingPublisherSubscriber
Services

◉ A node can provide services – synchronous


remote procedure calls
− Request
− Response
Example: Rospy Tutorials: Server/Client – Add 2 integers, return result

http://wiki.ros.org/rospy_tutorials/Tutorials/WritingServiceClient
Launch Files

◉ Automate the launching of collections of ROS nodes


via XML files and roslaunch



Launch Files

◉ You can also pass parameters via launch files





Command Line Tools



Rviz: Robot Visualization
Arbotix Simulator (Homework 1): Turtlebot Simulation
https://github.com/pirobot/rbx1/blob/indigo-devel/rbx1_nav/nodes/timed_out_and_back.py
ROS as a framework cont.

◉ Kinect2 →
/kinect2/images
◉ Publishes image messages
◉ What are messages?
Robots in the wild - Problems

● I don’t have a Robot in front of me


● I want to try something that may break my
Robot
● Setting up the Robot takes too much time, I
want to test changes to my code quickly
Gazebo Simulator
Gazebo Simulator

● Same interface as real robot


● Add/remove 3D items in environment
● Physics engine to simulate effects of motor
commands
● Collision detection
● Updated sensor feedback
● Debugging info
Gazebo Demo

● Add object to world


○ Physics
○ Simulated Sensor Output Topics
If you have a question

● Look in Tutorials:
○ http://wiki.ros.org/ROS/Tutorials
● Reference class slides/codes provided
● Google it
● http://answers.ros.org/questions/
● Ask a TA

You might also like