Skip to content

Baxter simulator

rethink-hmalaichamee edited this page Mar 18, 2014 · 9 revisions

baxter_simulator

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
    $ wstool merge baxter_simulator/baxter_simulator.rosinstall
    $ wstool update
  • Known Issues

If you get the following error when doing the catkin_make step below:

   CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
   Could not find a configuration file for package xacro.

   Set xacro_DIR to the directory containing a CMake configuration file for
   xacro.  The file will have one of the following names:

    xacroConfig.cmake
    xacro-config.cmake

You should build xacro from source using the hydro branch:

    $ cd ~/ros_ws/src
    $ git clone https://github.com/ros/xacro.git -b hydro-devel
  • 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 Wobbler example:

    $ ./baxter.sh sim
    $ rosrun baxter_examples joint_velocity_wobbler.py
    
  • Start keyboard joint position example:

    $ ./baxter.sh sim
    $ rosrun baxter_examples joint_position_keyboard.py
    
    

    For additional information on the interfaces that are implemented with this release, visit the Instructions page.

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