This repository was archived by the owner on May 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrogModel.xml
More file actions
169 lines (131 loc) · 9.71 KB
/
Copy pathfrogModel.xml
File metadata and controls
169 lines (131 loc) · 9.71 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<mujoco>
<compiler angle="degree"/>
<visual><global offwidth="{render_width}" offheight="{render_height}"/></visual>
<option gravity="0 0 -9.81"/>
<option timestep="{ts:e}"/>
<option><flag contact="enable"/></option>
<option integrator="RK4"/>
<default>
<geom contype="1" conaffinity="1" condim="3" friction=".6 .3 .3" solimp=".999 .999 .001" solref=".001 1" margin="0.001" group="0"/>
</default>
<worldbody>
<light name="light" pos="0 0 1" dir="0 0 -1"/>
<body name="frog_body" pos="{body_x_spawn} 0 {body_z_spawn}">
<geom type="box" size="{body_length} {body_width} {leg_thickness}" pos="{body_length} 0 0" mass="{body_mass}" rgba="1 0 0 1" />
<joint name="x_axis" type="slide" pos="0 0 0" axis="1 0 0" stiffness="0" damping="0" />
<joint name="z_axis" type="slide" pos="0 0 0" axis="0 0 1" stiffness="0" damping="0" />
<site name="frog_body" pos="0 0 0" />
<camera name="frog_cam" mode="targetbody" target="frog_body" pos="0 -2.5 1" euler="45 -45 0"/>
<!-- FRONT STATIC LEGS -->
<body name="front_leg_left" pos="{front_leg_x} {body_width} 0">
<geom type="box" size="{leg_width} {leg_width} {front_leg_height}" pos="0 0 -{front_leg_height}" condim="1" mass="0" rgba="1 0 0 1" />
</body>
<body name="front_leg_right" pos="{front_leg_x} -{body_width} 0">
<geom type="box" size="{leg_width} {leg_width} {front_leg_height}" pos="0 0 -{front_leg_height}" condim="1" mass="0" rgba="1 0 0 1" />
</body>
<!-- LEFT BACK LEG -->
<body name="A_left" pos="0 {leg_offset_from_body} 0">
<geom type="box" size="{a_len} {leg_width} {leg_thickness}" pos="{a_len} 0 0" mass="{leg_segment_mass}" rgba="0 0 1 1" />
<body name="B_left" pos="{b_off} 0 0">
<geom type="box" size="{b_len} {leg_width} {leg_thickness}" pos="{b_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointB_left" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 150" stiffness="{k:e}" damping="{b:e}" />
<body name="C_left" pos="{c_off} 0 0">
<geom type="box" size="{c_len} {leg_width} {leg_thickness}" pos="{c_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointC_left" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<site name="foot_hinge_left" pos="0 0 -1" />
<body name="D_left" pos="{d_off} 0 0">
<geom type="box" size="{d_len} {leg_width} {leg_thickness}" pos="{d_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointD_left" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<body name="E_left" pos="{e_off} 0 0">
<geom type="box" size="{e_len} {leg_width} {leg_thickness}" pos="{e_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointE_left" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<body name="Ap_left" pos="{a_off} 0 0">
<geom type="box" size="{a_len} {leg_width} {leg_thickness}" pos="{a_len} 0 0" mass="{leg_segment_mass}" rgba="0 0 1 1" />
<joint name="jointAp_left" type="hinge" axis="0 1 0" limited="true" range="0 150" stiffness="{k:e}" damping="{b:e}" />
</body>
</body>
</body>
</body>
</body>
</body>
<!-- RIGHT BACK LEG-->
<body name="A_right" pos="0 -{leg_offset_from_body} 0">
<geom type="box" size="{a_len} {leg_width} {leg_thickness}" pos="{a_len} 0 0" mass="{leg_segment_mass}" rgba="0 0 1 1" />
<body name="B_right" pos="{b_off} 0 0">
<geom type="box" size="{b_len} {leg_width} {leg_thickness}" pos="{b_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointB_right" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 150" stiffness="{k:e}" damping="{b:e}" />
<body name="C_right" pos="{c_off} 0 0">
<geom type="box" size="{c_len} {leg_width} {leg_thickness}" pos="{b_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointC_right" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<site name="foot_hinge_right" pos="0 0 -1" />
<body name="D_right" pos="{d_off} 0 0">
<geom type="box" size="{d_len} {leg_width} {leg_thickness}" pos="{d_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointD_right" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<body name="E_right" pos="{e_off} 0 0">
<geom type="box" size="{e_len} {leg_width} {leg_thickness}" pos="{e_len} 0 0" mass="{leg_segment_mass}" rgba="0 1 0 1" />
<joint name="jointE_right" type="hinge" pos="0 0 0" axis="0 1 0" limited="true" range="0 100" stiffness="{k:e}" damping="{b:e}" />
<body name="Ap_right" pos="{a_off} 0 0">
<geom type="box" size="{a_len} {leg_width} {leg_thickness}" pos="{a_len} 0 0" mass="{leg_segment_mass}" rgba="0 0 1 1" />
<joint name="jointAp_right" type="hinge" axis="0 1 0" limited="true" range="0 150" stiffness="{k:e}" damping="{b:e}" />
</body>
</body>
</body>
</body>
</body>
</body>
</body>
<body name="floor" pos="0 0 0">
<geom pos="0 0 -0.025" size="15 15 0.05" type="plane" rgba="1 1 1 1"/>
</body>
<camera name="tracking_camera" mode="targetbody" target="frog_body" pos="0 -0.01 0.025" euler="0 0 0" />
</worldbody>
<actuator>
<motor name="FR" joint="jointB_right"/>
<motor name="BR" joint="jointAp_right"/>
<motor name="FL" joint="jointB_left"/>
<motor name="BL" joint="jointAp_left"/>
</actuator>
<equality>
<weld name="hip_weld_right" active="true" body1="A_right" body2="Ap_right" torquescale="1" solimp=".9 .95 .001" solref=".02 1" anchor="0 0 0" relpose="0 0 0 1 0 0 0"/>
<weld name="hip_weld_left" active="true" body1="A_left" body2="Ap_left" torquescale="1" solimp=".9 .95 .001" solref=".02 1" anchor="0 0 0" relpose="0 0 0 1 0 0 0"/>
</equality>
<contact>
<!-- Exclude Right Limb Contact-->
<exclude body1="A_right" body2="B_right" />
<exclude body1="B_right" body2="C_right" />
<exclude body1="C_right" body2="D_right" />
<exclude body1="D_right" body2="E_right" />
<exclude body1="Ap_right" body2="A_right" />
<!-- Exclude Extra Weld Limb from all contact-->
<exclude body1="Ap_right" body2="B_right" />
<exclude body1="Ap_right" body2="C_right" />
<exclude body1="Ap_right" body2="D_right" />
<exclude body1="Ap_right" body2="E_right" />
<exclude body1="Ap_left" body2="B_left" />
<exclude body1="Ap_left" body2="C_left" />
<exclude body1="Ap_left" body2="D_left" />
<exclude body1="Ap_left" body2="E_left" />
<!-- Exclude Body/Limb Contact-->
<exclude body1="frog_body" body2="A_right" />
<exclude body1="frog_body" body2="Ap_right" />
<exclude body1="frog_body" body2="A_left" />
<exclude body1="frog_body" body2="Ap_left" />
<!-- Exclude Left Limb Contact-->
<exclude body1="A_left" body2="B_left" />
<exclude body1="B_left" body2="C_left" />
<exclude body1="C_left" body2="D_left" />
<exclude body1="D_left" body2="E_left" />
<exclude body1="Ap_left" body2="A_left" />
</contact>
<sensor>
<velocimeter name="sensor_velocity" site="frog_body" />
<gyro name="sensor_gyro" site="frog_body" />
<!--<framepos name="sensor_pos" objtype="site" objname="frog_body" reftype="geom" refname="floor" />-->
<!--<framexaxis name="body_x" objtype="site" objname="frog_body" reftype="geom" refname="floor" />-->
<!--<frameyaxis name="body_y" objtype="site" objname="frog_body" reftype="geom" refname="floor" />-->
<!--<framezaxis name="body_z" objtype="site" objname="frog_body" reftype="geom" refname="floor" />-->
<accelerometer name="sensor_accel" site="frog_body" />
<force name="sensor_force" site="foot_hinge_right" />
<torque name="sensor_torque" site="foot_hinge_right" />
</sensor>
</mujoco>