<?xml version='1.0'?>
<sdf version='1.4'>
	<model name="ardrone">
		<pose>0 0 .1 0 0 0</pose>

		<link name="chassis">
			<velocity_decay>
				<linear>0.001</linear>
			</velocity_decay>
			
		
			<inertial><!-- Converted to SI from Paparazzi's ARDrone model for JSBsim -->
				<mass>0.4</mass>
				<inertia>
					<ixx> 0.00678 </ixx>
					<iyy> 0.00678 </iyy>
					<izz> 0.01356 </izz>
					<ixy> 0. </ixy>
					<ixz> 0. </ixz>
					<iyz> 0. </iyz>
				</inertia>
			</inertial>

			<collision name="collision">
				<geometry>
					<box>
						<size>0.4 0.4 0.05</size>
					</box>
				</geometry>
			</collision>

			<visual name="visual">
				<geometry>
					<box>
						<size>0.2 0.2 0.05</size>
					</box>
				</geometry>
			</visual>
			
			<sensor name="contactsensor" type="contact">
				<contact>
					<collision>collision</collision>
				</contact>
			</sensor>
		</link>

		<!-- MOTORS -->
		<link name="nw_motor">
			<pose>0.12 0.12 0 0 0 0</pose>
			<inertial>
				<mass>0.01</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<visual name="visual">
				<geometry>
					<cylinder>
						<radius>0.10</radius>
						<length>0.07</length>
					</cylinder>
				</geometry>
			</visual>
		</link>

		<joint type="fixed" name="nw_motor_joint">
			<parent>chassis</parent>
			<child>nw_motor</child>
		</joint>

		<link name="se_motor">
			<pose>-0.12 -0.12 0 0 0 0</pose>
			<inertial>
				<mass>0.01</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<visual name="visual">
				<geometry>
					<cylinder>
						<radius>0.10</radius>
						<length>0.07</length>
					</cylinder>
				</geometry>
			</visual>
		</link>

		<joint type="fixed" name="se_motor_joint">
			<parent>chassis</parent>
			<child>se_motor</child>
		</joint>

		<link name="ne_motor">
			<pose>0.12 -0.12 0 0 0 0</pose>
			<inertial>
				<mass>0.01</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<visual name="visual">
				<geometry>
					<cylinder>
						<radius>0.10</radius>
						<length>0.07</length>
					</cylinder>
				</geometry>
			</visual>
		</link>

		<joint type="fixed" name="ne_motor_joint">
			<parent>chassis</parent>
			<child>ne_motor</child>
		</joint>

		<link name="sw_motor">
			<pose>-0.12 0.12 0 0 0 0</pose>
			<inertial>
				<mass>0.01</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<visual name="visual">
				<geometry>
					<cylinder>
						<radius>0.10</radius>
						<length>0.07</length>
					</cylinder>
				</geometry>
			</visual>
		</link>

		<joint type="fixed" name="sw_motor_joint">
			<parent>chassis</parent>
			<child>sw_motor</child>
		</joint>


		<!-- CAMERAS -->

		<link name="front_camera">
			<pose>0.15 0 0 0 0 0</pose>
			<inertial>
				<mass>0.001</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<sensor type="camera" name="front_camera">
				<update_rate>30.0</update_rate>
				<camera name="front_camera">
					<horizontal_fov>1.3962634</horizontal_fov>
					<image>
						<width>1280</width>
						<height>720</height>
						<format>R8G8B8</format>
					</image>
					<clip>
						<near>0.02</near>
						<far>300</far>
					</clip>
					<noise>
						<type>gaussian</type>
						<!-- Noise is sampled independently per pixel on each frame. That pixel's 
							noise value is added to each of its color channels, which at that point lie 
							in the range [0,1]. -->
						<mean>0.0</mean>
						<stddev>0.007</stddev>
					</noise>
				</camera>
			</sensor>
		</link>
		
		<joint name="front_camera_joint" type="fixed">
			<parent>chassis</parent>
			<child>front_camera</child>
		</joint>
		
		<link name="bottom_camera">
			<pose>0 0 -.03 0 1.57 0</pose>
			<inertial>
				<mass>0.001</mass>
				<inertia>
					<ixx>0.0001</ixx>
					<iyy>0.0001</iyy>
					<izz>0.0001</izz>
					<ixy>0</ixy>
					<iyz>0</iyz>
					<ixz>0</ixz>
				</inertia>
			</inertial>
			<sensor type="camera" name="bottom_camera">
				<update_rate>30.0</update_rate>
				<camera name="bottom_camera">
					<horizontal_fov>1.3962634</horizontal_fov>
					<image>
						<width>320</width>
						<height>240</height>
						<format>R8G8B8</format>
					</image>
					<clip>
						<near>0.02</near>
						<far>300</far>
					</clip>
					<noise>
						<type>gaussian</type>
						<!-- Noise is sampled independently per pixel on each frame. That pixel's 
							noise value is added to each of its color channels, which at that point lie 
							in the range [0,1]. -->
						<mean>0.0</mean>
						<stddev>0.007</stddev>
					</noise>
				</camera>
			</sensor>
		</link>
		
		<joint name="bottom_camera_joint" type="fixed">
			<parent>chassis</parent>
			<child>bottom_camera</child>
		</joint>
	</model>
</sdf>
