collab/igvc2018

git clone https://git.julia.blue/collab/igvc2018

Ricky Chenadd navigation and urdf source filese9b28f9

simulation
2.3 KiB92 linesraw
1<?xml version="1.0"?>
2<robot>
3  <!--macro name="cylinder_inertia" params="m r h">
4    <inertia  ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
5      iyy="${m*(3*r*r+h*h)/12}" iyz = "0"
6      izz="${m*r*r/2}"
7    />
8  </macro>
9
10  <macro name="box_inertia" params="m x y z">
11    <inertia  ixx="${m*(y*y+z*z)/12}" ixy = "0" ixz = "0"
12      iyy="${m*(x*x+z*z)/12}" iyz = "0"
13      izz="${m*(x*x+z*z)/12}"
14    />
15  </macro>
16
17  <macro name="sphere_inertia" params="m r">
18    <inertia  ixx="${2*m*r*r/5}" ixy = "0" ixz = "0"
19      iyy="${2*m*r*r/5}" iyz = "0"
20      izz="${2*m*r*r/5}"
21    />
22  </macro>
23
24
25
26
27
28
29
30  <macro name="wheel" params="lr tY">
31
32    <link name="${lr}_wheel">
33      <collision>
34        <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
35        <geometry>
36          <cylinder length="${wheelWidth}" radius="${wheelRadius}"/>
37        </geometry>
38      </collision>
39
40      <visual>
41        <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
42        <geometry>
43          <cylinder length="${wheelWidth}" radius="${wheelRadius}"/>
44        </geometry>
45        <material name="black"/>
46      </visual>
47
48      <inertial>
49        <origin xyz="0 0 0" rpy="0 ${PI/2} ${PI/2}" />
50        <mass value="${wheelMass}"/>
51        <cylinder_inertia m="${wheelMass}" r="${wheelRadius}" h="${wheelWidth}"/>
52      </inertial>
53    </link>
54
55    <gazebo reference="${lr}_wheel">
56      <mu1 value="1.0"/>
57      <mu2 value="1.0"/>
58      <kp  value="10000000.0" />
59      <kd  value="1.0" />
60      <fdir1 value="1 0 0"/>
61      <material>Gazebo/Black</material>
62    </gazebo>
63
64
65    <joint name="${lr}_wheel_hinge" type="continuous">
66      <parent link="chassis"/>
67      <child link="${lr}_wheel"/>
68    <origin xyz="${-wheelPos+chassisLength/2} ${tY*wheelWidth/2+tY*chassisWidth/2} ${wheelRadius}" rpy="0 0 0" />
69      <axis xyz="0 1 0" rpy="0 0 0" />
70      <limit effort="10000" velocity="10000"/>
71      <joint_properties damping="0.0" friction="0.0"/>
72    </joint>
73
74
75    <transmission name="${lr}_trans">
76      <type>transmission_interface/SimpleTransmission</type>
77      <joint name="${lr}_wheel_hinge">
78        <hardwareInterface>EffortJointInterface</hardwareInterface>
79      </joint>
80      <actuator name="${lr}Motor">
81        <hardwareInterface>EffortJointInterface</hardwareInterface>
82        <mechanicalReduction>10</mechanicalReduction>
83      </actuator>
84    </transmission>
85
86  </macro-->
87
88
89
90
91
92</robot>