Skip to Content
Hands-On ROS for Robotics Programming
book

Hands-On ROS for Robotics Programming

by Bernardo Ronquillo Japón
February 2020
Intermediate to advanced
432 pages
10h 50m
English
Packt Publishing
Content preview from Hands-On ROS for Robotics Programming

Robot network configuration

Next, you have to follow three steps to set up the Raspberry Pi:

  1. Execute the following two commands in a Terminal to define the environment variables needed by ROS:
$ export ROS_HOSTNAME=192.168.1.58$ export ROS_MASTER_URI=http://${ROS_HOSTNAME}:11311

The first command sets the variable that allows ROS to know the IP of the host where it is currently running. The second line is the URL of the master node. Since it is set to ROS_HOSTNAME, we are saying that it will run on the robot computer. Port 11311 is the default that's set by ROS to communicate with the master node. Each subsequently launched node will be automatically assigned a new available port.

  1. There is a way to abstract the IP number itself because, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering ROS for Robotics Programming

Mastering ROS for Robotics Programming

Lentin Joseph
ROS Robotics By Example - Second Edition

ROS Robotics By Example - Second Edition

Lentin Joseph, Carol Fairchild, Dr. Thomas L. Harman

Publisher Resources

ISBN: 9781838551308Supplemental Content