- urdf是配置几何物体解析的文件
官方教程:https://wiki.ros.org/urdf/XML/
在robot中,主要有如下部件:
- link:刚体
- joint:关节
- sensor:传感器,未使用
link
<inertial> (optional: defaults to a zero mass and zero inertia if not specified)The link’s mass, position of its center of mass, and its central inertia properties.<origin> (optional: defaults to identity if not specified)This pose (translation, rotation) describes the position and orientation of the link’s center of mass frame C relative to the link-frame L.xyz (optional: defaults to zero vector)Represents the position vector from Lo (the link-frame origin) to Co (the link’s center of mass) as x L̂x + y L̂y + z L̂z, where L̂x, L̂y, L̂z are link-frame L's orthogonal unit vectors. rpy (optional: defaults to identity if not specified)Represents the orientation of C's unit vectors Ĉx, Ĉy, Ĉz relative to link-frame L as a sequence of Euler rotations (r p y) in radians. Note: Ĉx, Ĉy, Ĉz do not need to be aligned with the link’s principal axes of inertia. <mass>The mass of the link is represented by the value attribute of this element <inertia>This link's moments of inertia ixx, iyy, izz and products of inertia ixy, ixz, iyz about Co (the link’s center of mass) for the unit vectors Ĉx, Ĉy, Ĉz fixed in the center-of-mass frame C. Note: the orientation of Ĉx, Ĉy, Ĉz relative to L̂x, L̂y, L̂z is specified by the rpy values in the <origin> tag. The attributes ixx, ixy, ixz, iyy, iyz, izz for some primitive shapes are here. URDF assumes a negative product of inertia convention (for more info, see these MathWorks docs for working with CAD tools). The simplest way to avoid compatibility issues associated with the negative sign convention for product of inertia is to align Ĉx, Ĉy, Ĉz with principal inertia directions so that all the products of inertia are zero. <visual> (optional)The visual properties of the link. This element specifies the shape of the object (box, cylinder, etc.) for visualization purposes. Note: multiple instances of <visual> tags can exist for the same link. The union of the geometry they define forms the visual representation of the link.name (optional)Specifies a name for a part of a link's geometry. This is useful to be able to refer to specific bits of the geometry of a link. <origin> (optional: defaults to identity if not specified)The reference frame of the visual element with respect to the reference frame of the link.xyz (optional: defaults to zero vector)Represents the x, y, z offset. rpy (optional: defaults to identity if not specified)Represents the fixed axis roll, pitch and yaw angles in radians. <geometry> (required)The shape of the visual object. This can be one of the following:<box>size attribute contains the three side lengths of the box. The origin of the box is in its center. <cylinder>Specify the radius and length. The origin of the cylinder is in its center. cylinder_coordinates.png <sphere>Specify the radius. The origin of the sphere is in its center. <mesh>A trimesh element specified by a filename, and an optional scale that scales the mesh's axis-aligned-bounding-box. Any geometry format is acceptable but specific application compatibility is dependent on implementation. The recommended format for best texture and color support is Collada .dae files. The mesh file is not transferred between machines referencing the same model. It must be a local file. Prefix the filename with package://<packagename>/<path> to make the path to the mesh file relative to the package <packagename>. <material> (optional)The material of the visual element. It is allowed to specify a material element outside of the 'link' object, in the top level 'robot' element. From within a link element you can then reference the material by name.name name of the material<color> (optional)rgba The color of a material specified by set of four numbers representing red/green/blue/alpha, each in the range of [0,1]. <texture> (optional)The texture of a material is specified by a filename <collision> (optional)The collision properties of a link. Note that this can be different from the visual properties of a link, for example, simpler collision models are often used to reduce computation time. Note: multiple instances of <collision> tags can exist for the same link. The union of the geometry they define forms the collision representation of the link.name (optional)Specifies a name for a part of a link's geometry. This is useful to be able to refer to specific bits of the geometry of a link. <origin> (optional: defaults to identity if not specified)The reference frame of the collision element, relative to the reference frame of the link.xyz (optional: defaults to zero vector)Represents the x, y, z offset. rpy (optional: defaults to identity if not specified)Represents the fixed axis roll, pitch and yaw angles in radians. <geometry>See the geometry description in the above visual element.
joint
The joint element has following elements:
<origin> (optional: defaults to identity if not specified)This is the transform from the parent link to the child link. The joint is located at the origin of the child link, as shown in the figure above.xyz (optional: defaults to zero vector)Represents the x, y, z offset. All positions are specified in metres. rpy (optional: defaults to zero vector)Represents the rotation around fixed axis: first roll around x, then pitch around y and finally yaw around z. All angles are specified in radians. <parent> (required)Parent link name with mandatory attribute:linkThe name of the link that is the parent of this link in the robot tree structure. <child> (required)Child link name with mandatory attribute:linkThe name of the link that is the child link. <axis> (optional: defaults to (1,0,0))The joint axis specified in the joint frame. This is the axis of rotation for revolute joints, the axis of translation for prismatic joints, and the surface normal for planar joints. The axis is specified in the joint frame of reference. Fixed and floating joints do not use the axis field.xyz (required)Represents the (x, y, z) components of a vector. The vector should be normalized. <calibration> (optional)The reference positions of the joint, used to calibrate the absolute position of the joint.rising (optional)When the joint moves in a positive direction, this reference position will trigger a rising edge. falling (optional)When the joint moves in a positive direction, this reference position will trigger a falling edge. <dynamics> (optional)An element specifying physical properties of the joint. These values are used to specify modeling properties of the joint, particularly useful for simulation.damping (optional, defaults to 0)The physical damping value of the joint (in newton-seconds per metre [N∙s/m] for prismatic joints, in newton-metre-seconds per radian [N∙m∙s/rad] for revolute joints). friction (optional, defaults to 0)The physical static friction value of the joint (in newtons [N] for prismatic joints, in newton-metres [N∙m] for revolute joints). <limit> (required only for revolute and prismatic joint)An element can contain the following attributes:lower (optional, defaults to 0)An attribute specifying the lower joint limit (in radians for revolute joints, in metres for prismatic joints). Omit if joint is continuous. upper (optional, defaults to 0)An attribute specifying the upper joint limit (in radians for revolute joints, in metres for prismatic joints). Omit if joint is continuous. effort (required)An attribute for enforcing the maximum joint effort (|applied effort| < |effort|). See safety limits. velocity (required)An attribute for enforcing the maximum joint velocity (in radians per second [rad/s] for revolute joints, in metres per second [m/s] for prismatic joints). See safety limits. <mimic> (optional) (New with ROS Groovy. See issue)This tag is used to specify that the defined joint mimics another existing joint. The value of this joint can be computed as value = multiplier * other_joint_value + offset.Expected and optional attributes:joint (required)This specifies the name of the joint to mimic. multiplier (optional)Specifies the multiplicative factor in the formula above. offset (optional)Specifies the offset to add in the formula above. Defaults to 0 (radians for revolute joints, meters for prismatic joints) <safety_controller> (optional)An element can contain the following attributes:soft_lower_limit (optional, defaults to 0)An attribute specifying the lower joint boundary where the safety controller starts limiting the position of the joint. This limit needs to be larger than the lower joint limit (see above). See See safety limits for more details. soft_upper_limit (optional, defaults to 0)An attribute specifying the upper joint boundary where the safety controller starts limiting the position of the joint. This limit needs to be smaller than the upper joint limit (see above). See See safety limits for more details. k_position (optional, defaults to 0)An attribute specifying the relation between position and velocity limits. See See safety limits for more details. k_velocity (required)An attribute specifying the relation between effort and velocity limits. See See safety limits for more details.