Tutorials/1.2/build robot/attach gripper


 * 1) Tutorial: Attach Gripper to Robot#


 * Prerequisites:** Simple Mobile Base   Simple Gripper

This tutorial explains how to create a composite robot from existing robot parts, i.e. mobile base, simple arm and simple gripper.


 * 1) Robot Components

Start up gazebo and make sure you can load the models from the two previous tutorials.


 * 1) Mobile Base

1. Per instructions in Simple Mobile Base tutorial, you should have a mobile base robot at your disposal:



1. For this exercise, modify `~/.gazebo/models/my_robot/model.sdf` to make the model larger so it can accommodate the gripper we are about to append to it:

gedit ~/.gazebo/models/my_robot/model.sdf

update the contents:

    0 0 .25 0 0 0

20.0        -0.1 0 -0.1 0 0 0           0.5           1.0           0.1

 2 1 0.3

 2 1 0.3

 -0.8 0 -0.125 0 0 0            .125

0 0

 -0.8 0 -0.125 0 0 0            .125      0.8 0.6 0.125 0 1.5707 1.5707            .125             .05             .125             .05

 0.8 -0.6 0.125 0 1.5707 1.5707            .125             .05             .125             .05

 0 0 -0.03 0 0 0      left_wheel chassis 0 1 0

 0 0 0.03 0 0 0      right_wheel chassis 0 1 0




 * 1) Assembling a Composite Robot

1. To created a mobile robot with a simple gripper attached, create a new models directory

mkdir ~/.gazebo/models/simple_mobile_manipulator cd ~/.gazebo/models/simple_mobile_manipulator

And edit the model manifest file:

gedit ~/.gazebo/models/simple_mobile_manipulator/manifest.xml

populate it with the following contents:

 Simple Mobile Mnaipulator 1.0  model.sdf

My Name me@my.email

My simple mobile manipulator

1. Next, create the model SDF file:

gedit ~/.gazebo/models/simple_mobile_base/model.sdf

and populate with following contents:

 <gazebo version="1.2"> <model name="simple_mobile_manipulator">

model://my_gripper 1.3 0 0.1 0 0 0

model://my_robot 0 0 0 0 0 0

<joint name="arm_gripper_joint" type="revolute"> mobile_base::chassis simple_gripper::riser 0          0         0 0 1

model://hokuyo 1.3 0 0.3 0 0 0

<joint name="hokuyo_joint" type="revolute"> hokuyo::link simple_gripper::palm 0 0 1          0           0

1. Make sure the `manifest.xml` and `model.sdf` files above are saved, start Gazebo and spawn the model above. You should see something similar to: