Let's continue by adding new links to our RDF model of the robot to complete its model.
So the new link that we are going to add is called Forward Drive Art and let's associate a mesh for
its visualization.
So let's use the tag visual and then within it let's use the tag geometry and the tag mesh to render
the model that is in the package.
Arduino bot description still within the meshes folder.
And for this link we are going to render the forward drive.
R dot stl file and also we are going to scale it as we did for all the other meshes by 0.01 in all the
directions.
Then we also need to set the origin so where we are going to render this mesh.
So with the tag origin and this express the orientation, so the orientation of this mesh with respect
to the forward drive R and also its position, so X, Y, Z and so its translation, let's set the orientation
so the r p y to be zero then -90 degrees.
So in radians this is pi divided by two and then again 90 degrees.
And so this is pi divided by two.
These are values of the orientation and position that I've already tested and fine tuned by looking
at how the mesh renders in Arviz.
So let's also translate it by 0.19, then 0.06 and -0.08.
Next, let's connect this new link to the previous one.
So to the base plate by using a new joint and let's call this one joint two.
And this will be the second movable joint of the robot.
So let's set the type to be revolute.
And the parent of this connection is the link base plate.
And the child
of this connection is the link that we have just created.
So the forward drive arm.
Now by setting this one to Revolute, this means that the forward drive arm can rotate with the respect
to the base plate.
And now we need to specify which is the rotation axis around which the forward drive arm can rotate
with the respect to the base plate.
Still to do so, we can use the axis tag.
So let's use the tag axis.
And this has the property X, y, z.
In order to set which is the rotation axis.
And for this one, let's set that.
The rotation axis is the x axis.
So to indicate this, let's use one zero and zero.
So this indicates that x is the rotation axis.
Then let's also specify its origin.
So which is the transformation matrix that connects the forward drive arm to the base plate.
And so let's say the orientation and then the position.
And if we take a look to the CAD model of the robot, we can see that the two links are still oriented
the same way.
So we can set the RPI to zero.
So this means that the forward drive R is oriented the same way as the base plate.
And also we can see that the forward drive R is translated along the x axis of -two millimeters and
along the Z axis of three centimeters and a half.
So let's set the X, Y, z to be -0.02, then zero and 0.35.
In this case as well, since we are dealing with a movable joint.
So a joint that can rotate.
We need to set the mechanical and kinematic limits of this joint.
And since we are using the same motors also to actuate this joint, let's apply the same limits.
Let's move on and let's define a new link.
Let's call this one.
Horizontal arm and let's assign a visualization to it.
So let's render a geometry and then let's display a mesh.
And the mesh that we want to display is in the package Arduino board.
Description in the Meshes folder.
And for this link here, we want to display the horizontal AR dot mesh and as usual, let's scale it
of 0.01 in all the directions.
Then let's set its origin.
So still within the visual tag.
Let's set the origin.
And so this has the property rpy to express the orientation and X, y, z to express the position.
And let's set the orientation.
So this one to be pi divided by two, then zero, and then again pi divided by two.
And then for the translation.
So here, let's set it to be -0.03, then -0.4 and -0.06.
As usual, let's connect these new link that we have created to the previous ones by using a new joint.
And let's call this one joint three.
This is still a revolute joint, so the type is still revolute.
And this joint connects the parent.
That is the previous link.
So the previous link is the forward drive R.
And connect this link to the child, which is the link that we have just created.
And so the horizontal arm.
Now, since this is a revolute joint, it means that the horizontal arm can rotate with the respect
to the forward drive arm.
And also in this case, we need to express which is the rotation axis.
So let's set the property X, Y, z.
And in this case, the rotation axis is still the x axis.
So let's set this one to be one zero and zero.
Now, let's also set the origin.
And so these express the transformation matrix.
And so the orientation and the translation of the horizontal arm with respect to the forward drive are.
We can take these values.
Still looking at the CAD model of our robot in which we can see that the horizontal arm is oriented
the same way as the forward drive arm.
So let's set the RPI to be zero since they are oriented the same way, and then we can see that the
horizontal AR is translated along the Z axis of eight centimeters.
So let's set the X, y, z to be zero zero and 0.8.
And also in this case, let's copy the same limits, so the same kinematics and mechanical limits also.
So let's copy the ones that we used also for the joint to.
Let's continue by adding more links to the robot.
So let's add a new link.
And this one is called Glow Support.
And actually this one will be the last one that belongs to the arm and that will be the interface with
the gripper.
So to this one we will attach the gripper of the robot.
So the visualization, the mesh that we want to render.
So let's use the tag geometry and within the tag mesh and the file name.
So the mesh that we want to render is still in the package Arduino bot description within the meshes
folder.
And for this one we want to render the glow support dot mesh.
And as always, let's scale it by 0.01 in all the directions.
Let's also set the origin of this mesh.
So let's set how it will be oriented and translate it with respect to the cloud support link.
And the orientation is zero zero and pi divided by two and the translation instead is zero -0.05 and
-0.15.
Let's connect also this new link to the previous one of the robot.
So let's use a new joint that connects the parent that we call.
So let's assign a name.
And this one is the horizontal are two close support and this connects the parent.
That is the link horizontal arm.
So the previous one.
And this is connected to the child
that is the link closer port.
So this one that we have just created and now this connection is a fixed connection.
So basically these two links is like if they were screwed together so they cannot move with respect
to each other.
So let's set the type of this connection to be fixed.
And then as this is a fixed joint, we just need to define the origin of this connection.
And so the X, Y, Z.
So the translation and the p y.
And so the orientation.
We can take these values from the CAD model of the robot where we can see that the close support link
is oriented the same way as the horizontal are.
So let's set the Pi to be zero and then instead we can see that the close support is translated along
the Y axis by 8.2cm.
So let's set the translation to be 00. 82 and zero.
Then let's add the two last links to the robot.
So let's add two last links.
And these ones are the ones that belongs to the gripper.
And so they are the fingers, actually, of the gripper.
Let's call the first one.
Gripper.
Right.
And the second one?
Gripper.
Left.
Okay.
For both of them, let's add a visualization.
So visual.
And then let's display a geometry and let's render a mesh.
And the mesh is still in the package.
Arduino board.
Description within the meshes folder and for the gripper.
Right, let's display.
So let's render the mesh that is called right finger.
So right finger dot STL and let's scale it as we have done with all the meshes.
Now let's copy this tag visual also for the other gripper.
So for the gripper left and let's just change the name of the mesh that is rendered to be the left finger
dot STL.
Now for both of them we also need to specify the origin.
So let's use the tag origin that has properties x, y, z and our p y.
So let's copy this one also for the other link.
So for the gripper left.
And the orientation of the gripper left.
So this one is zero zero and minus pi divided by two.
And then its translation here is -0.04 0.5 and -0.1.
And then for the second one.
So for the gripper, right, the orientation is still so here, zero zero and minus five divided by
two, and the translation is -0.1 0.5 and -0.1.
Now we just need to connect these last two links to the previous ones of the robot.
And so we do this by using two joint tags.
So let's add the first one.
And the second one.
The first one is called.
Joined for.
And the last one is called Joint five.
The joint for connects.
The parent link, which is the previous one.
So the support link.
So this one and it connects to the child.
That is the link.
Gripper, Right.
And then the joint five connects.
Still, the parent is the same.
So the parent link is still the low support and the child.
Is the link.
Gripper left.
So these two links, the gripper right, and the gripper left, will have the same patent.
So the close support, they will be connected to the same parent.
Let's close also this tag here.
And both of these joints are of type Revolute So this means that both the gripper left and the gripper
right will be able to rotate with respect to the close support.
So let's set the type to be revolute for both of them.
Now as we set the type to be reviewed, we also need to specify for both of these links the rotation
axis.
So let's use the axis tag and then the X, y, z properties.
And for both of them the rotation axis is the Z axis.
So let's indicate this one by using zero zero and one.
So let's copy this tag also for the joint five.
Now we are missing to define the origin of both of these.
And so the orientation or P and the translation X, Y, Z of both of these joints.
So let's copy this one also here.
And so basically we are missing to define the transformation matrix between the gripper, right, and
the support and between the gripper left and still the support.
As we can see from the CAD model, the Gripper right link is oriented the same way as the close up port.
And also the gripper left is oriented the same way as the close up port.
So we can set the property P to be zero for both of these joints and then we can see that the gripper
right is translated by -four millimeters along the x axis, then by 1.3cm along the y axis and by -one
centimeter along the Z axis.
So let's set for the joint for.
So here the translation to be -0.04, 0.13 and -0.1.
And also we can see that the gripper left is translated by -2.2cm along the x axis, 1.3cm along the
Y axis and -one centimeter along the Z axis.
So let's set the property X, Y, Z to be -0.22, 0.13 and -0.1.
Finally, since the two fingers of the robot will move together, they are composed of a gear system
that ensures that they open and close together so that they open and close by the same angle to indicate
this.
Also, in the urdf model of our robot, we need to use a new tag that is the mimic tag.
So within the joint file, let's use the tag mimic to indicate that we want the joint five to mimic
the behavior of the joint that we called joint four.
But we want this one to mimic this behavior but in the opposite direction.
So let's set the multiplier to be minus one.
And this means that when the joint four will rotate 90 degrees, the joint five will rotate -90 degrees.
Since they are oriented in the opposite way.
And now we just need to add the mechanical and kinematic limits for these two joints.
So for the joint, for and for the joint.
Five And so once more we can copy the same limit that we used, for example, for the joint three.
So let's paste them in both the joint four and the joint five.
And in this case, however, the two fingers of the gripper have different mechanical limits.
In fact, the gripper, right.
So this one, the joint four can rotate from -90 degrees to zero.
So let's set this 1 to 0.
So 0.0.
And the second one instead, so the joint five can rotate from zero.
So 0.0 to 90 degrees.
So this is fine.
With this, we have completed the RDF model of our robot with all the links and the joints that compose
the robot.
So let's see how the robot renders.
So let's open a new terminal.
Let's go to the Arduino bot workspace here.
Let's build the workspace.
Then in a new terminal.
So here we can source the workspace.
And then let's use the same command that we used in the previous lesson to visualize.
So to preview the model.
And this is the Ros to launch.
And from the Urdf tutorial package, we want to use the display dot launch and we want to visualize
our model that is in the folder home.
Then in the package Arduino bot workspace in the source folder in the Arduino bot description package,
then in the Urdf folder and this called Arduino dot Urdf dot.
So let's press enter.
And now we can see that the full model of the robot is rendered.
And also we can see that here we have a slider that we can use to move all the joints of the robot.
So all the joints for which we set the type to be revolute.
Now here appear in this slider and we can actually operate them.
And also we can see that for the last one.
So for the gripper, despite having only one slider, we are actuating two frames.
So here we can see that these two, one and two, these two frames here are rotating just by actuating
one slider.
And so this is the behavior that we obtained by using the mimic tag.