-
Notifications
You must be signed in to change notification settings - Fork 37
The Jaco URDF model
This package contains the URDF model for the Kinova Jaco arm.
The following page describes:
- How to load up the existing URDF in Gazebo
- How to integrate the arm into your robot.
Experiments showed that the robot description in the kinova specs (see the documents in jaco_description/docs) did not match the robot hand perfectly: How the robot saw itself with an Xtion camera, did not match the model displayed in RViz. Some corrections were made to the parameters in order for it to match the real arm more closely.
These corrections can be found in the jaco.urdf.xacro file, searching for MODEL_FIX. (in the current version, some of the fixes are commented out however). The meshes around the finger bases are not well fitted for the new parameters. Designing new meshes it part of future work. See also README.ModelChanges.md for more details.
You can load up the robot without joint controllers for test purposes, or as a starting point to integrate your own controllers.
The basic URDF file does not load the Gazebo joint controllers, so the arm will collapse after loading. The Jaco Gazebo tutorial includes instructions on how to load up the Jaco with constroller instead.
You can either
- use the example launch file or
- spawn the robot URDF separately
Option 1. Use example launch file to start gazebo and load robot
To launch gazebo and spawn the standalone arm from a single launch file:
roslaunch jaco_description jaco_standalone_gazebo.launch
And to launch the jaco arm mounted on a table:
roslaunch jaco_on_table jaco_on_table_gazebo.launch
Option 2. Spawn the robot into gazebo
You may also spawn the robot into an already running gazebo world.
The repository only offers the xacro files, so to spawn the Jaco, you will have to convert the urdf first:
rosrun xacro xacro --inorder <your-xacro-file>.xacro > <your-urdf-output-file>.urdf
Launch gazebo (with empty_world):
rosrun gazebo_ros gazebo
And spawn the arm only:
rosrun gazebo_ros spawn_model -file `rospack find jaco_description`/urdf/jaco_robot.urdf -urdf -x 0 -y 0 -z 0 -model jaco_robot
or the arm on the table:
rosrun gazebo_ros spawn_model -file `rospack find jaco_on_table`/urdf/jaco_on_table.urdf -urdf -x 0 -y 0 -z 0 -model jaco_on_table
Create a new ROS package for your URDF that should include the Jaco arm (or go to the existing package) and add the following dependencies.
catkin_create_pkg <your-robot-name>_description xacro jaco_description
Create a folder "urdf" within this package. In this, create a top-level URDF YOUR_ROBOT.urdf.xacro based on the following frame (which is of course a template only):
<?xml version="1.0"?>
<robot name="<your-robot-name>" xmlns:xacro="http://ros.org/wiki/xacro">
<!-- Included URDF Files -->
<xacro:include filename="$(find <yourpackage>)/urdf/<your-robot-include>.urdf.xacro" />
<link name="robot_base">
<static>false</static>
</link>
<!-- Add your robot via a macro -->
<xacro:your-robot-macro parent="robot_base"/>
<!-- Add the JACO arm to the given parent link with the given transforms -->
<xacro:jaco_arm parent="link-on-your-robot"
mass_divider="2" finger_mass_divider="1">
<origin xyz="0 0 0" rpy="0 0 0" />
<!-- set to true if you would like to add <transmission> tags -->
<xacro:arg name="add_transmission_pos" default="true"/>
<xacro:arg name="add_transmission_vel" default="true"/>
</xacro:jaco_arm>
</robot>
The mass_divider
parameters can be used to make the whole robot lighter or heavier.
The origin tag is the transform used for the joint connecting arm_support_link with the jaco arm.
The important thing is to include the macro xacro:jaco_arm and declare the parent link as a link in your other robot to which you want to attach the arm (it do not have to be "robot_base" like in the example). The origin tag can be used to specify the transform of a fixed joint which will be created to connect the Jaco to your link.
The tags add_transmission_pos and add_transmission_vel can be set to true to include
the <transmission>
tags. There generally should be no harm in loading them even if you
do not need them. Best take a look at the URDF for more details about this:
rosed jaco_description jaco.urdf.xacro
Create a folder "launch" within the package and add a launch file to get up gazebo and/or the robot.
You may include the following convenience launch file from your own launch file:
rosed $(find jaco_description)/launch/jaco_gazebo.launch
There are a number of arguments which are documented within this file. For instance, you have to set your robot urdf as argument here. For an example, see this launch file which loads up just the Jaco arm:
rosed $(find jaco_description)/launch/jaco_standalone_gazebo.launch
Please refer to the jaco_moveit wiki page and the Jaco MoveIt tutorial for instructions on how to set up the arm with MoveIt!.
The URDF files do not load gazebo plugins to control the joints. You can find examples for joint controllers along with examples on how to include them in the model in the package jaco_gazebo, also described on the jaco_gazebo wiki page.