RSDK shell - RethinkRobotics/sdk-docs GitHub Wiki
- You have completed all of the Getting Started - Setup Guide instructions for setting up your robot and development machine.
- This includes all steps through Installing the RSDK on your computer.
- The developer workstation has been connected to Baxter and connectivity has been validated - instructions here.
- You have successfully initialized a shell giving you the ability to enable/disable Baxter.
To properly communicate with Baxter two way communication must occur between the robot and the development workstation. This requires correctly setting the development workstation's ROS Environment Variable. A convenience script, init.sh, has been created to properly set majority of the required environment variables. With proper usage, running init.sh will be the only step required to communicate with Baxter from any new shell instance.
- Initialize your environment:
For each new Terminal, substitute your robot's hostname or IP address for
<robot_hostname>
:$ cd ~/ros_ws $ ./init.sh <robot_hostname>
You will see that your current shell prompt will be prefixed with:
bash [ros - http://<robot_hostname>:11311]username@machine$
This allows you to quickly view if you shell has been init'd or not, and to which robot you are currently addressing (<robot_hostname>
)
- Export your ROS_HOSTNAME or ROS_IP:
For each new terminal, substitute your development workstation's hostname or IP address for
<workstation_hostname>
$ export ROS_HOSTNAME=<workstation_hostname>
Alternatively if your workstation_hostname is not resolvable to Baxter, you will be required to set your ROS_IP environment variable explicitly to your development workstation IP address.
bash $ export ROS_IP=<workstation_ip_address>
Important ROS_HOSTNAME will take precedence over ROS_IP. If you choose to explicitly set your ROS_IP you must unset your ROS_HOSTNAME.
bash $ unset ROS_HOSTNAME
For more information visit ROS_IP/ROS_HOSTNAME
-
Optional (Recommended) export ROS_HOSTNAME/ROS_IP to be persistent when starting a new shell (eliminates step 2, exporting ROS_IP/ROS_HOSTNAME for every new shell).
$ echo "export ROS_HOSTNAME=<workstation_hostname>" >> ~/.bashrc # OR $ echo "export ROS_IP=<workstation_ip_address>" >> ~/.bashrc $ source ~/.bashrc
- Build all the example code (only need to do this once):
$ rosmake baxter --pre-clean
- Enable the robot
$ rosrun tools enable_robot.py -e
The robot is now active. You may now grasp Baxter's arms freely by grasping the cuffs at the hands.
- Disable the robot
$ rosrun 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.
Ping what you have previously set as your robot_hostname
.
bash $ ping <robot_hostname> #ex. $ ping 011304P0026
If unable to ping the robot visit this page.
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.
bash $ 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.
bash $ unset ROS_HOSTNAME $ export ROS_IP=<your_development_workstation_ip>
Note: You can always view your current development workstation IP address using
bash $ ifconfig
If unsuccessful and the ROS_IP is set, verify that this is describes your ip address and not the robot ip address.
bash # Verify ROS_HOSTNAME is unset $ unset ROS_HOSTNAME # Take note of your IP address $ ifconfig # Export this as your ROS_IP $ export ROS_IP=<your_development_workstation_ip>