WEBVTT

00:00.230 --> 00:06.050
Let's continue by adding new links to our RDF model of the robot to complete its model.

00:06.380 --> 00:19.520
So the new link that we are going to add is called Forward Drive Art and let's associate a mesh for

00:19.520 --> 00:20.720
its visualization.

00:20.720 --> 00:31.010
So let's use the tag visual and then within it let's use the tag geometry and the tag mesh to render

00:31.010 --> 00:34.820
the model that is in the package.

00:36.740 --> 00:42.920
Arduino bot description still within the meshes folder.

00:44.030 --> 00:51.320
And for this link we are going to render the forward drive.

00:51.710 --> 01:01.490
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

01:01.490 --> 01:02.450
directions.

01:02.720 --> 01:08.720
Then we also need to set the origin so where we are going to render this mesh.

01:09.320 --> 01:15.890
So with the tag origin and this express the orientation, so the orientation of this mesh with respect

01:15.890 --> 01:25.340
to the forward drive R and also its position, so X, Y, Z and so its translation, let's set the orientation

01:25.340 --> 01:32.090
so the r p y to be zero then -90 degrees.

01:32.090 --> 01:38.690
So in radians this is pi divided by two and then again 90 degrees.

01:38.690 --> 01:41.780
And so this is pi divided by two.

01:41.900 --> 01:48.030
These are values of the orientation and position that I've already tested and fine tuned by looking

01:48.030 --> 01:50.310
at how the mesh renders in Arviz.

01:50.760 --> 02:00.030
So let's also translate it by 0.19, then 0.06 and -0.08.

02:00.660 --> 02:04.860
Next, let's connect this new link to the previous one.

02:04.860 --> 02:13.980
So to the base plate by using a new joint and let's call this one joint two.

02:13.980 --> 02:17.250
And this will be the second movable joint of the robot.

02:17.250 --> 02:21.780
So let's set the type to be revolute.

02:21.780 --> 02:28.740
And the parent of this connection is the link base plate.

02:30.900 --> 02:32.850
And the child

02:36.240 --> 02:40.890
of this connection is the link that we have just created.

02:40.890 --> 02:43.020
So the forward drive arm.

02:43.970 --> 02:51.200
Now by setting this one to Revolute, this means that the forward drive arm can rotate with the respect

02:51.200 --> 02:52.400
to the base plate.

02:52.400 --> 02:58.820
And now we need to specify which is the rotation axis around which the forward drive arm can rotate

02:58.850 --> 03:01.100
with the respect to the base plate.

03:01.560 --> 03:04.470
Still to do so, we can use the axis tag.

03:04.490 --> 03:07.280
So let's use the tag axis.

03:07.280 --> 03:10.190
And this has the property X, y, z.

03:10.220 --> 03:12.800
In order to set which is the rotation axis.

03:12.800 --> 03:15.140
And for this one, let's set that.

03:15.140 --> 03:17.980
The rotation axis is the x axis.

03:17.990 --> 03:22.460
So to indicate this, let's use one zero and zero.

03:22.460 --> 03:27.080
So this indicates that x is the rotation axis.

03:27.760 --> 03:30.100
Then let's also specify its origin.

03:30.910 --> 03:37.240
So which is the transformation matrix that connects the forward drive arm to the base plate.

03:37.420 --> 03:42.730
And so let's say the orientation and then the position.

03:44.380 --> 03:49.930
And if we take a look to the CAD model of the robot, we can see that the two links are still oriented

03:49.930 --> 03:50.960
the same way.

03:50.980 --> 03:54.490
So we can set the RPI to zero.

03:54.490 --> 03:59.640
So this means that the forward drive R is oriented the same way as the base plate.

03:59.680 --> 04:08.830
And also we can see that the forward drive R is translated along the x axis of -two millimeters and

04:08.830 --> 04:12.580
along the Z axis of three centimeters and a half.

04:12.730 --> 04:21.310
So let's set the X, Y, z to be -0.02, then zero and 0.35.

04:22.150 --> 04:25.420
In this case as well, since we are dealing with a movable joint.

04:25.420 --> 04:27.400
So a joint that can rotate.

04:27.430 --> 04:31.630
We need to set the mechanical and kinematic limits of this joint.

04:31.750 --> 04:38.770
And since we are using the same motors also to actuate this joint, let's apply the same limits.

04:39.250 --> 04:41.950
Let's move on and let's define a new link.

04:44.560 --> 04:45.910
Let's call this one.

04:47.960 --> 04:54.410
Horizontal arm and let's assign a visualization to it.

04:54.560 --> 05:01.940
So let's render a geometry and then let's display a mesh.

05:02.840 --> 05:10.190
And the mesh that we want to display is in the package Arduino board.

05:11.270 --> 05:14.570
Description in the Meshes folder.

05:14.570 --> 05:26.660
And for this link here, we want to display the horizontal AR dot mesh and as usual, let's scale it

05:27.230 --> 05:30.290
of 0.01 in all the directions.

05:31.220 --> 05:33.280
Then let's set its origin.

05:33.290 --> 05:35.330
So still within the visual tag.

05:36.140 --> 05:37.880
Let's set the origin.

05:37.880 --> 05:45.850
And so this has the property rpy to express the orientation and X, y, z to express the position.

05:45.920 --> 05:47.840
And let's set the orientation.

05:47.840 --> 06:00.710
So this one to be pi divided by two, then zero, and then again pi divided by two.

06:01.190 --> 06:03.020
And then for the translation.

06:03.020 --> 06:14.480
So here, let's set it to be -0.03, then -0.4 and -0.06.

06:15.500 --> 06:23.090
As usual, let's connect these new link that we have created to the previous ones by using a new joint.

06:23.390 --> 06:28.280
And let's call this one joint three.

06:28.370 --> 06:34.790
This is still a revolute joint, so the type is still revolute.

06:35.030 --> 06:38.570
And this joint connects the parent.

06:39.710 --> 06:41.540
That is the previous link.

06:41.540 --> 06:44.540
So the previous link is the forward drive R.

06:46.070 --> 06:52.770
And connect this link to the child, which is the link that we have just created.

06:52.790 --> 06:54.320
And so the horizontal arm.

06:56.590 --> 07:02.830
Now, since this is a revolute joint, it means that the horizontal arm can rotate with the respect

07:02.830 --> 07:04.750
to the forward drive arm.

07:04.750 --> 07:09.920
And also in this case, we need to express which is the rotation axis.

07:09.940 --> 07:12.850
So let's set the property X, Y, z.

07:13.210 --> 07:17.100
And in this case, the rotation axis is still the x axis.

07:17.110 --> 07:20.590
So let's set this one to be one zero and zero.

07:21.380 --> 07:23.540
Now, let's also set the origin.

07:25.120 --> 07:27.770
And so these express the transformation matrix.

07:27.770 --> 07:37.460
And so the orientation and the translation of the horizontal arm with respect to the forward drive are.

07:38.370 --> 07:39.690
We can take these values.

07:39.690 --> 07:45.780
Still looking at the CAD model of our robot in which we can see that the horizontal arm is oriented

07:45.780 --> 07:48.270
the same way as the forward drive arm.

07:48.450 --> 07:55.140
So let's set the RPI to be zero since they are oriented the same way, and then we can see that the

07:55.140 --> 08:00.960
horizontal AR is translated along the Z axis of eight centimeters.

08:00.960 --> 08:06.090
So let's set the X, y, z to be zero zero and 0.8.

08:06.900 --> 08:14.910
And also in this case, let's copy the same limits, so the same kinematics and mechanical limits also.

08:14.910 --> 08:18.150
So let's copy the ones that we used also for the joint to.

08:18.910 --> 08:21.560
Let's continue by adding more links to the robot.

08:21.580 --> 08:23.110
So let's add a new link.

08:23.830 --> 08:29.320
And this one is called Glow Support.

08:29.320 --> 08:35.260
And actually this one will be the last one that belongs to the arm and that will be the interface with

08:35.260 --> 08:35.980
the gripper.

08:35.980 --> 08:39.280
So to this one we will attach the gripper of the robot.

08:39.760 --> 08:44.530
So the visualization, the mesh that we want to render.

08:45.310 --> 08:54.670
So let's use the tag geometry and within the tag mesh and the file name.

08:54.670 --> 09:04.600
So the mesh that we want to render is still in the package Arduino bot description within the meshes

09:04.600 --> 09:05.290
folder.

09:05.290 --> 09:12.670
And for this one we want to render the glow support dot mesh.

09:12.670 --> 09:18.250
And as always, let's scale it by 0.01 in all the directions.

09:19.310 --> 09:21.710
Let's also set the origin of this mesh.

09:23.600 --> 09:33.230
So let's set how it will be oriented and translate it with respect to the cloud support link.

09:33.530 --> 09:46.010
And the orientation is zero zero and pi divided by two and the translation instead is zero -0.05 and

09:46.010 --> 09:48.150
-0.15.

09:50.110 --> 09:53.650
Let's connect also this new link to the previous one of the robot.

09:53.770 --> 10:02.050
So let's use a new joint that connects the parent that we call.

10:02.590 --> 10:04.000
So let's assign a name.

10:05.290 --> 10:18.490
And this one is the horizontal are two close support and this connects the parent.

10:20.530 --> 10:23.830
That is the link horizontal arm.

10:23.830 --> 10:24.940
So the previous one.

10:26.740 --> 10:28.960
And this is connected to the child

10:31.810 --> 10:34.740
that is the link closer port.

10:34.750 --> 10:40.510
So this one that we have just created and now this connection is a fixed connection.

10:40.510 --> 10:46.420
So basically these two links is like if they were screwed together so they cannot move with respect

10:46.420 --> 10:47.350
to each other.

10:47.350 --> 10:53.020
So let's set the type of this connection to be fixed.

10:54.910 --> 11:01.720
And then as this is a fixed joint, we just need to define the origin of this connection.

11:01.720 --> 11:03.670
And so the X, Y, Z.

11:03.880 --> 11:06.730
So the translation and the p y.

11:07.030 --> 11:08.770
And so the orientation.

11:10.340 --> 11:15.680
We can take these values from the CAD model of the robot where we can see that the close support link

11:15.710 --> 11:18.890
is oriented the same way as the horizontal are.

11:18.920 --> 11:27.560
So let's set the Pi to be zero and then instead we can see that the close support is translated along

11:27.560 --> 11:31.940
the Y axis by 8.2cm.

11:31.940 --> 11:38.630
So let's set the translation to be 00. 82 and zero.

11:39.470 --> 11:43.180
Then let's add the two last links to the robot.

11:43.190 --> 11:45.290
So let's add two last links.

11:46.060 --> 11:49.930
And these ones are the ones that belongs to the gripper.

11:49.930 --> 11:53.080
And so they are the fingers, actually, of the gripper.

11:53.530 --> 11:55.150
Let's call the first one.

11:57.010 --> 11:57.850
Gripper.

11:59.530 --> 12:00.330
Right.

12:00.520 --> 12:01.900
And the second one?

12:04.120 --> 12:04.780
Gripper.

12:06.190 --> 12:06.740
Left.

12:07.290 --> 12:08.030
Left.

12:08.290 --> 12:08.740
Okay.

12:08.740 --> 12:10.990
For both of them, let's add a visualization.

12:11.530 --> 12:14.230
So visual.

12:15.160 --> 12:22.120
And then let's display a geometry and let's render a mesh.

12:22.510 --> 12:27.460
And the mesh is still in the package.

12:29.870 --> 12:30.710
Arduino board.

12:32.370 --> 12:37.670
Description within the meshes folder and for the gripper.

12:37.670 --> 12:39.460
Right, let's display.

12:39.470 --> 12:43.130
So let's render the mesh that is called right finger.

12:43.130 --> 12:52.730
So right finger dot STL and let's scale it as we have done with all the meshes.

12:53.660 --> 12:57.560
Now let's copy this tag visual also for the other gripper.

12:57.740 --> 13:07.460
So for the gripper left and let's just change the name of the mesh that is rendered to be the left finger

13:07.460 --> 13:08.540
dot STL.

13:08.960 --> 13:12.350
Now for both of them we also need to specify the origin.

13:12.620 --> 13:21.410
So let's use the tag origin that has properties x, y, z and our p y.

13:22.340 --> 13:26.210
So let's copy this one also for the other link.

13:26.210 --> 13:28.370
So for the gripper left.

13:28.970 --> 13:30.830
And the orientation of the gripper left.

13:30.830 --> 13:38.570
So this one is zero zero and minus pi divided by two.

13:38.990 --> 13:49.490
And then its translation here is -0.04 0.5 and -0.1.

13:50.920 --> 13:52.690
And then for the second one.

13:52.690 --> 14:03.700
So for the gripper, right, the orientation is still so here, zero zero and minus five divided by

14:03.700 --> 14:12.400
two, and the translation is -0.1 0.5 and -0.1.

14:13.030 --> 14:17.890
Now we just need to connect these last two links to the previous ones of the robot.

14:17.980 --> 14:22.660
And so we do this by using two joint tags.

14:22.810 --> 14:24.730
So let's add the first one.

14:28.570 --> 14:30.040
And the second one.

14:30.130 --> 14:32.260
The first one is called.

14:34.350 --> 14:37.320
Joined for.

14:37.950 --> 14:43.230
And the last one is called Joint five.

14:43.440 --> 14:45.600
The joint for connects.

14:45.930 --> 14:52.200
The parent link, which is the previous one.

14:52.200 --> 14:54.270
So the support link.

14:55.080 --> 14:59.700
So this one and it connects to the child.

14:59.970 --> 15:01.470
That is the link.

15:03.480 --> 15:06.510
Gripper, Right.

15:07.960 --> 15:09.910
And then the joint five connects.

15:09.910 --> 15:13.690
Still, the parent is the same.

15:13.930 --> 15:20.590
So the parent link is still the low support and the child.

15:22.640 --> 15:23.660
Is the link.

15:29.700 --> 15:31.460
Gripper left.

15:31.470 --> 15:36.870
So these two links, the gripper right, and the gripper left, will have the same patent.

15:36.870 --> 15:40.800
So the close support, they will be connected to the same parent.

15:41.130 --> 15:43.860
Let's close also this tag here.

15:43.980 --> 15:50.850
And both of these joints are of type Revolute So this means that both the gripper left and the gripper

15:50.850 --> 15:55.170
right will be able to rotate with respect to the close support.

15:55.440 --> 16:01.230
So let's set the type to be revolute for both of them.

16:04.940 --> 16:11.660
Now as we set the type to be reviewed, we also need to specify for both of these links the rotation

16:11.660 --> 16:12.270
axis.

16:12.290 --> 16:17.120
So let's use the axis tag and then the X, y, z properties.

16:17.120 --> 16:21.280
And for both of them the rotation axis is the Z axis.

16:21.290 --> 16:25.490
So let's indicate this one by using zero zero and one.

16:25.820 --> 16:30.560
So let's copy this tag also for the joint five.

16:31.200 --> 16:35.660
Now we are missing to define the origin of both of these.

16:35.940 --> 16:44.010
And so the orientation or P and the translation X, Y, Z of both of these joints.

16:44.760 --> 16:46.980
So let's copy this one also here.

16:46.980 --> 16:52.380
And so basically we are missing to define the transformation matrix between the gripper, right, and

16:52.380 --> 16:56.130
the support and between the gripper left and still the support.

16:56.760 --> 17:03.360
As we can see from the CAD model, the Gripper right link is oriented the same way as the close up port.

17:03.360 --> 17:08.240
And also the gripper left is oriented the same way as the close up port.

17:08.250 --> 17:17.190
So we can set the property P to be zero for both of these joints and then we can see that the gripper

17:17.190 --> 17:27.490
right is translated by -four millimeters along the x axis, then by 1.3cm along the y axis and by -one

17:27.490 --> 17:29.820
centimeter along the Z axis.

17:29.970 --> 17:32.760
So let's set for the joint for.

17:32.760 --> 17:41.100
So here the translation to be -0.04, 0.13 and -0.1.

17:41.460 --> 17:50.640
And also we can see that the gripper left is translated by -2.2cm along the x axis, 1.3cm along the

17:50.640 --> 17:54.770
Y axis and -one centimeter along the Z axis.

17:54.780 --> 18:03.490
So let's set the property X, Y, Z to be -0.22, 0.13 and -0.1.

18:03.910 --> 18:09.640
Finally, since the two fingers of the robot will move together, they are composed of a gear system

18:09.640 --> 18:17.170
that ensures that they open and close together so that they open and close by the same angle to indicate

18:17.170 --> 18:17.560
this.

18:17.560 --> 18:24.250
Also, in the urdf model of our robot, we need to use a new tag that is the mimic tag.

18:24.370 --> 18:31.300
So within the joint file, let's use the tag mimic to indicate that we want the joint five to mimic

18:31.300 --> 18:37.390
the behavior of the joint that we called joint four.

18:37.390 --> 18:42.100
But we want this one to mimic this behavior but in the opposite direction.

18:42.100 --> 18:47.230
So let's set the multiplier to be minus one.

18:47.230 --> 18:55.000
And this means that when the joint four will rotate 90 degrees, the joint five will rotate -90 degrees.

18:55.000 --> 18:57.580
Since they are oriented in the opposite way.

18:58.090 --> 19:03.490
And now we just need to add the mechanical and kinematic limits for these two joints.

19:03.490 --> 19:05.710
So for the joint, for and for the joint.

19:05.740 --> 19:13.600
Five And so once more we can copy the same limit that we used, for example, for the joint three.

19:13.900 --> 19:18.060
So let's paste them in both the joint four and the joint five.

19:18.070 --> 19:23.570
And in this case, however, the two fingers of the gripper have different mechanical limits.

19:23.590 --> 19:25.710
In fact, the gripper, right.

19:25.720 --> 19:31.330
So this one, the joint four can rotate from -90 degrees to zero.

19:31.330 --> 19:33.180
So let's set this 1 to 0.

19:33.190 --> 19:35.200
So 0.0.

19:35.440 --> 19:40.240
And the second one instead, so the joint five can rotate from zero.

19:41.290 --> 19:45.010
So 0.0 to 90 degrees.

19:45.010 --> 19:46.420
So this is fine.

19:47.070 --> 19:52.830
With this, we have completed the RDF model of our robot with all the links and the joints that compose

19:52.830 --> 19:53.610
the robot.

19:53.760 --> 19:57.060
So let's see how the robot renders.

19:57.210 --> 19:59.730
So let's open a new terminal.

20:00.330 --> 20:03.390
Let's go to the Arduino bot workspace here.

20:04.290 --> 20:05.940
Let's build the workspace.

20:06.300 --> 20:08.070
Then in a new terminal.

20:08.070 --> 20:11.040
So here we can source the workspace.

20:12.030 --> 20:16.560
And then let's use the same command that we used in the previous lesson to visualize.

20:16.560 --> 20:18.240
So to preview the model.

20:18.360 --> 20:20.820
And this is the Ros to launch.

20:20.820 --> 20:29.010
And from the Urdf tutorial package, we want to use the display dot launch and we want to visualize

20:29.010 --> 20:32.670
our model that is in the folder home.

20:33.630 --> 20:42.200
Then in the package Arduino bot workspace in the source folder in the Arduino bot description package,

20:42.210 --> 20:47.470
then in the Urdf folder and this called Arduino dot Urdf dot.

20:48.340 --> 20:50.110
So let's press enter.

20:50.110 --> 20:53.860
And now we can see that the full model of the robot is rendered.

20:53.860 --> 20:59.820
And also we can see that here we have a slider that we can use to move all the joints of the robot.

20:59.830 --> 21:04.360
So all the joints for which we set the type to be revolute.

21:04.390 --> 21:09.340
Now here appear in this slider and we can actually operate them.

21:09.340 --> 21:11.620
And also we can see that for the last one.

21:11.620 --> 21:17.290
So for the gripper, despite having only one slider, we are actuating two frames.

21:17.290 --> 21:25.600
So here we can see that these two, one and two, these two frames here are rotating just by actuating

21:25.600 --> 21:26.350
one slider.

21:26.350 --> 21:30.630
And so this is the behavior that we obtained by using the mimic tag.
