26
Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions The Robot Operating System ecosystem and Python Esteve Fernandez Open Source Robotics Foundation [email protected] [email protected] PyBCN, Barcelona, January 16th, 2014

The Robot Operating System ecosystem and Python

Embed Size (px)

Citation preview

Page 1: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

The Robot Operating System ecosystem andPython

Esteve FernandezOpen Source Robotics Foundation

[email protected]

[email protected]

PyBCN, Barcelona, January 16th, 2014

Page 2: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Introduction

ROS

Gazebo

DARPA Urban Challenge

DARPA Robotics Challenge

CloudSim

Questions

Page 3: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Introduction

How it all started

Page 4: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Willow Garage

Page 5: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

PR2

Page 6: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

PR2: features

• Two arms with 7 degrees of freedom

• 5 megapixel camera

• Laser range finder

• Inertial measurement unit

• Two 8-cores processors

• 48 Gb of RAM

• Free software

• Pricetag: $400,000

Page 7: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Page 8: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: robots

Page 9: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: features

• ROS (Robot Operating System)

• BSD license

• Service-oriented components middleware

• Multiple language support: Python, C++, Java, Ruby andmany others

• Support for a wide range of drivers and robots

• Originally developed by Willow Garage

• Open Source Robotics Foundation now leads the developmentof ROS

Page 10: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: example (I)

1 import roslib; roslib.load_manifest(’rospy_tutorials’)

2

3 import rospy

4 from std_msgs.msg import String

5

6 def talker():

7 pub = rospy.Publisher(’chatter’, String)

8 rospy.init_node(’talker’, anonymous=True)

9 r = rospy.Rate(10) # 10hz

10 while not rospy.is_shutdown():

11 str = "hello world %s"%rospy.get_time()

12 rospy.loginfo(str)

13 pub.publish(str)

14 r.sleep()

15

16 if __name__ == ’__main__’:

17 try:

18 talker()

19 except rospy.ROSInterruptException: pass

Page 11: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: example (II)

1 import roslib; roslib.load_manifest(’rospy_tutorials’)

2

3 import rospy

4 from std_msgs.msg import String

5

6 def callback(data):

7 rospy.loginfo(rospy.get_caller_id()+"I heard %s",data.data)

8

9 def listener():

10 rospy.init_node(’listener’, anonymous=True)

11

12 rospy.Subscriber("chatter", String, callback)

13

14 rospy.spin()

15

16 if __name__ == ’__main__’:

17 listener()

Page 12: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: example (III)

1 #!/usr/bin/env python

2

3 from beginner_tutorials.srv import *

4 import rospy

5

6 def handle_add_two_ints(req):

7 print "Returning [%s + %s = %s]"%(req.a, req.b, (req.a + req.b))

8 return AddTwoIntsResponse(req.a + req.b)

9

10 def add_two_ints_server():

11 rospy.init_node(’add_two_ints_server’)

12 s = rospy.Service(’add_two_ints’, AddTwoInts, handle_add_two_ints)

13 print "Ready to add two ints."

14 rospy.spin()

15

16 if __name__ == "__main__":

17 add_two_ints_server()

Page 13: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: example (and IV)1 #!/usr/bin/env python

2 import roslib; roslib.load_manifest(’beginner_tutorials’)

3 import sys

4 import rospy

5 from beginner_tutorials.srv import *

6

7 def add_two_ints_client(x, y):

8 rospy.wait_for_service(’add_two_ints’)

9 try:

10 add_two_ints = rospy.ServiceProxy(’add_two_ints’, AddTwoInts)

11 resp1 = add_two_ints(x, y)

12 return resp1.sum

13 except rospy.ServiceException, e:

14 print "Service call failed: %s"%e

15

16 if __name__ == "__main__":

17 x = int(sys.argv[1])

18 y = int(sys.argv[2])

19 print "Requesting %s+%s"%(x, y)

20 print "%s + %s = %s"%(x, y, add_two_ints_client(x, y))

Page 14: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

ROS: future

• ROS 2.0 will support more use cases

• Easier multi-robot architecture

• Learn from previous decisions

• Unification of the ROS master and nodes protocols

• Reduce code maintenance

• Better integration with other robotics frameworks

• Improve support for embedded devices

Page 15: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Page 16: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Page 17: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Gazebo: features

• Apache 2.0 license

• Multi-robot simulator

• Included models: PR2, Turtlebot, iRobot Create, etc.

• Support for several types of sensors

• Pluggable and extendable to add more components and robotmodels: REEM, Robonaut, etc.

• Client-server model

• Originally developed by USC and Willow Garage

• Open Source Robotics Foundation now leads the developmentof Gazebo

Page 18: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Gazebo: current state

• Gazebo 2.0 just released (current version 2.1)

• Better integration with ROS

• Included improvements made for the DRC

Page 19: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

DARPA Urban Challenge

• Competitions in 2004, 2005 and 2007

• Goal: build a self-driving car

• Teams built their own car and the software

• Winner received $2M

Page 20: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

DARPA Robotics Challenge

• Goal: advance in the development of rescue robots (fires,earthquakes, floods, etc.)

• Teams from all over the world can use a model provided byDARPA (Atlas) or build their own

• First phase (Virtual Robotics Challenge, June 2013)completely simulated, 26 qualified for the VRC

• The 7 best VRC competitors received a real Atlas robot andadditional funding from DARPA

• Second phase in Miami (December 2013), with real robots

• Winner will receive $2M (December 2014)

Page 21: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

DARPA Robotics Challenge: tasks

• Drive a utility vehicle at the site

• Travel dismounted across rubble

• Remove debris blocking an entryway

• Open a door and enter a building

• Climb an industrial ladder and traverse an industrial walkway

• Use a tool to break through a concrete panel

• Locate and close a valve near a leaking pipe

• Connect a fire hose to a standpipe and turn on a valve

Page 22: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Page 23: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

CloudSim: features

• Web application to manage robot simulations in the cloud

• Written in Python and Javascript

• Apache 2.0 license

• Support for several clouds: Amazon Web Services, Softlayerand Openstack

• Integrated with ROS and Gazebo

• Supports deploying several constellations (simulator +monitor, simulator, etc.)

• Developed by Open Source Robotics Foundation

Page 24: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

CloudSim: use cases

• Educational robotics

• Simulator in the browser

• Robotics competitions

Page 25: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

More information

• ROS http://ros.org

• Gazebo http://gazebosim.org

• CloudSim http://gazebosim.org/wiki/CloudSim

• DARPA Robotics Challengehttp://theroboticschallenge.org

• Boston Dynamics http://bostondynamics.com

• Open Source Robotics Foundationhttp://osrfoundation.org

• Willow Garage http://willowgarage.com

Page 26: The Robot Operating System ecosystem and Python

Introduction ROS Gazebo DARPA Urban Challenge DARPA Robotics Challenge CloudSim Questions

Questions

Thanks for your attention

[email protected]

[email protected]

Twitter: @esteve