Skip to content

Commit f4c8ad9

Browse files
committed
Zephyr: copies of zephyr models for testing
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
1 parent 8cb56ad commit f4c8ad9

21 files changed

Lines changed: 2946 additions & 2 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
3+
<model>
4+
<name>Zephyr Delta Wing With Ardupilot 1</name>
5+
<version>2.0</version>
6+
<sdf version="1.9">model.sdf</sdf>
7+
8+
<author>
9+
<name>Cole Biesemeyer</name>
10+
<email>cole.bsmr@gmail.com</email>
11+
</author>
12+
13+
<author>
14+
<name>Nate Koenig</name>
15+
<email>natekoenig@gmail.com</email>
16+
</author>
17+
18+
<description>
19+
A model of a Zephyr delta wing with Ardupilot integration.
20+
</description>
21+
22+
</model>
Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
<?xml version="1.0" ?>
2+
<sdf version="1.9">
3+
<model name="zephyr_with_ardupilot_1">
4+
<include>
5+
<uri>model://zephyr</uri>
6+
</include>
7+
8+
<!-- plugins -->
9+
<plugin filename="gz-sim-joint-state-publisher-system"
10+
name="gz::sim::systems::JointStatePublisher">
11+
</plugin>
12+
<!-- wing -->
13+
<plugin filename="gz-sim-lift-drag-system"
14+
name="gz::sim::systems::LiftDrag">
15+
<a0>0.13</a0>
16+
<cla>3.7</cla>
17+
<cda>0.06417112299</cda>
18+
<cma>0.0</cma>
19+
<alpha_stall>0.3391428111</alpha_stall>
20+
<cla_stall>-3.85</cla_stall>
21+
<cda_stall>-0.9233984055</cda_stall>
22+
<cma_stall>0.0</cma_stall>
23+
<cp>0 -0.1 0</cp>
24+
<area>0.50</area>
25+
<air_density>1.2041</air_density>
26+
<forward>0 -1 0</forward>
27+
<upward>0 0 1</upward>
28+
<link_name>zephyr::wing</link_name>
29+
</plugin>
30+
<!-- left_wing -->
31+
<plugin filename="gz-sim-lift-drag-system"
32+
name="gz::sim::systems::LiftDrag">
33+
<a0>0.15</a0>
34+
<cla>6.8</cla>
35+
<cda>0.06417112299</cda>
36+
<cma>0.0</cma>
37+
<alpha_stall>0.6391428111</alpha_stall>
38+
<cla_stall>-3.85</cla_stall>
39+
<cda_stall>-0.9233984055</cda_stall>
40+
<cma_stall>0.0</cma_stall>
41+
<cp>0.7 0.20 0</cp>
42+
<area>0.10</area>
43+
<air_density>1.2041</air_density>
44+
<forward>0 -1 0</forward>
45+
<upward>0 0 1</upward>
46+
<link_name>zephyr::wing</link_name>
47+
<control_joint_name>zephyr::flap_left_joint</control_joint_name>
48+
<control_joint_rad_to_cl>-5.0</control_joint_rad_to_cl>
49+
</plugin>
50+
<!-- right_wing -->
51+
<plugin filename="gz-sim-lift-drag-system"
52+
name="gz::sim::systems::LiftDrag">
53+
<a0>0.15</a0>
54+
<cla>6.8</cla>
55+
<cda>0.06417112299</cda>
56+
<cma>0.0</cma>
57+
<alpha_stall>0.6391428111</alpha_stall>
58+
<cla_stall>-3.85</cla_stall>
59+
<cda_stall>-0.9233984055</cda_stall>
60+
<cma_stall>0.0</cma_stall>
61+
<cp>-0.7 0.20 0</cp>
62+
<area>0.10</area>
63+
<air_density>1.2041</air_density>
64+
<forward>0 -1 0</forward>
65+
<upward>0 0 1</upward>
66+
<link_name>zephyr::wing</link_name>
67+
<control_joint_name>zephyr::flap_right_joint</control_joint_name>
68+
<control_joint_rad_to_cl>-5.0</control_joint_rad_to_cl>
69+
</plugin>
70+
<!-- left_rudder -->
71+
<plugin filename="gz-sim-lift-drag-system"
72+
name="gz::sim::systems::LiftDrag">
73+
<a0>0.0</a0>
74+
<cla>4.752798721</cla>
75+
<cda>0.6417112299</cda>
76+
<cma>0.0</cma>
77+
<alpha_stall>0.3391428111</alpha_stall>
78+
<cla_stall>-3.85</cla_stall>
79+
<cda_stall>-0.9233984055</cda_stall>
80+
<cma_stall>0.0</cma_stall>
81+
<cp>-0.76 0.30 0.025</cp>
82+
<area>0.12</area>
83+
<air_density>1.2041</air_density>
84+
<forward>0 -1 0</forward>
85+
<upward>1 0 0</upward>
86+
<link_name>zephyr::wing</link_name>
87+
</plugin>
88+
<!-- right_rudder -->
89+
<plugin filename="gz-sim-lift-drag-system"
90+
name="gz::sim::systems::LiftDrag">
91+
<a0>0.0</a0>
92+
<cla>4.752798721</cla>
93+
<cda>0.6417112299</cda>
94+
<cma>0.0</cma>
95+
<alpha_stall>0.3391428111</alpha_stall>
96+
<cla_stall>-3.85</cla_stall>
97+
<cda_stall>-0.9233984055</cda_stall>
98+
<cma_stall>0.0</cma_stall>
99+
<cp>0.76 0.30 0.025</cp>
100+
<area>0.12</area>
101+
<air_density>1.2041</air_density>
102+
<forward>0 -1 0</forward>
103+
<upward>1 0 0</upward>
104+
<link_name>zephyr::wing</link_name>
105+
</plugin>
106+
<!-- propeller_blade_1 -->
107+
<plugin filename="gz-sim-lift-drag-system"
108+
name="gz::sim::systems::LiftDrag">
109+
<a0>0.30</a0>
110+
<alpha_stall>1.4</alpha_stall>
111+
<cla>4.2500</cla>
112+
<cda>0.10</cda>
113+
<cma>0.0</cma>
114+
<cla_stall>-0.025</cla_stall>
115+
<cda_stall>0.0</cda_stall>
116+
<cma_stall>0.0</cma_stall>
117+
<area>0.02</area>
118+
<air_density>1.2041</air_density>
119+
<cp>0 0 0.074205</cp>
120+
<forward>-1 0 0</forward>
121+
<upward>0 -1 0</upward>
122+
<link_name>zephyr::propeller</link_name>
123+
</plugin>
124+
<!-- propeller_blade_2 -->
125+
<plugin filename="gz-sim-lift-drag-system"
126+
name="gz::sim::systems::LiftDrag">
127+
<a0>0.30</a0>
128+
<alpha_stall>1.4</alpha_stall>
129+
<cla>4.2500</cla>
130+
<cda>0.10</cda>
131+
<cma>0.0</cma>
132+
<cla_stall>-0.025</cla_stall>
133+
<cda_stall>0.0</cda_stall>
134+
<cma_stall>0.0</cma_stall>
135+
<area>0.02</area>
136+
<air_density>1.2041</air_density>
137+
<cp>0 0 -0.074205</cp>
138+
<forward>1 0 0</forward>
139+
<upward>0 -1 0</upward>
140+
<link_name>zephyr::propeller</link_name>
141+
</plugin>
142+
143+
<plugin filename="gz-sim-apply-joint-force-system"
144+
name="gz::sim::systems::ApplyJointForce">
145+
<joint_name>zephyr::propeller_joint</joint_name>
146+
</plugin>
147+
<plugin filename="gz-sim-apply-joint-force-system"
148+
name="gz::sim::systems::ApplyJointForce">
149+
<joint_name>zephyr::flap_left_joint</joint_name>
150+
</plugin>
151+
<plugin filename="gz-sim-apply-joint-force-system"
152+
name="gz::sim::systems::ApplyJointForce">
153+
<joint_name>zephyr::flap_right_joint</joint_name>
154+
</plugin>
155+
156+
<plugin name="ArduPilotPlugin" filename="ArduPilotPlugin">
157+
<!-- Port settings -->
158+
<fdm_addr>127.0.0.1</fdm_addr>
159+
<fdm_port_in>9002</fdm_port_in>
160+
<connectionTimeoutMaxCount>5</connectionTimeoutMaxCount>
161+
<lock_step>1</lock_step>
162+
163+
<!-- Frame conventions
164+
modelXYZToAirplaneXForwardZDown:
165+
- transforms body frame from orientation in Gazebo to NED
166+
167+
gazeboXYZToNED
168+
- transforms world from Gazebo convention xyz = N -E -D
169+
to ArduPilot convention xyz = NED
170+
171+
Zephyr is oriented x-left, y-back, z-up
172+
-->
173+
<modelXYZToAirplaneXForwardZDown degrees="true">0 0 0 180 0 -90</modelXYZToAirplaneXForwardZDown>
174+
<gazeboXYZToNED degrees="true">0 0 0 180 0 90</gazeboXYZToNED>
175+
176+
<!-- Sensors -->
177+
<imuName>zephyr::imu_link::imu_sensor</imuName>
178+
179+
<!--
180+
incoming control command [0, 1]
181+
so offset it by 0 to get [0, 1]
182+
and divide max target by 1.
183+
offset = 0
184+
multiplier = 838 max rpm / 1 = 838
185+
-->
186+
187+
<!--
188+
SERVO3_FUNCTION 70 (Throttle)
189+
SERVO3_MAX 1900
190+
SERVO3_MIN 1100
191+
SERVO3_REVERSED 0
192+
SERVO3_TRIM 1100
193+
-->
194+
<control channel="2">
195+
<jointName>zephyr::propeller_joint</jointName>
196+
<useForce>1</useForce>
197+
<multiplier>838</multiplier>
198+
<offset>0</offset>
199+
<servo_min>1100</servo_min>
200+
<servo_max>1900</servo_max>
201+
<type>VELOCITY</type>
202+
<p_gain>0.20</p_gain>
203+
<i_gain>0</i_gain>
204+
<d_gain>0</d_gain>
205+
<i_max>0</i_max>
206+
<i_min>0</i_min>
207+
<cmd_max>2.5</cmd_max>
208+
<cmd_min>0.0</cmd_min>
209+
</control>
210+
211+
<!--
212+
SERVO1_FUNCTION 77 (Elevon Left)
213+
SERVO1_MAX 1900
214+
SERVO1_MIN 1100
215+
SERVO1_REVERSED 1
216+
SERVO1_TRIM 1500
217+
218+
pwm: => [1100, 1900]
219+
input: => [0, 1]
220+
offset: -0.5 => [-0.5, 0.5]
221+
scale: 2.0 => [-1.0, 1.0]
222+
scale: 0.524 => [-0.524, 0.524]
223+
-->
224+
<control channel="0">
225+
<jointName>zephyr::flap_left_joint</jointName>
226+
<useForce>1</useForce>
227+
<multiplier>-1.048</multiplier>
228+
<offset>-0.5</offset>
229+
<servo_min>1100</servo_min>
230+
<servo_max>1900</servo_max>
231+
<type>POSITION</type>
232+
<p_gain>10.0</p_gain>
233+
<i_gain>0</i_gain>
234+
<d_gain>0</d_gain>
235+
<i_max>0</i_max>
236+
<i_min>0</i_min>
237+
<cmd_max>2.5</cmd_max>
238+
<cmd_min>-2.5</cmd_min>
239+
</control>
240+
241+
<!--
242+
SERVO2_FUNCTION 78 (Elevon Right)
243+
SERVO2_MAX 1900
244+
SERVO2_MIN 1100
245+
SERVO2_REVERSED 1
246+
SERVO2_TRIM 1500
247+
-->
248+
<control channel="1">
249+
<jointName>zephyr::flap_right_joint</jointName>
250+
<useForce>1</useForce>
251+
<multiplier>-1.048</multiplier>
252+
<offset>-0.5</offset>
253+
<servo_min>1100</servo_min>
254+
<servo_max>1900</servo_max>
255+
<type>POSITION</type>
256+
<p_gain>10.0</p_gain>
257+
<i_gain>0</i_gain>
258+
<d_gain>0</d_gain>
259+
<i_max>0</i_max>
260+
<i_min>0</i_min>
261+
<cmd_max>2.5</cmd_max>
262+
<cmd_min>-2.5</cmd_min>
263+
</control>
264+
265+
</plugin>
266+
267+
</model>
268+
</sdf>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
3+
<model>
4+
<name>Zephyr Delta Wing With Ardupilot 10</name>
5+
<version>2.0</version>
6+
<sdf version="1.9">model.sdf</sdf>
7+
8+
<author>
9+
<name>Cole Biesemeyer</name>
10+
<email>cole.bsmr@gmail.com</email>
11+
</author>
12+
13+
<author>
14+
<name>Nate Koenig</name>
15+
<email>natekoenig@gmail.com</email>
16+
</author>
17+
18+
<description>
19+
A model of a Zephyr delta wing with Ardupilot integration.
20+
</description>
21+
22+
</model>

0 commit comments

Comments
 (0)