ROS learning --URDF file parsing

Outline

[ URDF official documentation ]

  1. sensor / proposals
    sensors described, such as radar and cameras
  2. link
    kinematics and dynamic parameters described link
  3. transmission
    described conversion between the joint and the drive
  4. joint
    the kinematic and dynamic parameters joints
  5. gazebo
    described simulation content, and friction damper
  6. sensor
    sensors described, such as radar and cameras
  7. model_state
    describe the current state of the model
  8. model
    the kinematic model parameters and dynamic parameters

Specific analysis module

Note that
not equal due tag label move_group URDF callable file, i.e., the tag is invalid move_group portion, a part of this label so ignored or cause the failure to define a data import data.

1、link

Here Insert Picture Description

Attributes

  • name (required)
    • link name

Sub-elements

  • <Inertial> (optional)
    • Inertial properties link
    • <origin> (可选,defaults to identity if not specified)
      • Defined relative to a reference coordinate system link inertial reference coordinate system, the coordinates of the center of gravity is necessary to define the link, with axes parallel to the principal axis of inertia can not.
      • XYZ (optional, defaults to zero vectors)
        • Show x , Y , with x,y,z offset direction, in meters.
      • rpy(可选: defaults to identity if not specified)
        • Indicates the direction of the rotational axis RPY radians.
    • <mass>
      • Link quality attributes
    • <inertia>
      • 3 × 3 rotation inertia matrix, composed of six independent amount: ixx, ixy, ixz, iyy, iyz, izz.
  • <Visual> (optional)
    • Visual attributes of the link. Shape (rectangular, cylindrical, etc.) for specifying display link, the same link may exist a plurality of visual elements, a plurality of rod shaped elements are formed two. In general more complex models can be invoked by the soildwork stl generated drawing simple shapes such as adding the end effector and the like can be written directly. And can be adjusted according to the geometry of the position of the theoretical model and the actual model gap here.
    • <namel> (optional)
      • Name link geometry.
    • <origin> (可选,defaults to identity if not specified)
      • With respect to the coordinate system of the geometry of the link coordinate system.
      • xyz (optional: defaults to zero vector)
        • Show x , Y , with x,y,z offset direction, in meters.
      • rpy (optional: defaults to identity if not specified)
        • Indicates the direction of the rotational axis RPY radians.
    • <Geometry> (Required)
      • Visualization shape of the object, which may be one of the following:
      • <box>
        • Rectangular element contains length, width and height. Origin in the center.
      • <Cylinder>
        - cylinder element comprises a radius length. Center of origin.
        Here Insert Picture Description
      • <sphere>
        • Sphere element contains radius. Origin in the center.
      • <mesh>
        • Grid is determined by the file, while providing scale, used to define its borders. Recommended Collada .dae files, and also supports .stl file, but must be a local file.
    • <Material's> (optional)
      • Visualization material assembly. You can be defined in the outer link label, but the label must be in the robot, when the label is defined outside the link, the link demand reference name.
      • <Color> (optional)
        • Color, the red / green / blue / alpha composition, in the size range [0,1].
      • <Texture> (optional)
        • Material properties, defined by the file.
  • <Collision> (optional)
    • Collision attribute link. Different visual attributes and link impact properties, simple collision model is often used to simplify the calculations. A plurality of link may have the same attributes tag collision, the collision properties of the link set represented by its geometrical configuration defined.
    • name (optional)
      • Specifies the name of the link geometry
    • <origin> (可选,defaults to identity if not specified)
      • Reference coordinate system crash assembly relative to the reference coordinate system of the coordinate system link.
      • xyz (optional, defaults to zero vector)
        • Show x , Y , with x,y,z offset direction, in meters.
      • rpy (可选, defaults to identity if not specified)
        • Indicates the direction of the rotational axis RPY radians.
    • <geometry>
      • The above description of the same element geometry

example

  <link name="torso">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://robot_description/meshes/base_link.DAE"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="-0.065 0 0.0"/>
      <geometry>
        <mesh filename="package://robot_description/meshes/base_link_simple.DAE"/>
      </geometry>
    </collision>
    <collision_checking>
      <origin rpy="0 0 0" xyz="-0.065 0 0.0"/>
      <geometry>
        <cylinder length="0.7" radius="0.27"/>
      </geometry>
    </collision_checking>
    <inertial>
      ...
    </inertial>
  </link>  

2、joint

Here Insert Picture Description

Attributes

  • name (required)
    specifies the name of the joint (only)
  • type (required)
    specifies the type of joint, has the following options:
    • revolute: joint rotatable about a hinge axis of rotation, have maximum and minimum limits.
    • continuous: continuous hinge joint, rotatable about a rotation axis, there is no maximum and minimum limits.
    • prismatic: sliding joints, slidable along a shaft, with a maximum and minimum limits.
    • fixed: This is not an actual joint, because it can not exercise, all degrees of freedom are locked. This type of joint does not need to specify the axis, dynamic characteristics, limiting the minimum and maximum scales.
    • floating: This is a joint having six degrees of freedom.
    • planar: This joint motion in a plane, a vertical movement of the shaft.

Sub-elements

  • <origin> (可选,defaults to identity if not specified)
    从parent link到child link的变换,joint位于child link的原点,修改该参数可以调整连杆的位置,可用在调整实际模型与理论模型误差,但不建议大幅度修改,因为该参数影响连杆stl的位置,容易影响碰撞检测效果,具体如图所示。

    • xyz (可选: 默认为零向量)
      代表 x , Y , with x,y,z 轴方向上的偏移,单位米。
    • rpy (可选: 默认为零向量)
      代表绕着固定轴旋转的角度:roll绕着x轴,pitch绕着y轴,yaw绕着z轴,用弧度表示。
  • <parent> (必需)

    • parent link的名字是一个强制的属性。
    • link
      • parent link的名字,是这个link在机器人结构树中的名字。
  • <child> (必需)

    • child link的名字是一个强制的属性。
    • link
      • child link的名字,是这个link在机器人结构树中的名字。
  • <axis>(可选: 默认为(1,0,0))

    • joint的axis轴在joint的坐标系中。这是旋转轴(revolute joint),prismatic joint移动的轴,是planar joint的标准平面。这个轴在joint坐标系中被指定。修改该参数可以调整关节的旋转所绕着的轴,常用于调整旋转方向,若模型旋向与实际相反,只需乘-1即可。固定(fixed)和浮动(floating)类型的joint不需要用到这个元素。
    • xyz(必需)
      • 代表轴向量的 x , Y , with x,y,z 分量,为标准化的向量。
  • <calibration> (可选)

    • joint的参考点,用来矫正joint的绝对位置。
    • rising (可选)
      • 当joint正向运动时,参考点会触发一个上升沿。
    • falling (可选)
      • 当joint正向运动时,参考点会触发一个下降沿。
  • <dynamics>(可选)

    • 该元素用来指定joint的物理性能。它的值被用来描述joint的建模性能,尤其是在仿真的时候。
    • damping(可选,默认为0)
      • joint的阻尼值。(移动关节为 N s m \frac{N\cdot s}{m} ,旋转关节为 N m s r a d \frac{N\cdot m\cdot s}{rad} )
    • friction(可选,默认为0)
      • joint的摩擦力值(移动关节为 N N ,旋转关节为 N m N \cdot m )
  • <limit> (当关节为旋转或移动关节时为必需)

    • 该元素为关节运动学约束。
    • lower (可选, 默认为0)
      • 指定joint运动范围下界的属性(revolute joint的单位为弧度,prismatic joint的单位为米),连续型的joint忽略该属性。
    • upper (可选, 默认为0)
      • 指定joint运动范围上界的属性(revolute joint的单位为弧度,prismatic joint的单位为米),连续型的joint忽略该属性。
    • effort (必需)
      • 该属性指定了joint运行时的最大的力。详见安全限制.
    • velocity (required)
      • 该属性指定了joint运行时的最大的速度。详见安全限制.
  • <mimic>(可选)

    • 这个标签用于指定已定义的joint来模仿已存在的joint。这个joint的值可以用以下公式计算,此元素不在move_group中启用,使用会导致报错。
      value = multiplier * other_joint_value + offset.
    • joint(可选)
      • 需要模仿的joint的名字。
    • multiplier(可选)
      • 指定上述公式中的乘数因子。
    • offset(可选)
      • 指定上述公式中的偏移项。默认值为0(revolute joint的单位为弧度,prismatic joint的单位为米)。
  • <safety_controller> (可选)

    • 该元素为安全控制限制,此元素下数据会读入到move_group中,但实际上时无效,move_group会跳过此处限制直接读取limit下的参数内容,同时设置该元素有几率会导致规划失败。
      • soft_lower_limit (可选, 默认为0)
        • 该属性指定了joint安全控制边界的下界,是joint安全控制的起始限制点。这个值需要大于上述的limit中的lower值。更多细节详见安全限制
      • soft_upper_limit (可选, 默认为0)
        • 该属性指定了joint安全控制边界的上界,是joint安全控制的起始限制点。这个值需要小于上述的limit中的upper值。更多细节详见安全限制
      • k_position (optional, defaults to 0)
        • This attribute is used to illustrate the relationship between the position and velocity. For more details see security restrictions .
      • k_velocity (required)
        • This attribute is used to describe the relationship between force and velocity. For more details see security restrictions .

example

 <joint name="my_joint" type="floating">
    <origin xyz="0 0 1" rpy="0 0 3.1416"/>
    <parent link="link1"/>
    <child link="link2"/>
    
    <calibration rising="0.0"/>
    <dynamics damping="0.0" friction="0.0"/>
    <limit effort="30" velocity="1.0" lower="-2.2" upper="0.7" />
    <safety_controller k_velocity="10" k_position="15" soft_lower_limit="-2.0" soft_upper_limit="0.5" />
 </joint>

Guess you like

Origin blog.csdn.net/Kalenee/article/details/86485565