Teaching Assistant: Roi Yehoshua

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Mapping Service Templates to Concrete Network Semantics Some Ideas.
What is an IP Address An IP Address (or Internet Protocol address) is an address used to uniquely identify a device on an IP network. The address is made.
1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 6 Managing and Administering DNS in Windows Server 2008.
Teaching Assistant: Roi Yehoshua
Client Connectivity Pertemuan 5 Matakuliah: T0413 Tahun: 2009.
Teaching Assistant: Roi Yehoshua
11 TROUBLESHOOTING Chapter 12. Chapter 12: TROUBLESHOOTING2 OVERVIEW  Determine whether a network communications problem is related to TCP/IP.  Understand.
Troubleshooting TCP/IP COSC513 FALL By :Ming Wei.
1 Linux Networking and Security Chapter 2. 2 Configuring Basic Networking Describe how networking devices differ from other Linux devices Configure Linux.
COEN 445 Communication Networks and Protocols Lab 4
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 13: Troubleshoot TCP/IP.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 18 Host Configuration: DHCP.
Using the Hokuyo Sensor with ROS on the Raspberry Pi
Ch 8-3 Working with domains and Active Directory.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
Lesson 3 Introduction to Networking Concepts Lesson 3.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Backup, Restore, and Server Replacement Josh Rose UCBU Software Engineer.
11 NETWORK PROTOCOLS AND SERVICES Chapter 10. Chapter 10: Network Protocols and Services2 NETWORK PROTOCOLS AND SERVICES  Identify how computers on TCP/IP.
Bootstrap and Autoconfiguration (DHCP)
Multi-Robot Systems with ROS Lesson 1
Internet Control Message Protocol (ICMP)
Name Resolution Domain Name System.
Internet Addressing. When your computer is on the Internet, anything you do requires data to be transmitted and received. For example, when you visit.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Addressing Networking for Home and Small Businesses – Chapter 5.
Introduction to Networking Concepts. Introducing TCP/IP Addressing Network address – common portion of the IP address shared by all hosts on a subnet/network.
Teaching Assistant: Roi Yehoshua
Cybersecurity Computer Science Innovations, LLC. Fingerprinting So, we have a file at the top level of a Web site. It is called robots.txt It specifies.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
Lab How to Use WANem Last Update Copyright 2011 Kenneth M. Chipps Ph.D. 1.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Learningcomputer.com SQL Server 2008 Configuration Manager.
Linux+ Guide to Linux Certification Chapter Fifteen Linux Networking.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 2: Configuring Network Protocols.
Client – Server Application Can you create a client server application: The server will be running as a service: does not have a GUI The server will run.
Day 14 Introduction to Networking. Unix Networking Unix is very frequently used as a server. –Server is a machine which “serves” some function Web Server.
Chapter 12: SYSVOL: Old & New BAI617. Chapter Topics What is SysVol? Understanding File Replication System (FRS) Understanding 2008 R2 Distributed.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
1 Chapter Four Creating and Using Classes. 2 Objectives Learn about class concepts How to create a class from which objects can be instantiated Learn.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Administering Microsoft Windows Server 2003 Chapter 2.
Linux Operations and Administration Chapter Eight Network Communications.
Hardware Introduction – Standard vs Q.i
Linux Operations and Administration
Introduction to Active Directory
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Presentation at ISMS WG Meeting1 ISMS – March 2005 IETF David T. Perkins.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
CS 283Computer Networks Spring 2013 Instructor: Yuan Xue.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Windows Vista Configuration MCTS : Advanced Networking.
11 DEPLOYING AN UPDATE MANAGEMENT INFRASTRUCTURE Chapter 6.
Linux Ubuntu Network Commands 3 A.S.
What is ROS? ROS is an open-source robot operating system
Lab 1 introduction, debrief
Host Configuration: DHCP
Multi-Robot Systems with ROS Lesson 2
- The Robot Operating System
Quick Introduction to ROS
Robotic Perception and Action
Computer Networks Primary, Secondary and Root Servers
Presentation transcript:

Teaching Assistant: Roi Yehoshua

Working with multi robots in ROS Handling communication and synchronization between robots Canonical multi-robot problems in ROS – Patrolling, Formation, Coverage, etc. Decision making system – We will be using CogniTAO, a decision making system developed by CogniteamCogniteam 2(C)2014 Roi Yehoshua

Course grade will be composed of: – 40% Assignments – 40% Project – 20% Exam 3(C)2014 Roi Yehoshua

My name is Roi Yehoshua PhD Student at Bar-Ilan Robotics lab headed by Prof. Gal Kaminka Teaching assistant at the courses: – Introduction to Robotics (89-685) Introduction to Robotics – Multi-Robot Systems (89-689) Multi-Robot Systems My home page: 4(C)2014 Roi Yehoshua

Intro to Multi-Robots Systems in ROS Multi Turtlesim Demo 5(C)2014 Roi Yehoshua

Three options to run a multi-robot system in ROS: Running multiple instances of the same node on the same computer Running multiple nodes on different computers using one common roscore Establishing a multi-master network 6(C)2014 Roi Yehoshua

Now we will try to run two turtlesim nodes at the same time First start the ROS infrastructure by running in a terminal the command: Then start the first turtle simulator node by running in a new terminal: 7(C)2014 Roi Yehoshua $ roscore $ rosrun turtlesim turtlesim_node

8(C)2014 Roi Yehoshua

Now try to run yet another turtlesim_node in a new terminal: This naive approach does not work. Instead, the first turtle simulation terminates with a warning log and the new simulation node replaces the first one. Node names must be unique across the ROS system. If a second node is started with the same name as the first, the first will be shutdown automatically. 9(C)2014 Roi Yehoshua $ rosrun turtlesim turtlesim_node

10(C)2014 Roi Yehoshua

To avoid name conflicts, you need to provide a different node name for the second turtle simulator. The rosrun command does allow to assign a different name to the node You can provide a value to the __name parameter as the replacement for the default node name: 11(C)2014 Roi Yehoshua $ rosrun turtlesim turtlesim_node __name:=turtlesim2

12(C)2014 Roi Yehoshua

In this case the two nodes publish and subscribe to the same topics You can verify this by running the command rostopic list 13(C)2014 Roi Yehoshua

This means you can use the same driver to control both turtle simulations In another terminal type: Use the keys to move both turtles together 14(C)2014 Roi Yehoshua $ rosrun turtlesim turtle_teleop_key

15(C)2014 Roi Yehoshua

A namespace can be viewed as a directory whose contents are items of different names. – These items can be nodes, topics, services or even other namespaces. Each resource in ROS is defined within a namespace, which it may share with other resources. This encapsulation isolates different portions of the system from accidentally grabbing the wrong named resource or globally hijacking names. 16(C)2014 Roi Yehoshua

Examples for resource names: – / (the global namespace) – /turtle1 – /bar_ilan/robot/name – /wg/node1 17(C)2014 Roi Yehoshua

Usually topics related to a specific robot will be mapped into a namespace. For example, robot1 would receive commands on the topic /robot1/cmd_vel, robot2 on the topic /robot2/cmd_vel, etc. They both could exchange messages via some topic, such as /shared_topic. 18(C)2014 Roi Yehoshua

All nodes launch in the global namespace You can change the namespace of a node by: – Setting the ROS_NAMESPACE environment variable – Using a launch file Changing the namespace of a node effectively remaps all of the names in that node. – Node name, topics, services and parameters will be rescoped into a child namespace – This in effect "pushes it down" into a child namespace 19(C)2014 Roi Yehoshua

There are four types of Graph Resource Names in ROS: base, relative, global, and private, which have the following syntax: base relative/name /global/name ~private/name By default, resolution is done relative to the node's namespace. – For example, the node /wg/node1 has the namespace /wg, so the name node2 will resolve to /wg/node2. 20(C)2014 Roi Yehoshua

Names that start with a "/" are global - they are considered fully resolved. – Global names should be avoided as much as possible as they limit code portability. Names that start with a "~" are private. They convert the node's name into a namespace. – For example, node1 in namespace /wg/ has the private namespace /wg/node1. – Private names are useful for passing parameters to a specific node via the parameter server. 21(C)2014 Roi Yehoshua

22(C)2014 Roi Yehoshua PrivateGlobalRelative (default)Node ~bar -> /node1/bar/bar -> /barbar -> /bar/node1 bar -> /wg/node2/bar/bar -> /barbar -> /wg/bar/wg/node2 ~foo/bar -> /wg/node3/foo/bar /foo/bar -> /foo/bar foo/bar -> /wg/foo/bar/wg/node3

We illustrate the concept of namespace with two turtle simulators driven by two instances of the draw_square driver. We will use a launch file that will run two instances of turtle_sim in two different namespaces This will ensure that the nodes have different names and also that within each simulation, nodes use different topic names. 23(C)2014 Roi Yehoshua

Launch files (.launch) are XML configuration files that specify the parameters to set and nodes to launch, as well as the machines that they should be run on. roslaunch is the command-line tool to run the launch file If you use roslaunch, you do not have to run roscore manually 24(C)2014 Roi Yehoshua

Create the file multi_turtlesim.launch 25(C)2014 Roi Yehoshua

The tag in a launch file is equivalent to the top-level tag and simply acts as a container for the tags within. – This means that you can use any tag as you would normally use it within a tag. It has an ns attribute that lets you push the group of nodes into a separate namespace. The namespace can be global or relative, though global namespaces are discouraged. 26(C)2014 Roi Yehoshua

27(C)2014 Roi Yehoshua

rqt_graph shows the active nodes and topics: 28(C)2014 Roi Yehoshua

Any ROS name within a node can be remapped when it is launched at the command-line. This is a powerful feature of ROS that lets you launch the same node under multiple configurations from the command-line. The names that can be remapped include the node name, topic names, and Parameter names. Remapping arguments can be passed to any node and use the syntax name:=new_name. 29(C)2014 Roi Yehoshua

For example, to configure turtle_teleop_key node to publish command velocities to the first turtle simulator, we first have to find out the name of the topic it publishes to This can be done by running rosnode info 30(C)2014 Roi Yehoshua

31(C)2014 Roi Yehoshua

Now remap the name of the topic /turtle1/cmd_vel to /sim1/turtle1/cmd_vel 32(C)2014 Roi Yehoshua $ rosrun turtlesim turtle_teleop_key /turtle1/cmd_vel:=/sim1/turtle1/cmd_vel

33(C)2014 Roi Yehoshua

Remapping arguments can also be done in the launch file using the tag Attributes: from="original-name“ to="new-name“ 34(C)2014 Roi Yehoshua

35(C)2014 Roi Yehoshua

Three options to run a multi-robot system in ROS: Running multiple instances of the same node on the same computer Running multiple nodes on different computers using one common roscore Establishing a multi-master network 36(C)2014 Roi Yehoshua

A running ROS system can comprise dozens of nodes, spread across multiple machines. Depending on how the system is configured, any node may need to communicate with any other node, at any time. 37(C)2014 Roi Yehoshua

When running only one master, ROS has certain requirements of the network configuration: – There must be complete, bi-directional connectivity between all pairs of machines, on all ports. – Each machine must advertise itself by a name that all other machines can resolve. 38(C)2014 Roi Yehoshua

Find your IP address by typing the command ifconfig and looking at inet addr 39(C)2014 Roi Yehoshua

Assume that we want to run a ROS system on two machines, with the following IP addresses: – (machine A) – (machine B) 40(C)2014 Roi Yehoshua

Ping between machines – Ping machine A from machine B and vice versa 41(C)2014 Roi Yehoshua

ROS_MASTER_URI is a required setting that tells nodes where they can locate the master. It should be set to the XML-RPC URI of the master. The default value is 42(C)2014 Roi Yehoshua

Change ROS_MASTER_URI in machine B to point to machine A IP address 43(C)2014 Roi Yehoshua $ export ROS_MASTER_URI=

Run the master and turtlesim on machine A Now if you type rostopic list on machine B, you should see the topics advertised from the nodes in machine A 44(C)2014 Roi Yehoshua $ roscore $ rosrun turtlesim turtlesim_node $ roscore $ rosrun turtlesim turtlesim_node

However, seeing the topics only shows you one direction of communication. Every computer needs to be able to talk to each other (from/to) using whatever name this is known by to ROS. The host name used by ROS is defined by ROS_IP and ROS_HOSTNAME environment variables 45(C)2014 Roi Yehoshua

ROS_IP and ROS_HOSTNAME are optional environment variable that sets the declared network address of a ROS Node or tool. – When a ROS component reports a URI to the master or other components, this value will be used. Use ROS_IP for specifying an IP address, and ROS_HOSTNAME for specifying a host name. – The options are mutually exclusive, if both are set ROS_HOSTNAME will take precedence. 46(C)2014 Roi Yehoshua

In machine A add to your.bashrc: Open a new terminal and make sure that ROS_IP is set properly 47(C)2014 Roi Yehoshua function get_ip_address { ifconfig | fgrep -v | fgrep 'Mask: ' | egrep -o 'addr:[^ ]*' | sed 's/^.*://'; } export ROS_IP=$( get_ip_address ) function get_ip_address { ifconfig | fgrep -v | fgrep 'Mask: ' | egrep -o 'addr:[^ ]*' | sed 's/^.*://'; } export ROS_IP=$( get_ip_address )

You must set ROS_IP also on machine B Add the following to your.bashrc on machine B Note that ROS_MASTER_URI on machine B points to the ROS_IP of machine A 48(C)2014 Roi Yehoshua function get_ip_address { ifconfig | fgrep -v | fgrep 'Mask: ' | egrep -o 'addr:[^ ]*' | sed 's/^.*://'; } export ROS_IP=$( get_ip_address ) export ROS_MASTER_URI= function get_ip_address { ifconfig | fgrep -v | fgrep 'Mask: ' | egrep -o 'addr:[^ ]*' | sed 's/^.*://'; } export ROS_IP=$( get_ip_address ) export ROS_MASTER_URI=

Both computers should have ROS_IP set to their own IP address. The one on which the master runs should have ROS_MASTER_URI= (the default) The one that connects to the master should have ROS_MASTER_URI= HINE]: (C)2014 Roi Yehoshua

To test your network setup: Run roscore on machine A Run turtlesim node on machine A Now you will be able to publish messages to topics on machine A from machine B 50(C)2014 Roi Yehoshua

51(C)2014 Roi Yehoshua

52(C)2014 Roi Yehoshua

Run three instances of turtlesim at the same time Control the first turtle with the keyboard Make the second and the third turtles follow the first one (use the mimic node) 53(C)2014 Roi Yehoshua