From sdk-wiki
Revision as of 23:05, 7 January 2015 by Imcmahon (talk | contribs) (Running Example Research SDK Programs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Learning: Foundations, Advanced Understanding, Projects and Tools (Do More), Configuration and Admin

This page will introduce you to the foundations of the Baxter SDK and teach you all the basics you need to know to start using and writing programs for your Baxter Research Robot.

First Steps

If you are a new user of Baxter and the SDK, we highly recommend running through the Hello, Baxter! Tutorial - which will get you and your Baxter moving in no time. It is also a great confirmation that your Workstation and Environment are configured properly and that you are ready to go.

Overviews

Before you get too far, you might be interested in getting a more conceptual introduction to the SDK, check out the High-Level Overview of the SDK. This guide will give a brief summary of what the SDK is and the various parts of the system that make up the Baxter Research Robot platform.

SDK Examples

Because it's always more fun to get your hands dirty, the SDK Example Programs are designed to demonstrate using the various interfaces and features of Baxter. These example programs are often more complex and by following the Usage Guide on an Example Page, you can try out some of Baxter's functionality. Each example also has a corresponding Code Walkthrough that will take you through the program and explain how we use the interfaces.

Running Example Research SDK Programs

Learn how to start your environment and run any of the SDK Examples below:

Writing Programs

At the core of the SDK are the interfaces provided to control and access all of the Baxter Research Robot's motors and sensors. These sections describe the hardware components of the robot and the foundation API layers upon which the SDK - and your programs - are built. These sections describe the Components of the Robot, and the Interfaces to control them.

SDK Foundations (Interfaces)

The SDK provides interfaces that control the robot hardware layer via the Robot Operating System (ROS) to any other computers on the robot's network. By using the ROS network layer API, any client library or program that can "speak ROS" can control the robot directly. For a deeper understanding of the SDK System architecture see:

By using the foundation ROS interface layer, the robot can be controlled and programmed in any Programming Language that supports ROS. This has led to a number of user-created interface libraries in different languages. In addition, the Python Baxter Interface provides a Python Class-based interface library, which wraps many of the ROS interfaces in Python Classes.

ROS Interface

The ROS Interface is the foundation upon which all interaction with the Baxter Research Robot passes through and all other interface layers are built upon. The ROS layer is accessible over the network via any of the standard ROS Client Libraries such as rospy (Python) or roscpp (C++).

  • ROS API Reference
    The ROS API describes the base interface layer for direct access from the command line or any language.

Python Interface

The Baxter SDK also offers a Python API via the baxter_interface module. This module wraps the ROS Interfaces in component-based Python Classes. The SDK Examples are written using this library in order to demonstrate how to use the robot interfaces.

  • Baxter Interface Overview
    Gives a basic introduction to each class and component in the Python interface library 'baxter_interface'.
  • Code API
    View the generated Python Code API docs for the baxter_interface module.

Robot Hardware Foundations

To learn more about what sensors and motors are on the robot and how to use them, see:

Working with Baxter

Now that you have your robot all set up and you've installed the Baxter SDK on your workstation and setup your ROS workspace environment, you will want to know more about working with the robot and using the workspace and tools to develop your own programs and research.

Baxter SDK Tools

The Baxter Tools package contains helpful, command-line programs for working with Baxter on a day-to-day basis and also for executing robot maintenance and update tasks.

  • Daily Operation
    • Enable Robot Tool
      This is the most fundamental tool when working with Baxter. Enables and Disables power to the motors on the robot, which enables Zero-G Mode and control of the motors. Takes commands for Enabling/Disabling/Resetting/Stopping the robot, and also checking the Error and E-Stop states of the robot. Baxter must be enabled in order to command any of the motors (except the grippers).
    • Camera Control Tool
      Useful for controlling which cameras are on and their settings. You can list and control which cameras are open (publishing images) and the resolutions using this tool. The program also demonstrates using the camera settings Python Interface.
    • Tuck Arms Tool
      Tuck arms is a simple convenience script for moving the arms to the untucked "Ready Pose" (in front of the robot), from the tucked "Shipping Pose". It also demonstrates disabling the collision avoidance force-fields, which blocks the robot arms from moving when in Shipping Pose.
  • Maintenance
    • Software Update
      Update the robot software to new releases using this tool.
    • Arm Calibration
      The 'Calibrate' and 'Tare' tools will perform routine calibration procedures for sensors and torque models of the arm.

See Also:

Development Environment Basics

Throughout the Wiki, Tutorials, and SDK, we refer to the "RSDK Shell" and your "ROS Workspace" or "Environment". These are simple environment concepts and configurations that are useful to have a basic understanding of when using the Baxter SDK and ROS.

  • ROS Workspace
    Your "ROS Workspace" (also called a "Catkin Workspace" in the ROS world), is the ~/ros_ws/ directory you setup in the Getting Started Tutorials. Inside the src/ sub-directory, you can create or checkout source code as ROS Packages (such as the baxter sdk packages), which you can then compile and link against via the devel/ or install/ sub-directories.
  • RSDK Shell
    The RSDK Shell is a term we use to refer to a session in a shell, or Terminal, with the ROS Environment Variables properly configured to point to your ROS Workspace, the Baxter Robot, and your computer's ROS ID.
    The baxter.sh file is the script you setup to take care of configuring all that for you.

    You need to be in a proper RSDK Shell before you use most of the ROS tools or run any of the SDK examples or programs. Therefore you should run the ./baxter.sh script at the start of each Terminal session. All the script does is start a convenient "sub-shell" that fills in the necessary Environment Variables as you configured.
  • Environment Variables
    The ROS Environment Variables have three important functions:
    1. Identifying your Baxter and Workstation on the ROS Network, based on your Network Configuration.
    2. Pointing to the path of the ROS Packages, tools, and programs, when you use rosrun (execute programs).
    3. Linking to the libraries and workspaces when compiling source code.


If you are new to the ROS world, it is highly recommended you take the time to go through the Beginner Level Core ROS Tutorials. My personal recommendation is to at least do:

  • The first few Configure through 'Understanding ROS' tutorials - (Remember: we use ~/ros_ws/ instead of ~/catkin_ws/ but they are exactly the same).
  • Also, the 'Writing a Simple Publisher and Subscriber' tutorials can be pretty useful when it comes to writing your first ROS program for the ROS newbie.

Resources

SDK Ecosystem and the Baxter Research Community

Community, Resources, SDK Ecosystem

Learning Resources