<sdf version='1.6'>
  <model name='Mid360'>
    <link name='livox_base'>
      <pose frame=''>0 0 0 0 -0 0</pose>
      <inertial>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <mass>0.2</mass>
        <inertia>
          <ixx>0.02</ixx>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyy>0.02</iyy>
          <iyz>0</iyz>
          <izz>0.02</izz>
        </inertia>
      </inertial>
      <collision name='livox_base_collision'>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <geometry>
          <mesh>
            <scale>1 1 1</scale>
            <uri>model://livox_mid40/meshes/livox_mid40.dae</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name='livox_base_visual'>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <geometry>
          <mesh>
            <scale>1 1 1</scale>
            <uri>model://livox_mid40/meshes/mid360.dae</uri>
          </mesh>
        </geometry>
      </visual>
      <gravity>1</gravity>
      <velocity_decay/>
      <sensor name='laser_livox' type='ray'>
        <visualize>1</visualize>
        <update_rate>10</update_rate>
        <always_on>1</always_on>
        <plugin name='gazebo_ros_laser_controller' filename='liblivox_laser_simulation.so'>
          <ray>
			  <scan>
				  <horizontal>
				    <samples>100</samples>
				    <resolution>1</resolution>
				    <min_angle>0</min_angle>
            			    <max_angle>6.28</max_angle>
				  </horizontal>
				  <vertical>
				    <samples>360</samples>
				    <resolution>1</resolution>
				    <min_angle>-0.0561995544444</min_angle>
           			    <max_angle>0.981223276667</max_angle>
				  </vertical>
			  </scan>
			  <range>
				  <min>0.1</min>
				  <max>30</max>
				  <resolution>0.02</resolution>
			  </range>
			  <noise>
				  <type>gaussian</type>
				  <mean>0.0</mean>
				  <stddev>0.0</stddev>
			  </noise>
			  </ray>
          <visualize>1</visualize>
          <samples>24000</samples>
          <downsample>1</downsample>
          <csv_file_name>/home/byy/PX4_Firmware/Tools/sitl_gazebo/models/livox_mid40/scan_mode/mid360.csv</csv_file_name>
          <ros_topic>/scan</ros_topic>
        </plugin>
        <pose frame=''>-0.005 0.005 0.047 0 -0 0</pose>
      </sensor>
    </link>
  </model>
</sdf>
