Workstation Update

From sdk-wiki
Jump to: navigation, search


These instructions describe how to update the Baxter SDK on your computer when a new version of the SDK is released. Use these instructions after updating your Robot Software.

These instructions assume you are using a catkin workspace (~/ros_ws/, default since v0.7.0).

Updating to the Latest Release

Step 1: Update Dependencies

Because new features of the SDK may introduce new dependencies, you will want to make sure to update with the latest dependencies. Run these commands in a Terminal.

$ sudo apt-get update
$ sudo apt-get install ros-indigo-desktop-full python-rosinstall git-core python-argparse python-wstool python-vcstools python-rosdep ros-indigo-control-msgs ros-indigo-joystick-drivers

Step 2: Update Baxter SDK Code

Depending on the method you used to Install the SDK on your workstation, pick the appropriate update tabs:

  1. Workspace Checkout with wstool / rosinstall (Standard)
    Use this method if you have a catkin ROS workspace (~/ros_ws/) checkout of the Baxter SDK packages, which you downloaded using the tool wstool and the baxter_sdk.rosinstall file from our Github repositories. This is the default method for Source checkouts on our Workstation Setup page.
  2. Manual Workspace Checkout
    Use this method if you have a catkin ROS workspace (~/ros_ws/) checkout of the Baxter SDK packages, which you cloned by hand using git from our Github repositories. This method is also appropriate if you are updating on-robot.
  3. Debian Installation (apt-get)
    Use this method if you installed binaries of the SDK using apt-get.


    Confirm wstool Config

    Confirm your workspace is configured to point at the 'master' branches of the baxter_* repos:

    $ cd ~/ros_ws/src/
    $ wstool info
    workspace: /home/your_username/ros_ws/src
     
     Localname        S SCM  Version-Spec UID  (Spec)  URI  (Spec) [http(s)://...]
     ---------        - ---- ------------ -----------  ---------------------------
     baxter_examples    git  master       fdca595d643b github.com/RethinkRobotics/baxter_examples.git
     baxter_common      git  master       0c5687c594c1 github.com/RethinkRobotics/baxter_common.git
     baxter_tools       git  master       1bea6c1ca3f1 github.com/RethinkRobotics/baxter_tools.git
     baxter_interface   git  master       198bb49fb1de github.com/RethinkRobotics/baxter_interface.git
     baxter             git  master       6c4cd8ef1651 github.com/RethinkRobotics/baxter.git

    Note: Make sure that the 'Version-Spec' field points to 'master' and the 'S'(status) fields are blank.

    Update Repos

    Run the wstool update to pull down updated 'master' branches with the latest release from the Baxter SDK Github repos.

    $ cd ~/ros_ws/src
    $ wstool update
    # ...bunch of downloads and checkouts...

    Make sure that you don't see any errors during the updates. If you have problems, see Troubleshooting - Software Update.

    Verify new versions

    You can verify your Baxter SDK repos are now updated to the proper workstation version by going in and checking the closest tag.

    $ cd ~/ros_ws/src
    $ cd baxter/
    $ git describe
    v1.2.0

    The number here should match the latest Software Version. Repeat for all 'baxter' repos if concerned.

    Bonus Tip: Alternatively, you can use wstool info to verify all the versions at once, by making sure the UID matches the Spec(ified) UID as show in the Confirm wstool Config step above.

    Update Repos

    Change directories to your git clone of a baxter repo, checkout the master branch, and then fetch and merge (or 'pull') up to the latest version.

    $ cd ~/ros_ws/src/
    $ cd baxter
    $ git checkout master
    $ git pull

    You can verify the new version with this command:

    $ git describe
    v1.2.0


    Repeat this for each Baxter SDK repository (baxter, baxter_common, baxter_interface, baxter_tools, baxter_examples):

    $ cd ../baxter_common
    $ git checkout master
    $ git pull
    $ cd ../baxter_interface
    $ git checkout master
    $ git pull
    $ cd ../baxter_tools
    $ git checkout master
    $ git pull
    $ cd ../baxter_examples
    $ git checkout master
    $ git pull

    Version verification should be performed for each repository separately.

    P.S. This annoyance is exactly the reason wstool is nice...

    Verify new versions

    You can verify your Baxter SDK repos are now updated to the proper workstation version by going in and checking the closest tag.

    $ cd ~/ros_ws/src
    $ cd baxter/
    $ git describe
    v1.2.0

    The number here should match the latest Software Version. Repeat for all 'baxter' repos if concerned.

    Note: The debians have not hit upstream yet, so this won't work! Use the source install for now. If you have installed the SDK via the binary Debian packages using apt-get, then updating is relatively simple.

    Update Installed SDK Packages

    $ sudo apt-get update
    $ sudo apt-get install ros-indigo-baxter-sdk


    If you have also checked out source code for the SDK in your ROS Workspace, make sure to follow the instructions on the other tabs for Workspace Update. Then continue on to the next steps to update your workspace.


    Step 3: Update baxter.sh

    If desired, you can update your baxter.sh script by getting an updated copy of the script from the 'baxter' repo (~/ros_ws/src/baxter/baxter.sh or directly from Github (baxter.sh). Copy your old settings into the new script before saving over the old pages.

    $ cd ~/ros_ws/
    $ mv baxter.sh old_baxter.sh
    $ wget https://github.com/RethinkRobotics/baxter/raw/master/baxter.sh
    # EDIT baxter.sh
    #   copy values for baxter_hostname, your_hostname, and your_ip over to the new file.
    $ gedit old_baxter.sh baxter.sh &
    #   save and close
    $ chmod +x baxter.sh

    Step 4: Rebuild Workspace

    $ cd ~/ros_ws
    $ ./baxter.sh
    $ catkin_make
    $ catkin_make install


    And you're done! Congratulations you have updated your workstation!

    Now you may want to checkout some of the new features of the latest Release.

    Alternative Updates

    Updating to a Specific Version

    Sometimes you may need to update your workstation to a specific version, for instance if you want to use a version earlier than the latest release on a workstation. These instructions will show you how to update your Baxter SDK by hand to that version.

    Git Version Ref

    All release versions of the Baxter SDK repos are 'tagged' in git. Tags let you checkout a bookmarked version of the state of the code at the time of the release. Tags are the recommended way to switch between versions.

    To view available tags:

    $ cd ~/ros_ws/src/baxter
    $ git tag --list
    catkin-reorganization-0.7
    # ...
    v0.6.0
    v0.6.1
    v0.6.2
    v0.7.0
    v1.0.0
    v1.1.0
    v1.1.1
    v1.2.0


    You can either use wstool or checkout the repositories by hand. Choose the appropriate tab instructions:

      Create a rosinstall file

      Create a rosinstall file to point to a tag or release branch with the desired versions listed. For instance, for v0.1.0, it should look something like this:

      - git:
          local-name: baxter
          uri: https://github.com/RethinkRobotics/baxter.git
          version: master
      - git:
          local-name: baxter_interface
          uri: https://github.com/RethinkRobotics/baxter_interface.git
          version: master
      - git:
          local-name: baxter_tools
          uri: https://github.com/RethinkRobotics/baxter_tools.git
          version: master
      - git:
          local-name: baxter_common
          uri: https://github.com/RethinkRobotics/baxter_common.git
          version: master
      - git:
          local-name: baxter_examples
          uri: https://github.com/RethinkRobotics/baxter_examples.git
          version: master
      

      Open gedit and save the contents of your new rosinstall file.

      $ cd ~/ros_ws/src/
      $ gedit baxter_sdk.rosinstall &
      # copy/update contents
      # save file


      Alternatively - Download and save one of the following files from key versions:

      Master https://github.com/RethinkRobotics/baxter/raw/master/baxter_sdk.rosinstall
      Release v1.2.0 https://raw.githubusercontent.com/RethinkRobotics/baxter/release-1.2.0/baxter_sdk.rosinstall
      Release v1.1.1 https://raw.githubusercontent.com/RethinkRobotics/baxter/release-1.1.1/baxter_sdk.rosinstall
      Release v1.1.0 https://raw.githubusercontent.com/RethinkRobotics/baxter/release-1.1.0/baxter_sdk.rosinstall
      Release v1.0.0 https://github.com/RethinkRobotics/baxter/raw/ea58ecd3204368791bf8d0afe5e9c7d0354b6e58/baxter_sdk.rosinstall
      Release v0.7.0 https://github.com/RethinkRobotics/baxter/raw/ff8afbd2d0dd71b6f5d3acc14a210313e1b6fcb7/baxter_sdk.rosinstall

      You can rename the file whatever you would like as it is only temporary storage before merging into your configuration. Just be sure to use the right name in the instructions below!

      Update wstool Config

      Merge your new rosinstall file into your workspace tool configuration.

      $ cd ~/ros_ws/src/
      $ wstool merge baxter_sdk.rosinstall

      Update your workspace.

      $ wstool update

      Verify new versions

      You can verify your Baxter SDK repos are now updated to the desire workstation version by going in and checking the closest tag.

      $ cd ~/ros_ws/src
      $ cd baxter/
      $ git describe
      v1.1.1

      The number here should match the reference tag or branch specified in your rosinstall file. Repeat for all 'baxter' repos if concerned.

      Bonus Tip: Alternatively, you can use wstool info to verify all the versions at once, by making sure the UID matches the Spec(ified) UID.

      Update Repos

      Change directories to your git clone of a baxter repo, make sure to fetch the complete repo, and then checkout the desired tag reference. In our example we'll use the tag 'v1.2.0'.

      $ cd ~/ros_ws/src/
      $ cd baxter
      $ git fetch --all
      $ git checkout v1.2.0

      You can verify the new version with this command:

      $ git describe
      v1.2.0


      Repeat this for each Baxter SDK repository (baxter, baxter_common, baxter_interface, baxter_tools, baxter_examples):

      $ cd ../baxter_common
      $ git fetch --all
      $ git checkout v1.2.0
      $ cd ../baxter_interface
      $ git fetch --all
      $ git checkout v1.2.0
      $ cd ../baxter_tools
      $ git fetch --all
      $ git checkout v1.2.0
      $ cd ../baxter_examples
      $ git fetch --all
      $ git checkout v1.2.0

      Version verification should be performed for each repository separately.

      P.S. This annoyance is exactly the reason wstool is nice...

      Verify new versions

      You can verify your Baxter SDK repos are now updated to the desired workstation version by going in and checking the closest tag.

      $ cd ~/ros_ws/src
      $ cd baxter/
      $ git describe v1.2.0

      Repeat for all 'baxter' repos if concerned.


      Rebuild Workspace

      Don't forget to rebuild your workspace with the new versions of code once you're done updating.

      $ cd ~/ros_ws
      $ ./baxter.sh
      $ catkin_make
      $ catkin_make install

      Troubleshooting

      For any additional difficulty with the software update process, see the Troubleshooting pages.


      • wstool throws error about "Error processing 'baxter' : checkout() got an unexpected keyword argument 'timeout'"
        This error was due to a version dependency mismatch in the wstool. To fix run:
            $ sudo apt-get update
            $ sudo apt-get install python-wstool python-vcstools