To communicate with and command Baxter, we must establish the connection between your development PC and the robot. Assuming proper network setup, the RSDK 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.

Quick Environment Setup Via Baxter.sh

Detailed Description/Setup

The baxter.sh 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 Baxter 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 Baxter 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.

Source ROS setup.bash

A ROS environment script is packages will all standard ROS installation. This script will set the standard basic ROS environment variables.

Please add the following to the bottom of your ~/.bashrc script.

If using ROS Groovy:

source/opt/ros/groovy/setup.bash

If using ROS Hydro:

source/opt/ros/hydro/setup.bash

Set ROS_MASTER_URI

ROS_MASTER_URI - Allows the development PC to locate the master. This will typically be the hostname of the robot.

Please add the following to the bottom of your ~/.bashrc script.

exportROS_MASTER_URI=http://baxter_hostname:11311

Where 'baxter_hostname' is the [[Robot_Hostname hostname of your robot]

Set ROS_MASTER_URI

ROS_MASTER_URI - Allows the development PC to locate the master. This will typically be the hostname of the robot.

Please add the following to the bottom of your ~/.bashrc script.

exportROS_MASTER_URI=http://baxter_hostname:11311

Where 'baxter_hostname' is the [[Robot_Hostname hostname of your robot]

Set ROS_IP *OR* ROS_HOSTNAME

It will be necessary for other processes to be able to communicate to and from your development PC. For this reason, setting ROS_IP or ROS_HOSTNAME advertises your node for networked communication.

Please add the ROS_IP (only if not using ROS_HOSTNAME):

exportROS_IP='192.168.XXX.XXX'

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.

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

Please edit the ROS_HOSTNAME field (only if not using ROS_IP):

exportROS_HOSTNAME='your_hostname'

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

Important: This hostname must be resolvable to Baxter. To test if your hostname is resolvable to Baxter, please visit the development PC Hostname Validation page.

Save and Close ~/.bashrc

Please save and close your ~/.bashrc

Initialize your SDK environment

From this point forward, your ROS environment setup should be preconfigured upon startup of all new terminals (shells). Important: You will still need to source your development workspace (~/ros_ws/devel/setup.bash) setup script when compiling code from source in your Catkin workspace - following our setup this will be ~/ros_ws.

Please close your current terminal, and reopen a new terminal instance.

Test ability to command the robot

The robot is now active. You may now grasp Baxter's arms freely by grasping the cuffs at the hands.

2. Disable the robot

$ rosrun baxter_tools enable_robot.py -d

You should visibly see Baxter's arms gently fall and will no longer have the ability to move the arms 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 Baxter. Please unset your ROS_HOSTNAME, instead using your ROS_IP. Make sure this is reflected permanently in your baxter.sh 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.

$ unset ROS_HOSTNAME$ exportROS_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.