jeremy_ganylab

urdf evt1

May 13th, 2020
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0"?>
  2. <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="evt1">
  3.  
  4.     <xacro:include filename="$(find evt1)/urdf/macro.xacro"/>
  5.     <xacro:include filename="$(find evt1)/urdf/gazebo.xacro"/>
  6.     <!-- base -->
  7.     <xacro:property name="size_base" value="0.610" />
  8.     <xacro:property name="height_base" value="1.600" />
  9.  
  10.     <xacro:property name="height_pillier" value="0.380" />
  11.     <xacro:property name="size_pillier" value="0.110" />
  12.  
  13.     <xacro:property name="half_size_base" value="${size_base/2.0}" />
  14.     <xacro:property name="mass_pillier" value="0.1" />
  15.  
  16.  
  17.     <!-- WHEELS -->
  18.    
  19.     <xacro:property name="wheel_length" value="0.045"/>
  20.     <xacro:property name="wheel_mass" value="0.6"/>
  21.     <xacro:property name="wheel_radius" value="0.100"/>
  22.  
  23.     <xacro:property name="caster_wheel_length" value="0.030"/>
  24.     <xacro:property name="caster_wheel_mass" value="0.05"/>
  25.     <xacro:property name="caster_wheel_radius" value="0.040"/>
  26.     <xacro:property name="caster_mass" value="0.750"/>
  27.  
  28.     <xacro:property name="imu_offset_x" value="0.2085" />
  29.     <xacro:property name="imu_offset_y" value="-0.2902" />
  30.     <xacro:property name="imu_offset_z" value="0.1681" />
  31.     <xacro:property name="dummy_inertia" value="1e-09"/>
  32.  
  33.     <material name="Black">
  34.         <color rgba="0.0 0.0 0.0 1.0"/>
  35.     </material>
  36.  
  37.     <link name="base_footprint"/>
  38.     <joint name="base_joint" type="fixed">
  39.         <origin xyz="0 0 0" rpy="0 0 0" />
  40.         <parent link="base_footprint"/>
  41.         <child link="base_link" />
  42.     </joint>
  43.       <link name="base_link">
  44.  
  45.       </link>
  46.  
  47.     <xacro:property name="height_level_1" value="0.125" />
  48.     <xacro:property name="pos_level_1" value="${0.150+height_level_1/2}" />
  49.     <xacro:property name="mass_level_1" value="25" />
  50.     <joint name="level_1_fixe" type="fixed">
  51.  
  52.         <origin xyz="0 0 ${pos_level_1}" rpy="0 0 0" />
  53.         <parent link="base_footprint"/>
  54.         <child link="level_1" />
  55.     </joint>
  56.     <link name="level_1">
  57.       <collision>
  58.             <geometry>
  59.               <cylinder radius="${size_base}" length="${height_level_1}"/>
  60.           </geometry>
  61.         </collision>
  62.         <visual>
  63.         <geometry>
  64.           <cylinder radius="${size_base}" length="${height_level_1}"/>
  65.         </geometry>
  66.               <material name="grey">
  67.                 <color rgba="0.7 0.7 0.7 1"/>
  68.         </material>
  69.         </visual>
  70.  
  71.       <inertial>
  72.         <mass value="${mass_level_1}"/>
  73.         <inertia ixx="2.3581" ixy="0.0" ixz="0.0" iyy="2.3581" iyz="0.0" izz="4.6512"/>
  74.       </inertial>
  75.     </link>
  76.  
  77.     <xacro:property name="height_level_2" value="0.243" />
  78.     <xacro:property name="pos_level_2" value="${0.150+height_level_1+height_level_2/2}" />
  79.     <xacro:property name="mass_level_2" value="65" />
  80.     <joint name="level_2_fixe" type="fixed">
  81.    
  82.         <origin xyz="0 0 ${pos_level_2}" rpy="0 0 0" />
  83.         <parent link="base_footprint"/>
  84.         <child link="level_2" />
  85.     </joint>
  86.     <link name="level_2">
  87.       <collision>
  88.             <geometry>
  89.               <cylinder radius="${size_base}" length="${height_level_2}"/>
  90.           </geometry>
  91.         </collision>
  92.         <visual>
  93.         <geometry>
  94.           <cylinder radius="${size_base}" length="${height_level_2}"/>
  95.         </geometry>
  96.               <material name="grey">
  97.                 <color rgba="0.7 0.7 0.7 1"/>
  98.         </material>
  99.         </visual>
  100.  
  101.       <inertial>
  102.         <mass value="${mass_level_2}"/>
  103.         <inertia ixx="6.3664" ixy="0.0" ixz="0.0" iyy="6.3664" iyz="0.0" izz="12.09325"/>
  104.       </inertial>
  105.     </link>
  106.  
  107.     <xacro:property name="height_level_3" value="0.503" />
  108.     <xacro:property name="pos_level_3" value="${0.150+height_level_1+height_level_2+height_level_3/2}" />
  109.     <xacro:property name="mass_level_3" value="45" />
  110.     <joint name="level_3_fixe" type="fixed">
  111.    
  112.         <origin xyz="0 0 ${pos_level_3}" rpy="0 0 0" />
  113.         <parent link="base_footprint"/>
  114.         <child link="level_3" />
  115.     </joint>
  116.     <link name="level_3">
  117.       <collision>
  118.             <geometry>
  119.             <cylinder radius="${size_base}" length="${height_level_3}"/>
  120.           </geometry>
  121.         </collision>
  122.         <visual>
  123.         <geometry>
  124.           <cylinder radius="${size_base}" length="${height_level_3}"/>
  125.         </geometry>
  126.               <material name="grey">
  127.           <color rgba="0.7 0.7 0.7 1"/>
  128.         </material>
  129.         </visual>
  130.  
  131.       <inertial>
  132.         <mass value="${mass_level_3}"/>
  133.         <inertia ixx="5.13490" ixy="0.0" ixz="0.0" iyy="5.134908" iyz="0.0" izz="8.37225"/>
  134.       </inertial>
  135.     </link>
  136.  
  137.     <xacro:property name="height_level_4" value="0.203" />
  138.     <xacro:property name="pos_level_4" value="${0.150+height_level_1+height_level_2+height_level_3+height_level_4/2}" />
  139.     <xacro:property name="mass_level_4" value="12" />
  140.     <joint name="level_4_fixe" type="fixed">
  141.    
  142.         <origin xyz="0 0 ${pos_level_4}" rpy="0 0 0" />
  143.         <parent link="base_footprint"/>
  144.         <child link="level_4" />
  145.     </joint>
  146.     <link name="level_4">
  147.       <collision>
  148.             <geometry>
  149.             <cylinder radius="${size_base}" length="${height_level_4}"/>
  150.           </geometry>
  151.         </collision>
  152.         <visual>
  153.         <geometry>
  154.           <cylinder radius="${size_base}" length="${height_level_4}"/>
  155.         </geometry>
  156.               <material name="grey">
  157.           <color rgba="0.7 0.7 0.7 1"/>
  158.         </material>
  159.         </visual>
  160.  
  161.       <inertial>
  162.         <mass value="${mass_level_4}"/>
  163.         <inertia ixx="1.1575" ixy="0.0" ixz="0.0" iyy="1.1575" iyz="0.0" izz="2.2326"/>
  164.       </inertial>
  165.     </link>
  166.  
  167.     <xacro:property name="height_level_5" value="0.203" />
  168.     <xacro:property name="pos_level_5" value="${0.150+height_level_1+height_level_2+height_level_3+height_level_4+height_level_5/2}" />
  169.     <xacro:property name="mass_level_5" value="25" />
  170.     <joint name="level_5_fixe" type="fixed">
  171.    
  172.         <origin xyz="0 0 ${pos_level_5}" rpy="0 0 0" />
  173.         <parent link="base_footprint"/>
  174.         <child link="level_5" />
  175.     </joint>
  176.     <link name="level_5">
  177.       <collision>
  178.             <geometry>
  179.             <cylinder radius="${size_base}" length="${height_level_5}"/>
  180.           </geometry>
  181.         </collision>
  182.         <visual>
  183.         <geometry>
  184.           <cylinder radius="${size_base}" length="${height_level_5}"/>
  185.         </geometry>
  186.               <material name="grey">
  187.           <color rgba="0.7 0.7 0.7 1"/>
  188.         </material>
  189.         </visual>
  190.  
  191.       <inertial>
  192.         <mass value="${mass_level_5}"/>
  193.         <inertia ixx="2.41147" ixy="0.0" ixz="0.0" iyy="2.41147" iyz="0.0" izz="4.65125"/>
  194.       </inertial>
  195.     </link>
  196.  
  197.     <xacro:property name="height_level_6" value="0.203" />
  198.     <xacro:property name="pos_level_6" value="${0.150+height_level_1+height_level_2+height_level_3+height_level_4+height_level_5+height_level_6/2}" />
  199.     <xacro:property name="mass_level_6" value="25" />
  200.     <joint name="level_6_fixe" type="fixed">
  201.    
  202.         <origin xyz="0 0 ${pos_level_6}" rpy="0 0 0" />
  203.         <parent link="base_footprint"/>
  204.         <child link="level_6" />
  205.     </joint>
  206.     <link name="level_6">
  207.       <collision>
  208.             <geometry>
  209.             <cylinder radius="${size_base}" length="${height_level_6}"/>
  210.           </geometry>
  211.         </collision>
  212.         <visual>
  213.         <geometry>
  214.           <cylinder radius="${size_base}" length="${height_level_6}"/>
  215.         </geometry>
  216.               <material name="grey">
  217.           <color rgba="0.7 0.7 0.7 1"/>
  218.         </material>
  219.         </visual>
  220.  
  221.       <inertial>
  222.         <mass value="${mass_level_6}"/>
  223.         <inertia ixx="2.41147" ixy="0.0" ixz="0.0" iyy="2.41147" iyz="0.0" izz="4.65125"/>
  224.       </inertial>
  225.     </link>
  226.     <xacro:property name="pos_poteau" value="${0.150+height_level_1+height_level_2+height_level_3+height_level_4+height_level_5+height_level_6+height_pillier/2}" />
  227.     <joint name="poteau_joint" type="fixed">
  228.         <origin xyz="0 0 ${pos_poteau}" rpy="0 0 0" />
  229.         <parent link="base_footprint"/>
  230.         <child link="poteau_link" />
  231.     </joint>
  232.     <link name="poteau_link">
  233.       <inertial>
  234.         <mass value="${mass_pillier}" />
  235.         <inertia ixx="0.035" ixy="0" ixz="0" iyy="0.035" iyz="0" izz="0.07" />
  236.       </inertial>
  237.       <collision>
  238.           <geometry>
  239.               <cylinder radius="${size_pillier}" length="${height_pillier}"/>
  240.           </geometry>
  241.       </collision>
  242.       <visual>
  243.         <geometry>
  244.           <cylinder radius="${size_pillier}" length="${height_pillier}"/>
  245.         </geometry>
  246.         <material name="red">
  247.           <color rgba="1.0 0.1 0.1 1"/>
  248.         </material>
  249.       </visual>
  250.       </link>
  251.  
  252.  
  253.   <xacro:property name="radius_caster" value="0.040" />
  254.  
  255.   <xacro:property name="pos_front_caster_1" value="0.245" />
  256.   <xacro:caster_sans_contact xyz="${pos_front_caster_1} 0.093 ${radius_caster}" name="front_1" />
  257.  
  258.   <!--Caster front  -->
  259.   <xacro:property name="pos_front_caster_2" value="0.245" />
  260.   <xacro:caster_sans_contact xyz="${pos_front_caster_2} -0.093 ${radius_caster}" name="front_2" />
  261.  
  262.   <!--Caster back  -->
  263.   <xacro:property name="pos_back_caster" value="-0.226" />
  264.   <xacro:caster_sans_contact xyz="${pos_back_caster} 0.0 ${radius_caster}" name="back" />
  265.  
  266.   <link name="imu_link">
  267.     <inertial>
  268.       <mass value="0.001"/>
  269.       <origin xyz="0 0 0" rpy="0 0 0"/>
  270.       <inertia ixx="${dummy_inertia}" ixy="0.0" ixz="0.0" iyy="${dummy_inertia}" iyz="0.0" izz="${dummy_inertia}"/>
  271.     </inertial>
  272.   </link>
  273.   <joint name="imu_joint" type="fixed">
  274.     <parent link="base_link" />
  275.     <child link="imu_link" />
  276.     <origin xyz="${imu_offset_x} ${imu_offset_y} ${imu_offset_z}" rpy="0 0 0"/>
  277.   </joint>
  278.     <gazebo reference="imu_link">
  279.   </gazebo>
  280.  
  281.   <link name="wheel_axe">
  282.     <inertial>
  283.       <mass value="1.001"/>
  284.       <origin xyz="0 0 0" rpy="0 0 0"/>
  285.       <inertia ixx="0" ixy="0.0" ixz="0.0" iyy="0" iyz="0.0" izz="0"/>
  286.     </inertial>
  287.     <visual>
  288.       <origin rpy="1.57 0 0" xyz="0.0 0.0 0 "/>
  289.       <geometry>
  290.         <cylinder radius="${radius_caster}" length="0.434"/>
  291.       </geometry>
  292.     </visual>
  293.   </link>
  294.   <joint name="axe_joint" type="fixed">
  295.     <parent link="base_link" />
  296.     <child link="wheel_axe" />
  297.     <origin xyz="0 0 ${wheel_radius}" rpy="0 0 0"/>
  298.   </joint>
  299.  
  300.   <xacro:wheel rpy="1.57 0.0 0.0" xyz="0.0 0.217 0" name="right" />
  301.     <xacro:wheel rpy="1.57 0.0 0.0" xyz="0.0 -0.217 0" name="left" />
  302. </robot>
RAW Paste Data