ros2和gazebo仿真简单的数据交换

1.根据官方的教程创建简单的模型velodyne激光雷达 velodyne.world

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">
 
    <!-- A global light source -->
    <include>
      <uri>model://sun</uri>
    </include>
 
    <!-- A ground plane -->
    <include>
      <uri>model://ground_plane</uri>
    </include>


<model name="velodyne_hdl_32">
  <!-- Give the base link a unique name -->
  <link name="base">
 
    <!-- Offset the base by half the lenght of the cylinder -->
    <pose>0 0 0.029335 0 0 0</pose>
<inertial>
      <mass>1.2</mass>
      <inertia>
        <ixx>0.001087473</ixx>
        <iyy>0.001087473</iyy>
        <izz>0.001092437</izz>
        <ixy>0</ixy>
        <ixz>0</ixz>
        <iyz>0</iyz>
      </inertia>
    </inertial>
    <collision name="base_collision">
      <geometry>
        <cylinder>
          <!-- Radius and length provided by Velodyne -->
          <radius>.04267</radius>
          <length>.05867</length>
        </cylinder>
      </geometry>
    </collision>
 
    <!-- The visual is mostly a copy of the collision -->
    <visual name="base_visual">
      <geometry>
        <cylinder>
          <radius>.04267</radius>
          <length>.05867</length>
        </cylinder>
      </geometry>
    </visual>
  </link>

<!-- Each joint must have a unique name -->
<joint type="revolute" name="joint">
 
  <!-- Position the joint at the bottom of the top link -->
  <pose>0 0 -0.036785 0 0 0</pose>
 
  <!-- Use the base link as the parent of the joint -->
  <parent>base</parent>
 
  <!-- Use the top link as the child of the joint -->
  <child>top</child>
 
  <!-- The axis defines the joint's degree of freedom -->
  <axis>
 
    <!-- Revolve around the z-axis -->
    <xyz>0 0 1</xyz>
 
    <!-- Limit refers to the range of motion of the joint -->
    <limit>
 
      <!-- Use a very large number to indicate a continuous revolution -->
      <lower>-10000000000000000</lower>
      <upper>10000000000000000</upper>
    </limit>
  </axis>
</joint>
 
  <!-- Give the base link a unique name -->
  <link name="top">

<!-- Add a ray sensor, and give it a name -->
<sensor type="ray" name="sensor">
 
  <!-- Position the ray sensor based on the specification. Also rotate
       it by 90 degrees ar
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值