Skip to content

Switching from 6 DoF Jaco2 arm to 7 DoF Jaco2 arm

Angel Andres Daruna edited this page Nov 18, 2017 · 2 revisions

6-DoF Jaco2 arm to 7-DoF Jaco2 arm

Purpose

The following is a guide to help you easily switch from the Jaco2 6-DoF arm to the Jaco2 7-DoF arm. This only guides up to the point of simulating the arm in Gazebo. When someone works with the physical arm on the robot, feel free to extend this!

Assumptions

This tutorial assumes you already have the Jaco2 6-DoF code working and are updating to the Jaco2 7-DoF. If you are doing a brand new install of the Jaco2 7-DoF, this might work for you but keep in mind it wasn't written with that assumption. Simply interpret 'updating repos' as 'cloning repos', etc. Additionally, we assume that you are using Prenice robot, so if you are using Gemini or Poli just make sure you look at for the correct branch names.

Tutorial

  1. Start by switch to the Jaco2 7-DoF branches for your repos and pulling the latest commit:
    • For hlpr_simulator package, get latest commit from 7dof.
    • For hlpr_manipulation package, get latest commit from 7dof.
    • For hlpr_common package, get latest commit from 7dof.
    • For vector_v1 package, get latest commit from prentice_master_backup.
  2. Grab the kinova-description package from the kinova-ros repo which has the driver for the new Jaco2 7-DoF arm.
    • Clone the 7dof branch from RAIL's forked repo: git clone -b 7dof https://github.com/GT-RAIL/kinova-ros.git, and add the kinova_description package to your catkin_workspace. Note that, because kinova-ros is now the driver for bringing up the arm, you no longer need to set the wpi_jaco_wrapper variables to true. In fact you need to set them to false in the vector.launch file of hlpr_gazebo otherwise you will get red errors and yellow warnings about the tf tree names not matching for the arm:
      <arg name="moveit_launch" default="false" />
      <arg name="moveit_launch_file" default="$(find hlpr_wpi_jaco_moveit_config)/launch/hlpr_wpi_jaco_simple_moveit.launch" />
      <arg name="wpi_jaco_launch" default="false" />
      <arg name="use_wpi_jaco_exec" default="false" />
  3. Set the Jaco2 7-DoF environment variable which lets hlpr_bringup package in hlpr_common know you are using the 7-DoF:
    • The following can be found in Stanley Innovation vector_v1 repo in the vector_config.sh file of vector_config package:
      #Kinova arm configurations (the right arm should be the default if there is only one)
      export VECTOR_HAS_KINOVA_ARM=true
      export VECTOR_HAS_TWO_KINOVA_ARMS=false
      export KINOVA_RIGHT_ARM_SERIAL_NUMBER='PJ00900006153340003' #default arm if there is only one
      export KINOVA_LEFT_ARM_SERIAL_NUMBER='PJ00900006152990001' #must specify serial number for 2 arms
      export VECTOR_HAS_KINOVA_7DOF_ARM=true
  4. Clean your catkin workspace to make sure previously built package aren't interfering with the new branches. You do this by removing the build and devel folders in your catkin workspace.
  5. Build your workspace via catkin_make.
  6. Source the new setup.bash scripts which received you new environment variable for the Jaco2 7-DoF arm, source devel/setup.bash
  7. Run the Gazebo simulator:
    • roslaunch hlpr_gazebo vector.launch should start the environment without errors and you should see the 7-DoF arm on the robot, currently in white.
    • If you are getting naming errors about the arm joints in the tf tree, refer to 2.
    • If you are still seeing a Jaco2 6-DoF arm you may have missed a repo branch to switch to. Also double check that the VECTOR_HAS_KINOVA_7DOF_ARM environment variable is set.
  8. Run the robot services:
    • Set the following parameters inside the start_robot_services.launch file of the hlpr_bringup package:
      <arg name="sim" default="true"/>
      <arg name="jaco_arm" default="true"/> <!-- WARNING: Not used anymore -->
      <arg name="jaco_arm_driver" default="true"/>
      <arg name="gripper_actions" default="true"/>
      <arg name="jaco_moveit" default="true"/>
      <arg name="jaco_moveit_wrapper" default="true"/>
    • Launch hlpr_bringup via roslaunch hlpr_bringup start_robot_services.launch
    • If you get yellow warnings and red errors about the tf tree arm names you should check the VECTOR_HAS_KINOVA_7DOF_ARM environment variable.
  9. Check the installation by make the arm plan and execute a plan to a random workspace position.
    • In rviz add a MotionPlanning module and switch to the Planning tab.
    • You should be able to modify the Select Goal State: pane by clicking the Update button.
    • After the new random goal state has loaded try planning and executing to the goal state via Plan and Execute.
  10. Check backwards compatibility to Jaco2 6-DOF.
  • You should be able to switch between Jaco2 6-DoF and Jaco2 7-DoF by simply changing the VECTOR_HAS_KINOVA_7DOF_ARM environment variable to false.
  • If that worked then you have successfully installed the Jaco2 7-DoF arm.