SolidWorks exports the URDF model of the robotic arm to set the coordinate system of each joint

Solemn reminder : In order to record the problems I encountered during the learning process, I recorded this blog. . In the process of learning later, I found thatthere are some problems in the setting method of the exported URDF model coordinate system recorded in the previous blog. It is not easy to write the DH parameter table. What's more terrible is that many friends have collected this blog. In order not to mislead Everyone, make changes to the following content again, and give the DH parameter table . This method is so far, I think it is the best method to understand the coordinate system - it feels like a branch of the standard DH parameter table establishment method.


One more thing, everyone knows that the method of establishing a coordinate system is not the only one. It is divided into standard DH parameters and corrected DH parameters. The method of establishing standard DH parameters is only applicable to "chain" robotic arms , which is what I use. If this kind of series manipulator is used for parallel manipulator, it will cause ambiguity . What is a parallel robotic arm? The closed-loop robotic arm shown in the figure below. If the method of modifying the DH parameters is used, although there will be no ambiguity, it is very difficult to understand. So the following is the best understanding method I can think of to establish a coordinate system applied to a "chained" robotic arm .

Parallel robotic arm


Tip : The purpose of my robotic arm is to use Gazebo for simulation in Ubuntu . I would like to share with you many problems encountered during the simulation process, such as trembling, going up to the sky, falling to the ground and so on . Not much to say, let's get to the point

Robotic Arm Model Download

First download the model. The model I use is ABB-IRB2600-20, which can be downloaded from the official website. The link to the official website is as follows: https://new.abb.com/products/robotics/zh/robots/paint -robots/irb-52 You can copy and open this link, and then download this robotic arm.

I downloaded and assembled the robotic arm as follows:

By the way, the robotic arm that everyone has downloaded does not have a gripper . This gripper is drawn and assembled by myself, because I want to simulate grasping.

To establish a coordinate system, we first ask everyone to standardize it , and don’t mess yourself up:

Link represents the skeleton, which is every part. joint stands for joint, which is the combination of two joints . For example, if you imagine your own legs, you can write Link_calf, Link_thigh, and combine them into joint_knee. This is very impressive!

In order to understand, the name of each part of the robotic arm is deliberately modified. You don’t need to modify the name of the model inside. I just want to standardize it for you:

The robotic arm you downloaded has only seven parts from base_link to link6 , from the base to the end flange , and from link7_1 onwards are the grippers I added myself.

 Where is the base_link? As shown below:

The lower right corner is the base_link (blue base). You may ask, am I a fool, don’t I know that this is the base_link? I specifically say here because the base_link and the world coordinate system need to be fixed during the Gazebo simulation later , otherwise your robotic arm will fly up or fall to the ground as a whole ( one of the reasons ), of course, the mechanical arm of the fixed coordinate system will not It must be able to stand up, but this part must be.

Establish a coordinate system in three steps, first point, then line, and then coordinate system

Step 1: Where is the point? Take base_link as a chestnut: as follows:

 Is this spot easy to find? When assembling, the base is placed at the origin, and I named it base_link_point. Simple here!

Step Two: Where Are the Wires ? This line is called the axis , which is the rotation axis established for the next Link , as shown in the figure below:

 Is this axis the axis around which the next joint Link1 rotates ? That's right, I named it axis1. You may ask, why not axis_base_link? Because the base_link is fixed and does not need an axis, and, as I mentioned earlier, the establishment of the axis is to establish the axis for the next Link.

Step 3: Where is the coordinate system ? As shown below

We select the point base_link_point just created, and then click Insert at the top of Solidworks - Reference Geometry - Coordinate System to establish a coordinate system. Note: The established coordinate system has two requirements :

First: The Z axis must coincide with the rotation axis , must coincide, must coincide. But the Base_link is different, because it is fixed, it has no axis of rotation, so let's make it's Z axis point up. You may not be able to see it here, and you may not feel it . I am making a chestnut next time, and you may feel it.

Second: The X-axis is "perpendicular" and "intersects" with the rotation axis of the "previous Link" . Isn't this very convoluted? It doesn't matter. It can't be seen here, because the Base_link is fixed, and it has no rotation axis, so let the X axis face forward, let's look at the next example.


Tip: Note that axis1 is the rotation axis of Link1, not of Base_link, so the coordinate system coordinate0 in the above figure is the same as the origin coordinate system.

In this way, the directions of the two axes are specified, and the third axis Y-axis will be determined by itself. How is the third axis determined ? , according to the right-handed coordinate system, see the figure below:

 Stretch out your right hand, then the x-axis is the pointing of the four fingers, the z-axis is the pointing of the thumb, and then the four fingers are slightly bent at 90 degrees to be the pointing of the y-axis, is it super easy to understand? At this time, it's time to raise the bar and you may ask, what about turning the four fingers outward? If you can bend 90 degrees, then I'll admit I was wrong.


Let's take the second chestnut, because you may think that the chestnut of Base_link is not like this? So much crap. The reason for my nonsense is to let everyone establish such a concept.

We quickly skip the coordinate system and rotation axis of Link1: as follows

The coordinate system of Link1 is similar to the coordinate system of Base_link. Note that the Z axis and axis1 are coincident. At the same time, the X axis of coordinate1 in the above figure is vertical and intersects with the rotation axis of base_link itself, but base_link does not have its own rotation axis! So we have the x-axis pointing forward again. ----------- The x-axis of this coordinate1 should be "perpendicular and intersect" with the previous Link, which is the rotation axis of base_link, but base_link itself has no rotation axis, so let the x-axis face forward uniformly up

 Note that the rotation axis axis2 determined by Link1 is the rotation axis prepared for Link2

Dividing line------------------------------------------------ ---------

Chestnut: Link2 coordinate system chestnut, note that it is Link2, not Link1, and the Link1 coordinate system is the same as Base_Link, as described above the dividing line.

Step 1: Where is the point ? As shown below

 It is estimated that everyone will be confused when it comes to this point. Why is this point here? Think about it this way - later we will establish a coordinate system on this point, while satisfying the coincidence of the Z axis and the rotation axis axis2, while the X axis is perpendicular and intersects with the axis1 axis . You read that right, the X axis intersects vertically with the previous one Link is also the rotation axis axis1 of Link1, so should this point be here? -------- Is there a neat way to determine this point? Yes! First, establish a reference plane like the red line on the left in the above figure to divide the robot arm into two halves, then the point link2_point is the intersection of axis2 and the red line reference plane.

Don't know where the dot is? Does the Z axis that wants to establish a coordinate system at this point first have to coincide with the rotation axis? Then this point must be on this "axis of rotation" line, right? link2_point is on axis2 , where exactly is it on the rotation axis? Then I ask you where can the X axis be vertical and intersect with the previous rotation axis?

I know you don't understand this point, right? I don't want to either, why don't I stick to it and look back later, I will try to make it clearer! Look down and you will definitely understand!

Step two, where is the line?

Note that the line here is for the next joint , and has nothing to do with this joint, as shown in the figure below:

 Did you see it? As for the axis of this small cylinder, I named it axis3. You may be stupid. This joint is called Link2. You call this axis of rotation axis3? Yes, as I said, this is for the next joint, Link3 .

Step 3: Where is the coordinate system?

Select Link2_point, and then click Insert--Reference Geometry--Coordinate System at the top to establish a coordinate system. At this time, the direction of the coordinate system has a saying, as shown in the figure below:

 As I said, there are two points to note about the coordinate system:

First, the Z axis should coincide with the rotation axis . You can see whether the Z axis of coordinate2 coincides with axis2 ? It is not clear that axis2 is turned forward. This is the axis2 prepared by Link1 for Link2.--- The Z axis should coincide with the rotation axis, and we will make it face to the right

Second: The X-axis is "perpendicular" and "intersects" with the rotation axis of the "Last Link" , that is, the X-axis is perpendicular and intersects with axis1 . Looking at the picture above, did you suddenly " lift the pot for empowerment" ? Finally understand why you need to build a red datum first and then determine the link2_point point? Note that the X-axis must not only be vertical, but also that the extension line intersects with the previous rotation axis


The example is here, everyone should be very clear about the establishment rules of the coordinate system, right? Be sure to remember this three-step strategy, the first point, the last coordinate of the back line, and the two points of direction I mentioned.

I will also post the coordinate systems of other joints for everyone to see! I'm afraid you don't know:

The coordinate system of Link3:

The blue part is Link3, and its coordinate system is coordinate3. Have you seen the Z axis? It coincides with its rotation axis axis3, and the X-axis intersects vertically with the previous rotation axis axis2----the extension line intersects vertically

You should understand everything here, right? ---- The coordinate point Link3_point of the coordinate system coordinate3 is the intersection point of axis3 and the red datum plane , ----- you will find that all coordinate systems are on the red datum plane at the end of the establishment

Link4 coordinate system:

Everyone must have no objection to the Z-axis of this Link4, right? This X axis is perpendicular and intersects with axis3

So far, all the rules for establishing the coordinate system have been explained to everyone. If you have any questions, you can ask them below, or if there are any problems with my establishment, you are welcome to point them out.

The DH parameter table is given as follows:


Export URDF model

In the first half, the establishment of the coordinate system is completed, and the URDF model can be exported later. You must establish a coordinate system like me, and then give each coordinate system an easily distinguishable name, otherwise, you will faint, such as:

Base_link, Link+123456, coordinate+0123456, axis+123456 like this, for the convenience of not making mistakes later.

Let me show you my own:

 Then click Export as URDF as follows:

You may find that you don't have this , don't worry, because you haven't installed this plug-in , you can search for the installation articles of this plug-in by yourself, there are many! I will not give an example here.

 Let me show you mine initially. This is what I built. You must have nothing. Don’t worry, look at the back :

 First, name the first Link in Link Name, the first one must be called base_link

Then the Global Origin Cordinate System is the coordinate system you establish for each joint Link. The first one I created is Cordinate0

Then Link Components means which part is the base_link, you click on the base in the model on the right to add it.

Number of child links is the number of joints connected to base_link , there must be only one! You click the ascending triangle in the box to add 1, then there will be an extra line behind the base_link in bold at the bottom.


Then click the line derived from base_link in the lower left corner, and a similar page will appear

The difference from the previous page is that it has three more joint Name, Reference Axis and joint Type.

First of all, the Link Name must be written as link1, which is an input, not a selection, so it should be more standardized.

Then the Joint Name must be entered as joint1

Reference Cordinate System must be coordinate1, the coordinate system of Link1 you created yourself

Reference Axis is which axis this joint rotates around, select the axis1 we established

There are several types of joint Type, this revolute is limited circular motion

Then Link Components directly select Link1 in the model on the right, you can click the model tree on the right, or select it directly in the model.

Click the upper triangle of the Number of child links box to continue adding the next joint.

I think everyone should be clear about the choice of each joint in the following. This Joint Type is the type of each joint. Because they all rotate around the axis, you can choose revolute. This has a limited rotation angle and can be adjusted later. For other types, you can search for its meaning. There are rotations with unlimited angles, translations, rotations and translations on a plane, etc., but the robotic arm is mainly of the revolute type.


After the settings are complete, click Preview and Export

 This interface will appear

You can click on each joint to see if it is set correctly

Notice:

You can see that I have set parameters for Limit here, because the joint type we chose is revolute, so the lower is the lower limit of the rotation angle, upper is the upper limit of the rotation angle, effort is the magnitude of the torque, and velocity is the rotation speed.

important point:

First: lower or upper is in radians. You don’t know how much each joint of your robotic arm rotates at the beginning, so you can fill in -3.14 for lower, and then fill in 3.14 for upper, which means 360-degree full rotation, no limit, how much is it? You need to use the visualization tools in RViz for a rough look, and I set it up after checking it here.

Second: This effort must fill in the value, must, must. If you write 0, it means that each torque of the mechanical arm has no limit to the size of the force, so it is infinite, which will cause jitter and severe jitter in the subsequent simulation process. Of course, this is one part of the problem, and there are others.

Third: The velocity also needs to fill in the number. I haven't found out what the impact will be if it is missing. can fill in 1

Be careful with the above three points, especially effort. Tears!


Then click Next, and the following interface will appear. There are two reasons that cause the robot arm to vibrate violently during the simulation and collapse to the ground. Due to space constraints, I will not elaborate on the methods. It can also be modified later !

 

 Click: Export URDF and Meshs, just save it, don't make a mistake.

By the way, the name must not be in Chinese, because there cannot be Chinese in the Ubuntu virtual machine + ROS simulation, and a warning will be reported, which does not conform to the naming convention. Whatever name you save as, that is the name of this robot, it is very annoying to modify .

 The saved files are as follows:


Well, the process from setting the coordinate system to exporting URDF and what needs to be paid attention to has been explained, which is very ingenious.

Guess you like

Origin blog.csdn.net/shdhckcjc/article/details/129331111