SDFormat extensions to URDF (the ‘gazebo‘ tag)tutorial(源自SDF文件官网,非gazebo官网)

2024-01-12 13:12

本文主要是介绍SDFormat extensions to URDF (the ‘gazebo‘ tag)tutorial(源自SDF文件官网,非gazebo官网),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这个是sdf文件 官网的文件,不是gazebo官网的文件,2者不是一个网站,请注意区分

 SDFormat extensions to URDF (the 'gazebo' tag) — Documentation

Toggle navigation 

SDFormat

  • Specification
  • API
  • Documentation
  • Download

Back

Edit                  Version: 1.6           


Table of Contents
  • SDFormat extensions to URDF (the <gazebo> tag)
    • <gazebo> Elements For <robot>
    • <gazebo> Elements For Links
    • Special meaning for <visual>, <collision>, and <material>
      • <gazebo> Elements For Joints
      • Fixed joint lumping

SDFormat extensions to URDF (the <gazebo> tag)

When URDF files are loaded by Gazebo (both Gazebo-classic and the new Gazebo), the URDF content is first converted to SDFormat before being processed by Gazebo. Users who want to modify the resulting SDFormat output to include SDFormat specific elements may do so using the <gazebo> tag in the original URDF file. This is known as the Gazebo extension to the URDF specification (see urdf/XML/Gazebo - ROS Wiki)

The URDF to SDFormat conversion usually happens automatically without users observing the resulting SDFormat file. To diagnose any issues that might come up during the conversion, the tool

gz sdf -p <path to urdf file>

can be used to convert the URDF file to SDFormat that can be inspected by the user.

The following is the documentation of the various tags available under <gazebo> and their corresponding effect on the SDFormat output. While some of the content included here is also available in the "Using a URDF in Gazebo" tutorial of Gazebo-classic, this document should provide a more complete discussion of the extension, especially regarding fixed joint lumping.

<gazebo> Elements For <robot>

<gazebo> tag without a reference attribute applies to the SDFormat <model> that gets generated from the <robot> URDF tag. All elements in the <gazebo> tag are inserted into the SDF <model> tag for the generated SDF.

Example:

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='no_ref_example'><link name='world'/><gazebo><static>true</static><plugin name='testPlugin' filename='testFileName'/></gazebo>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='no_ref_example'><static>true</static><plugin name='testPlugin' filename='testFileName'/></model>
</sdf>

When using the <gazebo> extension for links, the name of the link has to be specified in the reference attribute. There are a number of special tags that modify the values of elements or attributes in the generated SDFormat file. Any tag that is not listed in the table below will be directly inserted into the corresponding <link> element in the SDFormat output. This direct insertion is sometimes referred to as blob insertion.

Table of elements with special meaning:

NameTypeDescriptionCorresponding SDFormat element
turnGravityOffboolA value of "true" turns gravity off. Alternatively, gravity (with opposite boolean value) can be used via blob insertiongravity
dampingFactordoubleExponential velocity decay of the link velocity - takes the value and multiplies the previous link velocity by (1-dampingFactor).velocity_decay/linear and velocity_decay/angular
maxVeldoubleMaximum contact correction velocity truncation term. (See the Gazebo-classic tutorial on Constraints Parameters for more detail)collision/surface/contact/ode/max_vel
minDepthdoubleMinimum allowable depth before contact correction impulse is applied. (See the Gazebo-classic tutorial on Constraints Parameters for more detail)collision/surface/contact/ode/min_depth
mu1doubleFriction coefficients μ for the principal contact directions along the contact surface as defined by the Open Dynamics Engine (ODE) (see parameter descriptions in ODE's user guide and the Gazebo-classic tutorial on Friction Parameters for more detail)collision/surface/friction/ode/mu
mu2collision/surface/friction/ode/mu2
fdir1vector3-tuple specifying direction of mu1 in the collision local reference frame. (See the Gazebo-classic tutorial on Friction Parameters for more detail)collision/surface/friction/ode/fdir1
kpdoubleContact stiffness k_p and damping k_d for rigid body contacts as defined by ODE (ODE uses erp and cfm but there is a mapping between erp/cfm and stiffness/damping. Also see See the Gazebo-classic tutorial on Contact Parameters for more detail)collision/surface/contact/ode/kp
kdcollision/surface/contact/ode/kd
selfCollideboolIf true, the link can collide with other links in the model.self_collide
maxContactsintMaximum number of contacts allowed between two entities. This value overrides the max_contacts element defined in physics.(See the Gazebo-classic tutorial on Contact Parameters for more detail)collision/max_contacts
laserRetrodoubleIntensity value returned by laser sensor.collision/laser_retro
visualelementThe content of the element will be inserted into each visual of the SDFormat linkvisual
materialelementThe content of the element will be inserted into each material of the SDFormat linkvisual/material
collisionelementThe content of the element will be inserted into each collision of the SDFormat linkcollision

Note: The XPath used in the "Corresponding SDFormat element" column is relative to the link element.

Example:

The following shows how to set the first coefficient of friction for all <collision> elements in a link

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='friction_example'><link name='base_link'><inertial><mass value='0.12' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><collision><geometry><sphere radius="2"/></geometry></collision><collision><geometry><cylinder radius="1" length="2"/></geometry></collision></link><gazebo reference='base_link'><mu1>0.25</mu1></gazebo>
</robot>

This creates the element //surface/friction/ode/mu in the collision element of the referenced link.

<!--SDFormat-->
<sdf version='1.9'><model name='friction_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.12</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><collision name='base_link_collision'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry><surface><contact><ode/></contact><friction><ode><mu>0.25</mu></ode></friction></surface></collision><collision name='base_link_collision_1'><pose>0 0 0 0 0 0</pose><geometry><cylinder><length>2</length><radius>1</radius></cylinder></geometry><surface><contact><ode/></contact><friction><ode><mu>0.25</mu></ode></friction></surface></collision></link></model>
</sdf>

Special meaning for <visual><collision>, and <material>

The <visual> and <collision> are meant to update existing visuals and collisions in the URDF as they get converted to SDFormat. At the time of writing, these tags do not insert new visuals or collision elements into the referenced link. Note also that these tags affect all visuals and collisions, respectively, found in the referenced link.

Example:

Given the following URDF file with two visuals, the <gazebo> extension applies the element <transparency> to each visual in base_link.

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='visual_example'><link name='base_link'><inertial><mass value='0.12' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><geometry><sphere radius="2"/></geometry></visual><visual><origin xyz="2 0 0" rpy="0 0 0"/><geometry><cylinder length="1" radius="2"/></geometry></visual></link><gazebo reference='base_link'><visual><transparency>0.25</transparency></visual></gazebo>
</robot>

Converts to the following SDFormat

<!--SDFormat-->
<sdf version='1.9'><model name='visual_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.12</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><visual name='base_link_visual'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry><transparency>0.25</transparency></visual><visual name='base_link_visual_1'><pose>2 0 0 0 0 0</pose><geometry><cylinder><length>1</length><radius>2</radius></cylinder></geometry><transparency>0.25</transparency></visual></link></model>
</sdf>

The <material> tag, when used directly under the <gazebo> tag, i.e //gazebo/material, accepts a string value of the name of a material defined in a Gazebo-classic's material script. Examples include colors like Gazebo/SkyBlue as well as textures such as Gazebo/WoodFloor. The <material> tag affects all visuals found in the referenced link, similar to the behavior of <visual> and <collision>

Example:

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='material_example'><link name='base_link'><inertial><mass value='0.1' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><geometry><sphere radius="2"/></geometry></visual></link><gazebo reference='base_link'><material>Gazebo/Orange</material></gazebo>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='material_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.10000000000000001</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><visual name='base_link_visual'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry><material><script><name>Gazebo/Orange</name><uri>file://media/materials/scripts/gazebo.material</uri></script></material></visual></link></model>
</sdf>

This tag is only relevant when using Gazebo-classic as the new version of Gazebo does not use material scripts. However, it is still possible to change the appearance of visuals that is compatible with the new Gazebo and this is by using the //gazebo/visual/material tag. Note the difference from the previous tag as the <material> tag is not directly under <gazebo>, but under <visual>. This <material> tag contains child elements as defined in the material specification.

Example:

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='material_example'><link name='base_link'><inertial><mass value='0.12' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><geometry><sphere radius="2"/></geometry></visual></link><gazebo reference='base_link'><visual><material><diffuse>0 0 1 1 </diffuse></material></visual></gazebo>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='material_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.12</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><visual name='base_link_visual'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry><material><diffuse>0 0 1 1</diffuse></material></visual></link></model>
</sdf>

where the <diffuse> tag has been added to the visual of base_link.

Warning: At the time of writing, there is a bug in the URDF to SDFormat converter that behaves incorrectly when <visual> and <collision> tags in the URDF file have names.

<gazebo> Elements For Joints

When using the <gazebo> extension for joints, the name of the joint has to be specified in the reference attribute. There are a number of special tags that modify the values of elements or attributes in the generated SDFormat file. Any tag that is not listed in the table below will be directly inserted into the corresponding <joint> element in the SDFormat output.

Table of elements with special meaning:

NameTypeDescriptionCorresponding SDFormat element
stopCfmdoubleJoint stop constraint force mixing (cfm) and error reduction parameter (erp) used by ODEphysics/ode/limit/cfm
stopErpphysics/ode/limit/erp
provideFeedbackboolAllows joints to publish their wrench data (force-torque) via a Gazebo pluginphysics/provide_feedback and physics/ode/provide_feedback
implicitSpringDamperboolIf this flag is set to true, ODE will use ERP and CFM to simulate damping. This is a more stable numerical method for damping than the default damping tag. The cfmDamping element is deprecated and should be changed to implicitSpringDamper.physics/ode/implicit_spring_damper
springStiffnessdoubleSpring stiffness in N/m.axis/dynamics/spring_stiffness
springReferencedoubleEquilibrium position for the spring.axis/dynamics/spring_reference
fudgeFactordoubleScale the excess for in a joint motor at joint limits. Should be between zero and one.physics/ode/fudge_factor
preserveFixedJointboolBy default, fixed joints in the URDF are "lumped", meaning that the contents of the child link are merged with the parent link with appropriate pose offsets and the joint is discarded. Setting this to true preserves the fixed joint and effectively disables fixed joint lumping.
disableFixedJointLumpingboolBy default, fixed joints in the URDF are "lumped", meaning that the contents of the child link are merged with the parent link with appropriate pose offsets and the joint is discarded. Setting this to true disables fixed joint lumping. This has a similar effect as preserveFixedJoint but, for backward compatibility reasons, replaces the fixed joint with a revolute joint with position limits set to 0. Users are encouraged to use preserveFixedJoint instead.

Note: The XPath used in the "Corresponding SDFormat element" column is relative to the joint element.

Example: The spring reference and stiffness of a joint can be set using <springReference> and <springStiffness> respectively.

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='joint_example'><link name='base_link'><inertial><mass value='0.12' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial></link><joint name='j1' type='continuous'><parent link='base_link'/><child link='end_effector'/><origin xyz='0 0 1' rpy='0 0 0'/></joint><link name='end_effector'><inertial><mass value='0.12' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial></link><gazebo reference='j1'><springReference>0.5</springReference><springStiffness>0.25</springStiffness></gazebo>
</robot>

This creates the elements //axis/dynamics/spring_reference and //axis/dynamics//spring_stiffness in the referenced joint of the SDFormat output.

<!--SDFormat-->
<sdf version='1.9'><model name='joint_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.12</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial></link><joint name='j1' type='revolute'><pose relative_to='base_link'>0 0 1 0 0 0</pose><parent>base_link</parent><child>end_effector</child><axis><xyz>1 0 0</xyz><limit><lower>-10000000000000000</lower><upper>10000000000000000</upper></limit><dynamics><spring_reference>0.5</spring_reference><spring_stiffness>0.25</spring_stiffness></dynamics></axis><physics><ode><limit><cfm>0</cfm><erp>0.20000000000000001</erp></limit></ode></physics></joint><link name='end_effector'><pose relative_to='j1'>0 0 0 0 0 0</pose><inertial><pose>0 0 0 0 0 0</pose><mass>0.12</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial></link></model>
</sdf>

Fixed joint lumping

Fixed joint lumping (aka joint reduction), in the URDF to SDFormat conversion is the process of taking the child link of a fixed joint and merging all of its contents into the parent link. It is an optimization that benefits maximal coordinate physics engines by reducing the number of constraints needed to simulate the model. The process preserves the total mass of the two links and computes the center of mass and moment of inertia of the resultant link. All visual and collision elements present in the child link are moved to the parent link with appropriate pose offsets. The fixed joint itself is discarded and does not appear in the SDFormat output. As of libsdformat 9.9.0 frame elements that represent the discarded joint and child link are generated to preserve their pose information.

Fixed joint lumping is enabled by default, but can be disabled by setting preserveFixedJoint or disableFixedJointLumping to true. The two parameters behave similarly, but the preserveFixedJoint=true configuration results in a joint with a fixed type whereas the disableFixedJointLumping=true configuration results in a revolute joint with position limits set to 0. Note that when both preserveFixedJoint=true and disableFixedJointLumping=true are set on a joint, the preserveFixedJoint setting will take precedence and the resulting joint will have a fixed type. Fixed joint lumping can also be disabled for all joints if ParserConfig::URDFPreserveFixedJoint is true.

Warning: Disabling joint lumping should only be done when both parent and child links have positive mass and corresponding <inertial> elements.

Example: The following URDF demonstrates fixed joint lumping where the resulting SDFormat output only has one link

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='fixed_joint_lumping_example'><link name='base_link'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><collision><origin xyz="0 0 0" rpy="0 0 0"/><geometry><sphere radius="2"/></geometry></collision></link><joint name='j1' type='fixed'><parent link='base_link'/><child link='end_effector'/><origin xyz='0 0 1' rpy='0 0 0'/></joint><link name='end_effector'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><origin xyz="2 0 0" rpy="0 0 0"/><geometry><cylinder length="1" radius="2"/></geometry></visual></link>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='fixed_joint_lumping_example'><link name='base_link'><inertial><pose>0 0 0.5 0 0 0</pose><mass>0.5</mass><inertia><ixx>0.14499999999999999</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.14499999999999999</iyy><iyz>0</iyz><izz>0.02</izz></inertia></inertial><collision name='base_link_collision'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry></collision><visual name='base_link_fixed_joint_lump__end_effector_visual'><pose>2 0 1 0 0 0</pose><geometry><cylinder><length>1</length><radius>2</radius></cylinder></geometry></visual></link><frame name='j1' attached_to='base_link'><pose>0 0 1 0 -0 0</pose></frame><frame name='end_effector' attached_to='j1'/></model>
</sdf>

Note that the mass of base_link is the sum of the masses of the original base_link and end_effector links. The visual element of end_effector has been merged into base_link with a pose value that takes into account the pose of the original end_effector link and joint j1 as well as the pose of the original visual.

Example: The same example above is repeated, but fixed joints preserved (preserveFixedJoint=true).

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='preserve_fixed_joint_lumping_example'><link name='base_link'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><collision><origin xyz="0 0 0" rpy="0 0 0"/><geometry><sphere radius="2"/></geometry></collision></link><joint name='j1' type='fixed'><parent link='base_link'/><child link='end_effector'/><origin xyz='0 0 1' rpy='0 0 0'/></joint><link name='end_effector'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><origin xyz="2 0 0" rpy="0 0 0"/><geometry><cylinder length="1" radius="2"/></geometry></visual></link><gazebo reference='j1'><preserveFixedJoint>true</preserveFixedJoint></gazebo>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='preserve_fixed_joint_lumping_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.25</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><collision name='base_link_collision'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry></collision></link><joint name='j1' type='fixed'><pose relative_to='base_link'>0 0 1 0 0 0</pose><parent>base_link</parent><child>end_effector</child><axis><dynamics><spring_reference>0</spring_reference><spring_stiffness>0</spring_stiffness></dynamics><xyz>0 0 1</xyz><limit><lower>-10000000000000000</lower><upper>10000000000000000</upper></limit></axis><physics><ode><limit><cfm>0</cfm><erp>0.20000000000000001</erp></limit></ode></physics></joint><link name='end_effector'><pose relative_to='j1'>0 0 0 0 0 0</pose><inertial><pose>0 0 0 0 0 0</pose><mass>0.25</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><visual name='end_effector_visual'><pose>2 0 0 0 0 0</pose><geometry><cylinder><length>1</length><radius>2</radius></cylinder></geometry></visual></link></model>
</sdf>

Here, the link end_effector is still present in the SDFormat output with mass and inertia equal to the URDF end_effector link. The visual of end_effector is also still present in the end_effector link of the SDFormat output. The joint j1 is also still present and its type is fixed.

Example: The same example above is repeated, but with fixed joint lumping disabled (disableFixedJointLumping=true).

<?xml version='1.0' encoding='UTF-8'?>
<!--URDF-->
<robot name='disable_fixed_joint_lumping_example'><link name='base_link'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><collision><origin xyz="0 0 0" rpy="0 0 0"/><geometry><sphere radius="2"/></geometry></collision></link><joint name='j1' type='fixed'><parent link='base_link'/><child link='end_effector'/><origin xyz='0 0 1' rpy='0 0 0'/></joint><link name='end_effector'><inertial><mass value='0.25' /><inertia ixx='0.01' ixy='0' ixz='0' iyy='0.01' iyz='0' izz='0.01' /></inertial><visual><origin xyz="2 0 0" rpy="0 0 0"/><geometry><cylinder length="1" radius="2"/></geometry></visual></link><gazebo reference='j1'><disableFixedJointLumping>true</disableFixedJointLumping></gazebo>
</robot>

results in:

<!--SDFormat-->
<sdf version='1.9'><model name='disable_fixed_joint_lumping_example'><link name='base_link'><inertial><pose>0 0 0 0 0 0</pose><mass>0.25</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><collision name='base_link_collision'><pose>0 0 0 0 0 0</pose><geometry><sphere><radius>2</radius></sphere></geometry></collision></link><joint name='j1' type='revolute'><pose relative_to='base_link'>0 0 1 0 0 0</pose><parent>base_link</parent><child>end_effector</child><axis><limit><lower>0</lower><upper>0</upper></limit><dynamics><damping>0</damping><friction>0</friction><spring_reference>0</spring_reference><spring_stiffness>0</spring_stiffness></dynamics><xyz>0 0 1</xyz></axis><physics><ode><limit><cfm>0</cfm><erp>0.20000000000000001</erp></limit></ode></physics></joint><link name='end_effector'><pose relative_to='j1'>0 0 0 0 0 0</pose><inertial><pose>0 0 0 0 0 0</pose><mass>0.25</mass><inertia><ixx>0.01</ixx><ixy>0</ixy><ixz>0</ixz><iyy>0.01</iyy><iyz>0</iyz><izz>0.01</izz></inertia></inertial><visual name='end_effector_visual'><pose>2 0 0 0 0 0</pose><geometry><cylinder><length>1</length><radius>2</radius></cylinder></geometry></visual></link></model>
</sdf>

The output is the same as preserveFixedJoint=true example, execept that joint j1 has a revolute type.

©2020 Open Source Robotics Foundation

SDFormat is open-source licensed under 

Apache 2.0

这篇关于SDFormat extensions to URDF (the ‘gazebo‘ tag)tutorial(源自SDF文件官网,非gazebo官网)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/597974

相关文章

Android set Tag, findViewWithTag使用

设置了tag为“principal”的view ImageView principal = (ImageView) findViewById(R.id.imagen_home_0);principal.setTag("principal"); 在其它地方获取,获取已经设置了tag为“principal”的view LayoutInflater inflater = LayoutInflate

gazebo 已加载模型但无法显示

目录 写在前面的话问题一:robot_state_publisher 发布机器人信息失败报错一 Error: Error document empty.报错二 .xcaro 文件中有多行注释成功启动 问题二:通过 ros2 启动 gazebo 失败成功启动 问题三:gazebo 崩溃和无法显示模型问题四: 缺少 robot_description 等话题正确的输出 写在前面的话

Untiy TTF转换为SDF

Untiy TTF转换为SDF 原因 下载的字体是TTF格式,但是TMP使用的是SDF格式,不支持TTF,需要转换网络没有检索到TTF转SDF的教程,可能是太简单了,自己记录一下吧 Unity内转换即可 在Asset中找到自己的TTF右键点击TTF,找到TMP,选择Font Asset 即可将自己下载的TTF字体转换为SDF格式 补充-修改默认的SDF 就是每次都自己拖动SDF效率低

urdf ( xacro ) 的 collision碰撞参数设置

目录 写在前面的话整体流程1 URDF 文件结构2 查看原始碰撞形状描述3 加入简单碰撞形状描述方法一 Meshlab 自动测量方法二 人为测量 4 加入XACRO函数简化描述 最终结果展示侧视图正视图碰撞几何体中心点设置不对出现的结果 写在前面的话 本文使用的 URDF 文件是由 solidworks 的 URDF export 插件生成,详情请看上一篇文章:solidwor

solidworks模型导出urdf(超详细)

目录 写在前面的话1 solidworks 文件2 安装sw2urdf插件3 完整步骤3.1 设置基准轴3.2 设置点3.3 设置坐标轴3.4 设置sw2urdf参数3.5 导出可能的问题3.6 ros2 编译3.7 成功结果画面 写在前面的话 刚进组1个月,我的博士研究方向是自动驾驶,还没入门,先看了古月居的ros2框架课程,现在需要开始进行仿真实验,基于实验室现有的车子进行

xacro->urdf->pdf

在ROS 2系统中,要将xacro文件转换为PDF文件,可以按照以下步骤操作: 步骤1:将Xacro文件转换为URDF文件 首先,需要将xacro文件转换为urdf文件。可以使用ROS 2提供的xacro工具来完成这个转换。 ros2 run xacro xacro path_to_xacro_file.xacro -o output.urdf -o等价于> ros2 run xacr

shadertoy-sdf 操作

vec3 col = getBackgroundColor(uv);float d1 = sdCircle(uv, 0.1, vec2(0., 0.));float d2 = sdSquare(uv, 0.1, vec2(0.15, 0));float res; // result 1、union res = min(d1, d2); // union 2、intersectio

A Tutorial on Near-Field XL-MIMO Communications Towards 6G【论文阅读笔记】

此系列是本人阅读论文过程中的简单笔记,比较随意且具有严重的偏向性(偏向自己研究方向和感兴趣的),随缘分享,共同进步~ 论文主要内容: 建立XL-MIMO模型,考虑NUSW信道和非平稳性; 基于近场信道模型,分析性能(SNR scaling laws,波束聚焦、速率、DoF) XL-MIMO设计问题:信道估计、波束码本、波束训练、DAM XL-MIMO信道特性变化: UPW ➡ NU

[Doc][px4][ros2][gazebo][yolov8]PX4-ROS2-Gazebo-YOLOv8

GIT地址:Https://github.com/monemati/PX4-ROS2-Gazebo-YOLOv8 apt install python3.8-venv  Create a virtual environment # createpython -m venv /home/xg/px4-venv# activatesource /home/xg/px4-venv/bi

前端三件套配合MarsCode实现钉钉官网动画 # 豆包MarsCode

文章目录 如何固定动画区域创建项目MarsCode 设置样式MarsCode 优点1MarsCode 缺点MarsCode 优点2 js实现动画实现获取动画曲线的函数为什么实现这个函数?根据当前滚动位置,计算每一个元素不同的数值更新 dom 的 style更新 animationMapgetDomAnimation @豆包MarsCode 要写出钉钉官网动画,首先第一步就是分