This section describes loading the software packages for the SDK, Baxter Simulator, and MoveIt. It is assumed that Ubuntu 14.04 and ROS Indigo software are installed on the computer to be used for the Baxter Simulator and software development. The steps for installing Ubuntu and ROS are described in Chapter 1, Getting Started with ROS, in the Installing and launching ROS section.
The installation of Baxter Simulator requires that the SDK already be downloaded and installed into an ROS catkin workspace on the workstation computer. Instructions for the installation are presented here and can be found on the Rethink website at http://sdk.rethinkrobotics.com/wiki/Workstation_Setup.
In Chapter 1, Getting Started with ROS, we created the catkin workspace catkin_ws
and used this workspace in Chapter 2, Creating Your First Two-Wheeled ROS Robot (in Simulation) to create the ROS package ros_robotics
. For the Baxter SDK packages, we will create another catkin workspace, baxter_ws
, to contain the Rethink ROS packages and be the development space for the new software we wish to create. If you wish to use the catkin_ws
workspace for your Baxter software, skip to the step where the Baxter SDK dependencies are installed. (Afterwards, remember to replace the baxter_ws
name in each of the command lines with catkin_ws
.)
For a user-level installation, create the Baxter catkin workspace baxter_ws
by typing these commands:
$ mkdir -p ~/baxter_ws/src $ cd ~/baxter_ws/src $ catkin_init_workspace
Build and install the Baxter workspace:
$ cd ~/baxter_ws $ catkin_make
Next, source the setup.bash
file within the Baxter workspace to overlay this workspace on top of the ROS environment for the workstation:
$ source ~/baxter_ws/devel/setup.bash
Remember to add this source command to your .bashrc
file:
$ echo "source ~/baxter_ws/devel/setup.bash" >> ~/.bashrc
Make sure the ROS_PACKAGE_PATH
environment variable includes the path you just sourced by typing:
$ echo $ROS_PACKAGE_PATH
The path /home/<username>/baxter_ws/src should be displayed as one of the paths on the screen.
Now that the Baxter catkin workspace has been created, the Baxter SDK dependencies are installed by typing the following commands:
$ sudo apt-get update $ sudo apt-get install git-core python-argparse python-wstool python-vcstools python-rosdep ros-indigo-control-msgs ros-indigo-joystick-drivers
Next, the ROS wstool
workspace tool is used to check out all the required Baxter SDK packages from the GitHub repository and place them in the Baxter workspace source directory:
$ cd ~/baxter_ws/src $ wstool init $ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter/master/baxter_sdk.rosinstall $ wstool update
Then, the workspace is built and installed:
$ cd ~/baxter_ws $ catkin_make $ catkin_make install
These instructions install the latest version of the Baxter SDK source, which is version 1.2 at the time of writing. In the next section, installation instructions for the Baxter Simulator software packages will be described.
Since Rethink has made the packages for Baxter Simulator open source, owning a real Baxter robot is no longer necessary for gaining access to the GitHub files. The instructions presented here for loading the Baxter Simulator software on your computer can also be found at http://sdk.rethinkrobotics.com/wiki/Simulator_Installation.
To ensure that you have the supporting ROS packages required for Baxter Simulator, we recommend that you execute the following two commands in preparation for loading the Baxter Simulator packages:
$ sudo apt-get update $ sudo apt-get install gazebo2 ros-indigo-qt-build ros-indigo-driver-common ros-indigo-gazebo-ros-control ros-indigo-gazebo-ros-pkgs ros-indigo-ros-control ros-indigo-control-toolbox ros-indigo-realtime-tools ros-indigo-ros-controllers ros-indigo-xacro ros-indigo-tf-conversions ros-indigo-kdl-parser
A large number of ROS packages are loaded by the sudo apt-get
command. The packages are as follows:
Gazebo2
: This is the correct version of Gazebo to work with ROS Indigo.qt_build
: This is necessary for building qt and rqt applications such as rqt_reconfigure
.driver_common
: This package provides support for keyboard and joystick drivers as well as drivers for output devices such as cameras and displays.gazebo_ros_control
, ros_control
, control_toolbox
, and ros_controllers
: These provide the simulated control software as well as the real-time control software for Baxter Simulator.gazebo_ros_pkgs
: This provides the interface between Gazebo and ROS enabling robots to be simulated in the Gazebo environment.realtime_tools
: This provides a real-time publisher that publishes ROS messages to a topic from a real-time thread.xacro
: This package is used with Baxter's URDF to generate the robot_description
parameter. Xacro is described in some detail in Chapter 5, Creating Your First Robot Arm (in Simulation).tf_conversions
: This package and kdl_parser
work together to support the tf transforms of Baxter. The tf_conversion
package provides conversions for the user to obtain the data type they require from the transform library. KDL stands for Kinematics and Dynamics Library. The kdl_parser
package provides the tools to construct the full KDL tree from the URDF. If you are not familiar with URDF, Chapter 2, Creating Your First Two-Wheeled ROS Robot (in Simulation) and Chapter 5, Creating Your First Robot Arm (in Simulation) will provide an understanding of how the URDF describes the robot, its kinematics structure and its dynamic movement.The ROS wstool
workspace tool is used to checkout all the required Baxter Simulator packages from the GitHub repository and place them in the Baxter workspace source directory:
$ cd ~/baxter_ws/src $ wstool init $ wstool merge https://raw.githubusercontent.com/RethinkRobotics/baxter_simulator/master/baxter_simulator.rosinstall $ wstool update
Then, the workspace is built and installed:
$ cd ~/baxter_ws $ catkin_make $ catkin_make install
The Baxter SDK requires the script file baxter.sh
to establish the connections between the Baxter robot and the workstation computer. This connection will depend on how your network is set up. Further details on the network connection to a real Baxter will be discussed in the Configuring a real Baxter setup section.
Baxter Simulator additionally uses the file baxter.sh
to establish a simulation mode where the ROS environment variables are setup to identify the host workstation computer. The script file baxter.sh
contains a special hook for Baxter Simulator. First, the file must be copied to the baxter_ws
directory and the file permissions changed to grant execution privileges to all users:
$ cp ~/baxter_ws/src/baxter/baxter.sh ~/baxter_ws $ chmod +x baxter.sh
Next, open the baxter.sh
script in your favorite editor and find the your_ip
parameter (around line 26). Change the your_ip
value to be the IP address of your workstation computer:
your_ip="192.168.XXX.XXX"
If the IP address of your computer is unknown, use the ifconfig
command:
$ ifconfig
The screen results will contain the inet_addr field for the IP address of the workstation computer.
Alternatively, if you wish to use the hostname, comment out the line for your_ip
and uncomment the line for your_hostname
. To use the real hostname of your workstation computer, use the following command:
$ hostname
Then, add this to the your_hostname
parameter.
These parameters will assign either the ROS_IP
or ROS_HOSTNAME
environment variable. If both are present, the ROS_HOSTNAME
variable takes precedence.
Also, notice near line 30 that ros_version
should be set to indigo
. Then, save and close the baxter.sh
script.
MoveIt is an important ROS tool for path planning and can be used with Baxter Simulator or a real Baxter. The installation of MoveIt is described here and the operation of MoveIt is detailed later in the chapter. Instructions for the installation can also be found on the Rethink website at http://sdk.rethinkrobotics.com/wiki/MoveIt_Tutorial.
The MoveIt software should be loaded into the source (src
) directory of the catkin workplace baxter_ws
created earlier in the chapter. The commands are as follows:
$ cd ~/baxter_ws/src $ git clone https://github.com/ros-planning/moveit_robots.git $ sudo apt-get update $ sudo apt-get install ros-indigo-moveit-full
Then, the new additions to the workspace are incorporated with the catkin_make
command:
$ cd ~/baxter_ws $ catkin_make
To verify that all the Baxter SDK, simulator, and MoveIt packages were downloaded and installed, type the following command:
$ ls ~/baxter_ws/src
The output should be as follows:
baxter baxter_examples baxter_simulator CMakeLists.txt baxter_common baxter_interface baxter_tools moveit_robots
3.133.128.39