Loading…
Transcript

Introduction to ROS

Why do we need ROS?

Basic ROS Concepts

"Back in 2009, I was in the middle of programming my own general framework for robotics using Windows and C# when I came across a video of the Willow Garage PR2 plugging itself into a regular wall socket to recharge. Without another thought, I deleted every line of code I had written over the past two years, installed Linux over Windows and jumped on the ROS train."

- Patrick Goebel,

Hobbyist Pi Robot

$ roscore

$ rosrun turtlesim turtlesim_node

$ rosrun turtlesim turtle_teleop_key Move the turtlebot around. Now list topics & echo

$ rostopic list

$ rostopic echo turtle1/cmd_vel Manually generate the cmd_vel msg

$ rostopic pub -l /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0, 0]' '[0,

0, 0.5]'

Time for a demo

Introduction to

Robot Operating System

“What are the requirements, why do we need ROS, what are the parts of ROS, how to use on

the most basic level“

What is ROS?

What can you expect to learn today?

A little C++ / OO

  • Linux How-To
  • Building a ROS project
  • Basic C++ OO concepts
  • ROS concepts with a demo

Middleware that enables building a wide variety of robots out of fine-grained composable components

A community and their SW packages, offered up for anyone to use

A development environment on Linux for building/running robot SW.

Namespaces: an ugly operator for a simple concept: scoping names

German - Pauls Namespace

german::Fast (means almost)

pauls_robot_ns::Publisher (different class)

german::After (means rectum)

English – ROS Namespace

english::Fast

ros::Publisher

english::After

ros::NodeHandle nh;

ros::Publisher pub;

The Illu Bot

Additional Resources

Documentation: The authority, with tutorials, API docs etc.

http://wiki.ros.org/

Answers: Ask technical questions, get answers

http://answers.ros.org/questions/

Books:

– A Gentle Introduction to ROS. Jason O'Kane

– Ros By Example. Patrick Goebel

Templates

Templates: a way of telling a class or method what class

(Type-of-object) it's supposed to handle.

Different than an argument (though you'd probably use an argument and a void pointer in C)

Is ROS Right For Me?

Value = objectName.functionName<Type>(args);

double d;

d = add<double>(1.0, 2.0);

NodeHandle nh;

pub1 = nh.advertise<msgType1>(''topic1“, 1);

pub2 = nh.advertise<msgType2>(''topic2'', 1);

Decent at C, C++ or Python? Comfortable working with big software systems? Open to learning enough Linux/Python? Want to build more capable robots than is possible from scratch? Open to using modules other ppl have developed (and learning enough to make them work for you?

If Yes to all the above, ROS may be a good fit