-
Notifications
You must be signed in to change notification settings - Fork 6
Rsdk shell
- 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 ~/git/sdk-examples $ ./init.sh <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 use explicitly setting 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 actively move Baxter's arms 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.