File size: 2,594 Bytes
66c9c8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0"?>
<robot name="cartpole">

  <link name="slider">
    <visual>
      <geometry>
        <box size="0.03 8 0.03"/>
      </geometry>
      <material name="slider_mat">
        <color rgba="0.9 0.6 0.2 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.03 8 0.03"/>
      </geometry>
    </collision>
  </link>

  <joint name="slider_to_cart" type="prismatic">
    <axis xyz="0 1 0"/>
    <origin xyz="0 0 0"/>
    <parent link="slider"/>
    <child link="cart"/>
    <limit effort="1000.0" lower="-4" upper="4" velocity="100"/>
  </joint>
  
  <link name="cart">
    <visual>
      <geometry>
        <box size="0.2 0.25 0.2"/>
      </geometry>
      <material name="cart_mat">
        <color rgba="0.3 0.5 0.7 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
          <box size="0.2 0.25 0.2"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1"/>
      <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
  </link>

  <joint name="cart_to_pole1" type="continuous">
    <axis xyz="1 0 0"/>
    <origin xyz="0.12 0 0"/>
    <parent link="cart"/>
    <child link="pole1"/>
    <limit effort="1000.0" velocity="8"/>
  </joint>
  
  <link name="pole1">
    <visual>
      <geometry>
        <box size="0.04 0.06 1.0"/>	
      </geometry>
      <origin xyz="0 0 0.47"/>
      <material name="pole_mat">
        <color rgba="0.1 0.1 0.3 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.04 0.06 1.0"/>	
      </geometry>
      <origin xyz="0 0 0.47"/>
    </collision>
    <inertial>
      <origin xyz="0 0 0.47"/>
      <mass value="0.25"/>
      <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
  </link>

  <link name="pole2">
    <visual>
      <geometry>
        <box size="0.04 0.06 1.0"/> 
      </geometry>
      <origin xyz="0 0 0.47"/>
      <material name="pole_mat">
        <color rgba="0.1 0.1 0.3 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.04 0.06 1.0"/> 
      </geometry>
      <origin xyz="0 0 0.47"/>
    </collision>
    <inertial>
      <origin xyz="0 0 0.47"/>
      <mass value="0.25"/>
      <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
  </link>

  <joint name="pole1_to_pole2" type="continuous">
    <axis xyz="1 0 0"/>
    <origin xyz="0.0 0 1.0"/>
    <parent link="pole1"/>
    <child link="pole2"/>
    <limit effort="1000.0" velocity="8"/>
  </joint>

</robot>