Skip to content

Baxter simulator

rethink-hmalaichamee edited this page Apr 22, 2014 · 9 revisions

RSDK Wiki: http://github.com/RethinkRobotics/sdk-docs/wiki

Repository Description

Necessary files for the Gazebo™ simulation of the Baxter Research Robot from Rethink Robotics Inc.

Prequisites

$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu precise main" > /etc/apt/sources.list.d/gazebo-latest.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install python-wstool python-rosdep ros-groovy-pcl-conversions ros-groovy-control-msgs ros-groovy-cmake-modules ros-groovy-qt-build ros-groovy-moveit-full ros-groovy-driver-common ros-groovy-image-common ros-groovy-rostest gazebo

You have already downloaded and installed the Rethink Robotics SDK into a catkin workspace

Baxter Installation

  • From your catkin workspace where the SDK resides, use wstool to install and update:
    $ cd ~/ros_ws/src
    $ git clone [email protected]:RethinkRobotics/baxter_simulator.git
# IMPORTANT EARLY-DEV-RELEASE STEPS:
    $ cd baxter_simulator
    $ git checkout early_interface_dev
    $ cd ..
    $ wstool init # need to do this only if this is a new workspace where this command was not executed before.
    $ wstool merge baxter_simulator/baxter_simulator.rosinstall
    $ wstool update
  • Install other dependent packages:
    $ cd ~/ros_ws/src
    $ git clone https://github.com/ros/xacro.git -b hydro-devel
    $ git clone https://github.com/ros/roslint.git
  • Build:
    $ source /opt/ros/groovy/setup.bash
    $ cd ~/ros_ws
    $ catkin_make
    $ catkin_make install 
  • Use baxter.sh - it has a special hook for sim:
    $ cp src/baxter/baxter.sh .

###Edit the your_ip value in baxter.sh

  • Run the script with sim specified:
    $ ./baxter.sh sim

Simulation

  • Start simulation with controllers:

    $ roslaunch baxter_gazebo baxter_world.launch
    

    By default the robot would be in disabled state. To enable, run the enable_robot script from the baxter_tools package. To start and switch the controllers, use the JointCommand topic as documented in the Baxter SDK.

  • Optional: Test/tune the velocity controllers or position controllers using a RQT dashboard GUI. Make sure you are in the right joint command mode when using these:

    $ roslaunch baxter_sim_hardware baxter_sdk_position_rqt.launch
    

    or

    $ roslaunch baxter_sim_hardware baxter_sdk_velocity_rqt.launch 
    

Run SDK Examples

Start MoveIt

Works with simulation or hardware:

  • Check out the Baxter MoveIt configuration package into your ROS workspace and rebuild:

    $ cd ~/ros_ws/src
    $ git clone https://github.com/ros-planning/moveit_robots.git
    $ source /opt/ros/groovy/setup.bash
    $ cd ..
    $ catkin_make
    $ catkin_make install 
    
  • Start Trajectory Controller:

    $ rosrun baxter_interface joint_trajectory_action_server.py
    
  • Start MoveIt:

    $ roslaunch baxter_moveit_config demo_baxter.launch
    
Clone this wiki locally