Advertisement
Guest User

SDF parsing problem: Order of tag groups matters?

a guest
Mar 3rd, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.49 KB | None | 0 0
  1. Case 1: "visual" tag group before "collision" group: Both are present in the output of gz sdf --print
  2.  
  3. <path_to_model>/model.sdf
  4. <?xml version="1.0" ?>
  5. <sdf version="1.5">
  6.   <model name="block_wall">
  7.     <pose>0 0 0.30924 0 0 0</pose>
  8.     <static>true</static>
  9.     <link name="blocks">
  10.       <visual name="visual">
  11.         <geometry>
  12.           <mesh>
  13.             <uri>model://block_wall_softbody/meshes/block_wall.dae</uri>
  14.           </mesh>
  15.         </geometry>
  16.       </visual>
  17.       <collision name="collision">
  18.         <geometry>
  19.           <mesh>
  20.             <uri>model://block_wall_softbody/meshes/block_wall.dae</uri>
  21.           </mesh>
  22.         </geometry>
  23.         <surface>
  24.           <bounce>
  25.             <restitution_coefficient>0.0</restitution_coefficient>
  26.             <threshold>100000</threshold>
  27.           </bounce>
  28.           <friction>
  29.             <ode>
  30.               <mu>100</mu>
  31.               <mu2>50</mu2>
  32.             </ode>
  33.           </friction>
  34.           <contact>
  35.             <ode>
  36.               <soft_cfm>0.0</soft_cfm>
  37.               <!--"sponginess", 0.0=hard-->
  38.               <soft_erp>0.2</soft_erp>
  39.               <max_vel>0.0</max_vel>
  40.               <min_depth>0.0</min_depth>
  41.             </ode>
  42.           </contact>
  43.       <soft_contact>
  44.         <bullet>
  45.           <totalmass>10.0</totalmass>
  46.           <num_clusters>128</num_clusters>
  47.           <aeromodel>0</aeromodel>
  48.           <kVCF>1.0</kVCF>
  49.           <kDP>0.0</kDP>
  50.           <kDG>0.0</kDG>
  51.           <kLF>0.0</kLF>
  52.           <kPR>0.0</kPR>
  53.           <kVC>0.0</kVC>
  54.           <kDF>0.2</kDF>
  55.           <kMT>0.0</kMT>
  56.           <kCHR>1.0</kCHR>
  57.           <kKHR>0.1</kKHR>
  58.           <kSHR>1.0</kSHR>
  59.           <kAHR>0.7</kAHR>
  60.           <kSRHR_CL>0.1</kSHR_CL>
  61.           <kSKHR_CL>1.0</kSKHR_CL>
  62.           <kSSHR_CL>0.5</kSSHR_CL>
  63.           <kSR_SPLT_CL>0.5</kSR_SPLT_CL>
  64.           <kSK_SPLT_CL>0.5</kSK_SPLT_CL>
  65.           <kSS_SPLT_CL>0.5</kSS_SPLT_CL>
  66.           <maxvolume>1.0</maxvolume>
  67.           <timescale>1.0</timescale>
  68.           <viterations>0</viterations>
  69.           <piterations>1</piterations>
  70.           <diterations>0</diterations>
  71.           <citerations>4</citerations>
  72.           <collisions>1</collisions>
  73.         </bullet>
  74.       </soft_contact>
  75.         </surface>
  76.       </collision>
  77.     </link>
  78.   </model>
  79. </sdf>
  80.  
  81. Case 2: "visual" tag group after "collision" group: Only "collision" tag group is present in the output of gz sdf --print
  82.  
  83. <sdf version='1.5'>
  84.   <model name='block_wall'>
  85.     <pose>0 0 0.30924 0 -0 0</pose>
  86.     <static>1</static>
  87.     <link name='blocks'>
  88.       <collision name='collision'>
  89.         <geometry>
  90.           <mesh>
  91.             <uri>model://block_wall_softbody/meshes/block_wall.dae</uri>
  92.           </mesh>
  93.         </geometry>
  94.         <surface>
  95.           <bounce>
  96.             <restitution_coefficient>0</restitution_coefficient>
  97.             <threshold>100000</threshold>
  98.           </bounce>
  99.           <friction>
  100.             <ode>
  101.               <mu>100</mu>
  102.               <mu2>50</mu2>
  103.             </ode>
  104.           </friction>
  105.           <contact>
  106.             <ode>
  107.               <soft_cfm>0</soft_cfm>
  108.               <soft_erp>0.2</soft_erp>
  109.               <max_vel>0</max_vel>
  110.               <min_depth>0</min_depth>
  111.             </ode>
  112.           </contact>
  113.           <soft_contact>
  114.             <bullet>
  115.               <totalmass>10</totalmass>
  116.               <num_clusters>128</num_clusters>
  117.               <aeromodel>0</aeromodel>
  118.               <kVCF>1</kVCF>
  119.               <kDP>0</kDP>
  120.               <kDG>0</kDG>
  121.               <kLF>0</kLF>
  122.               <kPR>0</kPR>
  123.               <kVC>0</kVC>
  124.               <kDF>0.2</kDF>
  125.               <kMT>0</kMT>
  126.               <kCHR>1</kCHR>
  127.               <kKHR>0.1</kKHR>
  128.               <kSHR>1</kSHR>
  129.               <kAHR>0.7</kAHR>
  130.               <kSRHR_CL>0.1</kSRHR_CL>
  131.               <kSKHR_CL>1</kSKHR_CL>
  132.               <kSSHR_CL>0.5</kSSHR_CL>
  133.               <kSR_SPLT_CL>0.5</kSR_SPLT_CL>
  134.               <kSK_SPLT_CL>0.5</kSK_SPLT_CL>
  135.               <kSS_SPLT_CL>0.5</kSS_SPLT_CL>
  136.               <maxvolume>1</maxvolume>
  137.               <timescale>1</timescale>
  138.               <viterations>0</viterations>
  139.               <piterations>1</piterations>
  140.               <diterations>0</diterations>
  141.               <citerations>4</citerations>
  142.               <collisions>1</collisions>
  143.             </bullet>
  144.           </soft_contact>
  145.         </surface>
  146.       </collision>
  147.       <velocity_decay>
  148.         <linear>0</linear>
  149.         <angular>0</angular>
  150.       </velocity_decay>
  151.     </link>
  152.   </model>
  153. </sdf>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement