Advertisement
Guest User

erratic_block_laser.xacro

a guest
Apr 21st, 2011
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.02 KB | None | 0 0
  1. <?xml version="1.0"?>
  2.  
  3. <robot
  4.    xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
  5.    xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
  6.    xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
  7.    
  8.     <macro name="erratic_block_laser" params="parent *origin">
  9.         <joint name="block_laser_base_mount_joint" type="fixed">
  10.             <insert_block name="origin" />
  11.             <parent link="${parent}"/>
  12.             <child link="block_laser_base_link"/>
  13.         </joint>
  14.        
  15.         <link name="block_laser_base_link" type="fixed">
  16.             <inertial>
  17.                 <mass value="0.1"/>
  18.                 <origin xyz="0 0 0.0"/>
  19.                 <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
  20.             </inertial>
  21.            
  22.             <visual>
  23.                 <origin rpy="0 0 0" xyz="0 0 0.025"/>
  24.                 <geometry>
  25.                     <box size="0.05 0.05 0.05"/>
  26.                 </geometry>
  27.             </visual>
  28.            
  29.             <collision>
  30.                 <origin rpy="0 0 0" xyz="0 0 0.025"/>
  31.                 <geometry>
  32.                     <box size="0.05 0.05 0.05"/>
  33.                 </geometry>
  34.             </collision>
  35.         </link>
  36.        
  37.         <joint name="base_block_laser_joint" type="fixed" >
  38.             <origin xyz="0 0 0.05" rpy="0 0 0" />
  39.             <parent link="block_laser_base_link" />
  40.             <child link="base_block_laser_link"/>
  41.         </joint>
  42.        
  43.         <link name="base_block_laser_link" type="laser">
  44.             <inertial>
  45.                 <mass value="0.1"/>
  46.                 <origin xyz="0 0 0.0"/>
  47.                 <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
  48.             </inertial>
  49.            
  50.             <visual>
  51.                 <origin rpy="0 0 0" xyz="0 0 0.014"/>
  52.                 <geometry>
  53.                     <cylinder radius="0.0229" length="0.028"/>
  54.                 </geometry>
  55.             </visual>
  56.            
  57.             <collision>
  58.                 <origin rpy="0 0 0" xyz="0 0 0.014"/>
  59.                 <geometry>
  60.                     <cylinder radius="0.0229" length="0.028"/>
  61.                 </geometry>
  62.             </collision>
  63.         </link>
  64.  
  65.         <gazebo reference="base_block_laser_link">
  66. <!--          <model:physical name="ray_model">
  67.          </model:physical>-->
  68. <!--    <model:physical name="ray_model">-->
  69. <!--      <body:empty name="ray_body_name">-->
  70.         <sensor:ray name="ray_sensor">
  71.           <rayCount>30</rayCount>
  72.           <rangeCount>30</rangeCount>
  73.           <laserCount>1</laserCount>
  74.          
  75.           <origin>0.0 0.0 0.05</origin>
  76.           <displayRays>false</displayRays>
  77.          
  78.           <minAngle>-15</minAngle>
  79.           <maxAngle> 15</maxAngle>
  80.          
  81.           <minRange>0.05</minRange>
  82.           <maxRange>100.0</maxRange>
  83.           <updateRate>10.0</updateRate>
  84.  
  85.           <verticalRayCount>30</verticalRayCount>
  86.           <verticalRangeCount>30</verticalRangeCount>
  87.           <verticalMinAngle>-20</verticalMinAngle>
  88.           <verticalMaxAngle>  0</verticalMaxAngle>
  89.          
  90.           <resRange>2</resRange>
  91.  
  92.           <controller:gazebo_ros_block_laser name="ray_block_controller" plugin="libgazebo_ros_block_laser.so">
  93.             <gaussianNoise>0.005</gaussianNoise>
  94.             <alwaysOn>true</alwaysOn>
  95.             <updateRate>2.0</updateRate>
  96.             <topicName>full_cloud</topicName>
  97.             <frameName>/base_block_laser_link</frameName>
  98.             <interface:laser name="ray_block_iface" />
  99.           </controller:gazebo_ros_block_laser>
  100.         </sensor:ray>
  101. <!--      </body:empty>-->
  102. <!--    </model:physical>-->
  103.         </gazebo>
  104.        
  105.         <gazebo reference="laser_base_link">
  106.             <material>Erratic/Grey</material>
  107.         </gazebo>
  108.        
  109.         <gazebo reference="base_block_laser_link">
  110.             <material>Erratic/Black</material>
  111.         </gazebo>
  112.     </macro>
  113. </robot>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement