UP | HOME

Exploring the Baxter

Overview

When approaching a robot for the first time, you must read documentation, read example source code, and perform experiments to become familiar with it's features. This document guides you in how to learn about Baxter and Sawyer by going through an example using the baxter simulator. The previous lecture describes how to setup the robots and provides other reference material.

The Simulator

  • The Baxter Simulator provides a safe method of testing out ideas.
  • roslaunch baxter_gazebo baxter_world.launch to start the simulator

Experimenting

  • Run rostopic list and rosservice list
    • Just by looking at these topics, the available features should start to be visible
  • Run rviz, see if you can get a model of the robot visible.

Exploring the ROS API

  • ROS API
  • Enable the robot: rosrun baxter_tools enable.py -e
  • From the rostopic list notice two topics: /robot/limb/left/joint_control and /robot/limb/right/joint_control
    • These topics are documented in the ROS API Documentation

Starting Out

  • Foundations Baxter Foundations Page
    • Provides a Good Overview of What to Do

Tools

  • Tools
  • rosrun baxter_tools robot_enable.py Used to enable/disable the robot
    • From the ROS API documentation, we can see what rostopics this tool uses
    • You can also examine the source code (note that all source code is in your rethink workspace)

-Python API Reference also has a method to enable/disable the robot ( see baxter_interface.robot_enable)

Exercise

  • Enable the robot, get its state, and disable the robot:
    • Using the enable_robot.py tool
    • Using rostopics
    • Using python (code below to get you started)

      import baxter_interface
      import rospy
      rospy.init_node("resetter")
      r = baxter_interface.robot_enable.RobotEnable()
      

Moving an Arm

  • ROS API: Arm Joints
  • There are 4 joint control modes
  • Send /robot/limb/<side>/joint_command messages to an enabled robot to move an arm
  • The Components page describes the hardware of the robot:
    • See Arms for the joint names (note: use lowercase and prefix with "left" or "right")
  • Python API to move arm: baxter_interface.Limb
    • Create a Node
    • Create a Limb object

Tips:

  • You can use the source code for baxter_interface to help understand the meanings of some fields in messages, since it is just a thin wrapper around the ROS API
  • For example, after creating a Limb object, joint_names() provides the name of each joint

Exercise:

  • Repeat the above with Sawyer
  • Open and close the grippers using both ROS messages and the python API

Author: Matthew Elwin.