当前位置: 首页 > news >正文

机器人SDF模型写法官方例子

机器人SDF模型写法官方例子

  • SDF
  • link
    • Collision
    • visual
  • joint
  • sensor
  • world

参考:SDFormat官方,里面会写有有什么元素<>可以写

SDF

<?xml version='1.0'?>
<sdf version='1.12'>
  <world name='default'>
    ...
  </world>
</sdf>

or

<?xml version='1.0'?>
<sdf version='1.12'>
  <model name='my_model'>
    ...
  </model>
</sdf>

or 

<?xml version='1.0'?>
<sdf version='1.12'>
  <actor name='my_actor'>
    ...
  </actor>
</sdf>

or

<?xml version='1.0'?>
<sdf version='1.12'>
  <light name='my_light'>
    ...
  </light>
</sdf>

link

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="box">
    <pose>0 0 0.5 0 0 0</pose>
    <static>false</static>

    <link name="link">
      <pose>0 0 0 0 0 0</pose>
        <inertial>
          <inertia>
            <ixx>1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>1</iyy>
            <iyz>0</iyz>
            <izz>1</izz>
          </inertia>
          <mass>1.0</mass>
        </inertial>

        <collision name="my_collision">
          ...
        </collision>

        <visual name="my_visual">
          ...
        </visual>

        <sensor type="camera" name="my_sensor">
          ...
        </sensor>

    </link>
  </model>
</sdf>

Collision

还有< surface>其中包括了< friction>,< bounce>,< contact>, < soft_contact>

	<collision name="collision">
        <pose>0 0 0.5 0 0 0</pose>
        <geometry>
          <box>
            <size>1 1 1</size>
          </box>
        </geometry>
      </collision>

visual

material等等

      <visual name="visual">
        <pose>0 0 0.5 0 0 0</pose>
        <geometry>
          <box>
            <size>1 1 1</size>
          </box>
        </geometry>
      </visual>

joint

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="box">

    <link name="link_1">
      ...
    </link>

    <link name="link_2">
      ...
    </link>


    <joint name="bar_12_joint" type="revolute">
      <parent>link_1</parent>
      <child>link_2</child>
      <pose>0 0.5 0 0 0 0</pose>
      <axis>
        <xyz>0 0 1</xyz>
      </axis>
    </joint>

  </model>
</sdf>

sensor

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="box">
    <link name="link">

        <sensor type="camera" name="my_sensor">
          <camera>
            <horizontal_fov>1.047</horizontal_fov>
            <image>
              <width>320</width>
              <height>240</height>
            </image>
            <clip>
              <near>0.1</near>
              <far>100</far>
            </clip>
          </camera>
          <always_on>1</always_on>
          <update_rate>30</update_rate>
          <visualize>true</visualize>
        </sensor>

    </link>
  </model>
</sdf>

world

< wind>、< gravity>、< magnetic_field>、< atmosphere>、< gui>、< physics>等等

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">
    <physics type="ode">
      ...
    </physics>
    
    <scene>
      ...
    </scene>

    <model name="box">
      ...
    </model>

    <model name="sphere">
      ...
    </model>

    <light name="spotlight">
      ...
    </light>

  </world>
</sdf>

相关文章:

  • csp信奥赛C++常用的数学函数详解
  • UPDclient server
  • 使用 Go 和 Gin 实现高可用负载均衡代理服务器
  • 夯实 kafka 系列|第五章:基于 kafka 分布式事件框架 eval-event
  • Java通信
  • JS—深拷贝与浅拷贝:2分钟掌握二者的区别
  • Axure RP设计软件中的各种函数:包括数字、数学、字符串、时间及中继器函数,详细解释了各函数的用途、参数及其应用场景。
  • MIPI(Mobile Industry Processor Interface)详解
  • ASP 应用HTTP.SYS短文件文件解析Access 注入数据库泄漏
  • [MySQL数据库] 索引详解
  • Leetcode12-整数转罗马数字
  • 使用ros_gz_bridge将gz topic转换成ros2 topic
  • 如何自动规整化(格式化)HTML
  • K8S学习之基础五十五:k8s中jenkins部署blueOcean
  • 每日免费分享之精品wordpress主题系列~DAY16
  • K8S安装及部署calico(亲测有用[特殊字符])
  • 基于SpringBoot + Vue 的餐厅点餐管理系统
  • 文件与fd
  • 海康设备http监听接收报警事件数据
  • Compare全目录文件比较内容(项目中用到过)
  • 国际足联女子世界杯再次扩军,2031年起增至48支球队
  • 聆听百年唐调正声:唐文治王蘧常吟诵传习的背后
  • 中国词学研究会原会长、华东师大教授马兴荣逝世,享年101岁
  • 欧盟公布关税反制清单,瞄准美国飞机、汽车等产品
  • 九家企业与上海静安集中签约,投资额超10亿元
  • 美联储宣布维持基准利率不变