Revision as of 09:51, 9 November 2016 by Swang (talk | contribs) (Verify RSDK Shell)
Jump to: navigation , search

This tutorial describes the configuration of the ROS environment on your developer workstation


To communicate with and command your robot, we must establish the connection between your development PC and the robot. Assuming proper network setup, the SDK shell refers to the a configuration of your ROS environment which points your PC to the ROS Master, while registering your IP or Hostname allowing other processes to find you.

The SDK provides a convenient script, , which helps foster the quickest and easiest ROS environment setup to get communicating with Sawyer. This script should have been installed/configured during Workstation Setup Tutorial, and the Hello Robot! Tutorial.

Quick Environment Setup Via

$ cd ~/ros_ws
$ ./

Detailed Description/Setup ROS Environment Setup

The script is a convenient script allowing users to get their ROS environment setup quickly. It should allow for intuitive modification of the core components to get communicating with Sawyer setup quickly. It creates a heredoc which verifies all environment variables expected are provided, with a handy sim argument for local configurations (useful for simulation), and local argument (useful when SSH'd into Sawyer with no need to communicate to external, off-robot processes). This subshell created has the custom prompt modifications (with color) for quick visual checks as well.

Checkout Convenient script

Copy the file from intera_sdk repo to ros workspace.

Customize the script

Please edit the shell script making the necessary modifications to describe your development PC.

Using your favorite editor (gedit used for example)

$ cd ~/ros_ws
$ gedit

Edit the 'robot_hostname' field

Please edit the 'robot_hostname' field:

# Specify robot's hostname

Modifying where 'robot_hostname' is the [Robot_Hostname hostname of your robot]

Edit 'your_ip' OR 'your_hostname' field

Please edit the 'your_ip' field (only if not using 'your_hostname'):


Modifying where 'your_ip' is the IP address of your PC.

Useful command for identifying your IP address:

$ ifconfig
# Result will be contained in the 'inet addr' field (Ubuntu) or 'inet' field (Gentoo Robot PC).

Important: Only set either ROS_IP *OR* ROS_HOSTNAME.

Setting of both ROS_IP and ROS_HOSTNAME will result in ROS_HOSTNAME taking priority, resulting in confusing environment setups. Comment out the unused method using the '#' as leading character.

Alternatively, you may choose to use the hostname of your development PC.

Please edit the 'your_hostname' field (only if not using 'your_ip'):


Modifying where 'your_hostname' is the hostname of your PC.

Important: This hostname must be resolvable to the robot. To test if your hostname is resolvable to Sawyer, please visit the development PC Networking page.

Edit 'ros_version' field

Please edit the 'ros_version' field:


Modifying where 'ros_version' is the your chosen ROS release.

Save and Close script

Please save and close the script.

Initialize your SDK environment

From this point forward, your ROS environment setup should be as simple as running the script from the root of your Catkin workspace:

$ cd ~/ros_ws
$ ./

You will see that your current shell prompt will be prefixed with:

    [intera - http://<robot_hostname>:11311]username@machine$

This allows you to quickly view if your shell is configured for intera communication or not, and to which robot you are currently addressing (<robot_hostname>)

Verify RSDK Shell

Test ability to ping robot.

Ping what you have previously set as your robot_hostname.

$ ping <robot_hostname>
# ex.
$ ping 011304P0026

If unable to ping the robot visit this page.

Test ability to command the robot

1. Enable the robot

$ rosrun intera_tools -e

The robot is now active. You may now grasp Sawyer's arm freely by grasping the cuff at the hand.

2. Disable the robot

$ rosrun intera_tools -d

You should visibly see Sawyer's arm gently fall and will no longer have the ability to move the arm freely.

If unsuccessful in enabling the robot, please follow the instructions below. This is typically due to a ROS_HOSTNAME being set which is not resolvable to Sawyer. Please unset your ROS_HOSTNAME, instead using your ROS_IP. Make sure this is reflected permanently in your script.

Timeout observed when trying to enable the robot.

Assuming that you are able to $rostopic echo /rosout during these prerequisite instructions. This error is a sign of the inability to make commands to the robot. This is due to your ROS_HOSTNAME/ROS_IP being set incorrectly.

View the ROS_ENVIRONMENT set for your current shell.

$ env | grep ROS

Verify that ***EITHER*** the ROS_HOSTNAME or ROS_IP is set for your development workstation.

If unsuccessful and the ROS_HOSTNAME is set, please unset this variable and use ROS_IP.

$ export ROS_IP=<your_development_workstation_ip>

Note: You can always view your current development workstation IP address using

$ ifconfig

If unsuccessful and the ROS_IP is set, verify that this is describes your ip address and not the robot ip address.

# Verify ROS_HOSTNAME is unset
# Take note of your IP address
$ ifconfig
# Export this as your ROS_IP
$ export ROS_IP=<your_development_workstation_ip>