Added world and drone models to repo

This commit is contained in:
cesar 2022-03-04 13:29:37 -04:00
parent 30fd69b4ec
commit 859cd81e4e
45 changed files with 30729 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,2 @@
models
citadel_hill_world.world

23
airframes/4000_spiri Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# @name Generic Quadcopter
#
# @type Quadrotor x
# @class Copter
. ${R}etc/init.d/rc.mc_defaults
param set-default MC_ROLLRATE_K 2.35
param set-default MC_ROLLRATE_D 0.0032
param set-default MC_ROLLRATE_I 0.15
param set-default MC_PITCHRATE_K 2.35
param set-default MC_PITCHRATE_D 0.0032
param set-default MC_PITCHRATE_I 0.15
#param load spiri_param/Vehicle_230_Parameters.params
param set-default MPC_Z_VEL_MAX_UP 1.0
set MIXER quad_x
set PWM_OUT 1234

View File

@ -0,0 +1,22 @@
#!/bin/sh
#
# @name Generic Quadcopter
#
# @type Quadrotor x
# @class Copter
. ${R}etc/init.d/rc.mc_defaults
param set MC_ROLLRATE_K 2.35
param set MC_ROLLRATE_D 0.0030
param set MC_ROLLRATE_I 0.15
param set MC_PITCHRATE_K 2.35
param set MC_PITCHRATE_D 0.0030
param set MC_PITCHRATE_I 0.15
param set MPC_Z_VEL_MAX_UP 0.5
param set MPC_TKO_SPEED 1.0
set MIXER quad_x
set PWM_OUT 1234

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

16
models/spiri/model.config Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>spiri</name>
<version>1.0</version>
<sdf version="1.6">spiri.sdf</sdf>
<author>
<name>Riddhi</name>
<email>riddhi.dave@pleiadesrobotics.com</email>
</author>
<description>
Spiri specific drone
</description>
</model>

633
models/spiri/model.sdf Normal file
View File

@ -0,0 +1,633 @@
<?xml version="1.0" ?>
<sdf version='1.6'>
<model name='spiri'>
<link name='base'>
<pose frame=''>0 0 0 0 -0 -0</pose>
<inertial>
<pose frame=''>0 0.00268 -0.000742 0 -0 0</pose>
<mass>1.437</mass>
<inertia>
<ixx>0.1152</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.1152</iyy>
<iyz>0</iyz>
<izz>0.218</izz>
<!-- <ixx>0.003252814</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.003252814</iyy>
<iyz>0</iyz>
<izz>0.032498525</izz> -->
</inertia><!-- x= 0.032498525 y=0.003252814 z=0.031612672 -->
</inertial>
<collision name='base_collision'>
<pose frame=''>0 0 -0.02103 0 -0 0</pose>
<geometry>
<box>
<size>0.21355 0.132 0.04206</size>
</box>
</geometry>
</collision>
<visual name='base_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_base_bottom.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_top_collision_1'>
<pose frame=''>0 0 0.03025 0 -0 0</pose>
<geometry>
<box>
<size>0.21355 0.132 0.0605</size>
</box>
</geometry>
</collision>
<visual name='base_top_visual_1'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_base_top.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_LF_collision_2'>
<pose frame=''>0.112711 0.112711 -0.001 0 -0 0.785398</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_LF_visual_2'>
<pose frame=''>0.042 0.042 -0.001 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_LH_collision_3'>
<pose frame=''>-0.112711 0.112711 -0.001 0 -0 2.35619</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_LH_visual_3'>
<pose frame=''>-0.042 0.042 -0.001 0 -0 2.35619</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_RF_collision_4'>
<pose frame=''>0.112711 -0.112711 -0.001 0 0 -0.785398</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_RF_visual_4'>
<pose frame=''>0.042 -0.042 -0.001 0 0 -0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_RH_collision_5'>
<pose frame=''>-0.112711 -0.112711 -0.001 0 0 -2.35619</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_RH_visual_5'>
<pose frame=''>-0.042 -0.042 -0.001 0 0 -2.35619</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<link name='imu_link'>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose>0 0 0 0 0 0</pose>
<mass>0.015</mass>
<inertia>
<ixx>1e-05</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>1e-05</iyy>
<iyz>0</iyz>
<izz>1e-05</izz>
</inertia>
</inertial>
</link>
<joint name='imu_joint' type='revolute'>
<child>imu_link</child>
<parent>base</parent>
<axis>
<xyz>1 0 0</xyz>
<limit>
<lower>0</lower>
<upper>0</upper>
<effort>0</effort>
<velocity>0</velocity>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_LF'>
<pose frame=''>0.165037 0.165037 0.042 0 -0 0.785398</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_LF_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_LF_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_LF_to_propeller_LF' type='revolute'>
<child>propeller_LF</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_LH'>
<pose frame=''>-0.165037 0.165037 0.042 0 -0 2.35619</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_LH_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_LH_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_LH_to_propeller_LH' type='revolute'>
<child>propeller_LH</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_RF'>
<pose frame=''>0.165037 -0.165037 0.042 0 0 -0.785398</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_RF_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_RF_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_RF_to_propeller_RF' type='revolute'>
<child>propeller_RF</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_RH'>
<pose frame=''>-0.165037 -0.165037 0.042 0 0 -2.35619</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_RH_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_RH_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_RH_to_propeller_RH' type='revolute'>
<child>propeller_RH</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<model name='gps0'>
<link name='link'>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose>0 0 0 0 0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>2.1733e-06</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>2.1733e-06</iyy>
<iyz>0</iyz>
<izz>1.8e-07</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<cylinder>
<radius>0.01</radius>
<length>0.002</length>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/Black</name>
<uri>__default__</uri>
</script>
</material>
</visual>
<sensor name='gps' type='gps'>
<pose>0 0 0 0 0 0</pose>
<plugin name='gps_plugin' filename='libgazebo_gps_plugin.so'>
<robotNamespace/>
<gpsNoise>1</gpsNoise>
<gpsXYRandomWalk>2.0</gpsXYRandomWalk>
<gpsZRandomWalk>4.0</gpsZRandomWalk>
<gpsXYNoiseDensity>0.0002</gpsXYNoiseDensity>
<gpsZNoiseDensity>0.0004</gpsZNoiseDensity>
<gpsVXYNoiseDensity>0.2</gpsVXYNoiseDensity>
<gpsVZNoiseDensity>0.4</gpsVZNoiseDensity>
</plugin>
</sensor>
</link>
</model>
<joint name='gps0_joint' type='fixed'>
<parent>base</parent>
<child>gps0::link</child>
</joint>
<plugin name='rosbag' filename='libgazebo_multirotor_base_plugin.so'>
<robotNamespace/>
<linkName>base</linkName>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='front_right_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_RF_to_propeller_RF</jointName>
<linkName>propeller_RF</linkName>
<turningDirection>ccw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>0</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/0</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='back_left_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_LH_to_propeller_LH</jointName>
<linkName>propeller_LH</linkName>
<turningDirection>ccw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>1</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/1</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='front_left_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_LF_to_propeller_LF</jointName>
<linkName>propeller_LF</linkName>
<turningDirection>cw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>2</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/2</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='back_right_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_RH_to_propeller_RH</jointName>
<linkName>propeller_RH</linkName>
<turningDirection>cw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>3</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/3</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='groundtruth_plugin' filename='libgazebo_groundtruth_plugin.so'>
<robotNamespace/>
</plugin>
<plugin name='magnetometer_plugin' filename='libgazebo_magnetometer_plugin.so'>
<robotNamespace/>
<pubRate>100</pubRate>
<noiseDensity>0.0004</noiseDensity>
<randomWalk>6.4e-06</randomWalk>
<biasCorrelationTime>600</biasCorrelationTime>
<magTopic>/mag</magTopic>
</plugin>
<plugin name='barometer_plugin' filename='libgazebo_barometer_plugin.so'>
<robotNamespace/>
<pubRate>50</pubRate>
<baroTopic>/baro</baroTopic>
<baroDriftPaPerSec>0</baroDriftPaPerSec>
</plugin>
<plugin name='mavlink_interface' filename='libgazebo_mavlink_interface.so'>
<robotNamespace/>
<imuSubTopic>/imu</imuSubTopic>
<magSubTopic>/mag</magSubTopic>
<baroSubTopic>/baro</baroSubTopic>
<mavlink_addr>INADDR_ANY</mavlink_addr>
<mavlink_tcp_port>4560</mavlink_tcp_port>
<mavlink_udp_port>14560</mavlink_udp_port>
<serialEnabled>0</serialEnabled>
<serialDevice>/dev/ttyACM0</serialDevice>
<baudRate>921600</baudRate>
<qgc_addr>INADDR_ANY</qgc_addr>
<qgc_udp_port>14550</qgc_udp_port>
<sdk_addr>INADDR_ANY</sdk_addr>
<sdk_udp_port>14540</sdk_udp_port>
<hil_mode>0</hil_mode>
<hil_state_level>0</hil_state_level>
<send_vision_estimation>0</send_vision_estimation>
<send_odometry>1</send_odometry>
<enable_lockstep>1</enable_lockstep>
<use_tcp>1</use_tcp> <!--This needs to be set to 1-->
<motorSpeedCommandPubTopic>/gazebo/command/motor_speed</motorSpeedCommandPubTopic>
<control_channels>
<channel name='rotor1'>
<input_index>0</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor2'>
<input_index>1</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor3'>
<input_index>2</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor4'>
<input_index>3</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor5'>
<input_index>4</input_index>
<input_offset>1</input_offset>
<input_scaling>324.6</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
<joint_control_pid>
<p>0.1</p>
<i>0</i>
<d>0</d>
<iMax>0.0</iMax>
<iMin>0.0</iMin>
<cmdMax>2</cmdMax>
<cmdMin>-2</cmdMin>
</joint_control_pid>
<joint_name>zephyr_delta_wing::propeller_joint</joint_name>
</channel>
<channel name='rotor6'>
<input_index>5</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
<joint_name>zephyr_delta_wing::flap_left_joint</joint_name>
<joint_control_pid>
<p>10.0</p>
<i>0</i>
<d>0</d>
<iMax>0</iMax>
<iMin>0</iMin>
<cmdMax>20</cmdMax>
<cmdMin>-20</cmdMin>
</joint_control_pid>
</channel>
<channel name='rotor7'>
<input_index>6</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
<joint_name>zephyr_delta_wing::flap_right_joint</joint_name>
<joint_control_pid>
<p>10.0</p>
<i>0</i>
<d>0</d>
<iMax>0</iMax>
<iMin>0</iMin>
<cmdMax>20</cmdMax>
<cmdMin>-20</cmdMin>
</joint_control_pid>
</channel>
<channel name='rotor8'>
<input_index>7</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
</channel>
</control_channels>
</plugin>
<plugin name='rotors_gazebo_imu_plugin' filename='libgazebo_imu_plugin.so'>
<robotNamespace/>
<linkName>imu_link</linkName>
<imuTopic>/imu</imuTopic>
<gyroscopeNoiseDensity>0.00018665</gyroscopeNoiseDensity>
<gyroscopeRandomWalk>3.8785e-05</gyroscopeRandomWalk>
<gyroscopeBiasCorrelationTime>1000.0</gyroscopeBiasCorrelationTime>
<gyroscopeTurnOnBiasSigma>0.0087</gyroscopeTurnOnBiasSigma>
<accelerometerNoiseDensity>0.00186</accelerometerNoiseDensity>
<accelerometerRandomWalk>0.006</accelerometerRandomWalk>
<accelerometerBiasCorrelationTime>300.0</accelerometerBiasCorrelationTime>
<accelerometerTurnOnBiasSigma>0.196</accelerometerTurnOnBiasSigma>
</plugin>
</model>
</sdf>

634
models/spiri/spiri.sdf Normal file
View File

@ -0,0 +1,634 @@
<?xml version="1.0" ?>
<sdf version='1.6'>
<model name='spiri'>
<link name='base'>
<pose frame=''>0 0 0 0 -0 3.141</pose>
<gravity>1</gravity>
<inertial>
<pose frame=''>0 0.00268 -0.000742 0 -0 0</pose>
<mass>1.437</mass>
<inertia>
<ixx>0.1152</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.1152</iyy>
<iyz>0</iyz>
<izz>0.218</izz>
<!-- <ixx>0.003252814</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.003252814</iyy>
<iyz>0</iyz>
<izz>0.032498525</izz> -->
</inertia><!-- x= 0.032498525 y=0.003252814 z=0.031612672 -->
</inertial>
<collision name='base_collision'>
<pose frame=''>0 0 -0.02103 0 -0 0</pose>
<geometry>
<box>
<size>0.21355 0.132 0.04206</size>
</box>
</geometry>
</collision>
<visual name='base_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_base_bottom.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_top_collision_1'>
<pose frame=''>0 0 0.03025 0 -0 0</pose>
<geometry>
<box>
<size>0.21355 0.132 0.0605</size>
</box>
</geometry>
</collision>
<visual name='base_top_visual_1'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_base_top.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_LF_collision_2'>
<pose frame=''>0.112711 0.112711 -0.001 0 -0 0.785398</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_LF_visual_2'>
<pose frame=''>0.042 0.042 -0.001 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_LH_collision_3'>
<pose frame=''>-0.112711 0.112711 -0.001 0 -0 2.35619</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_LH_visual_3'>
<pose frame=''>-0.042 0.042 -0.001 0 -0 2.35619</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_RF_collision_4'>
<pose frame=''>0.112711 -0.112711 -0.001 0 0 -0.785398</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_RF_visual_4'>
<pose frame=''>0.042 -0.042 -0.001 0 0 -0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
<collision name='base_fixed_joint_lump__shank_RH_collision_5'>
<pose frame=''>-0.112711 -0.112711 -0.001 0 0 -2.35619</pose>
<geometry>
<box>
<size>0.2 0.014 0.11</size>
</box>
</geometry>
</collision>
<visual name='base_fixed_joint_lump__shank_RH_visual_5'>
<pose frame=''>-0.042 -0.042 -0.001 0 0 -2.35619</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_shank.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<link name='imu_link'>
<pose>0 0 0 0 0 0</pose>
<inertial>
<mass>0.015</mass>
<inertia>
<ixx>1e-05</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>1e-05</iyy>
<iyz>0</iyz>
<izz>1e-05</izz>
</inertia>
</inertial>
</link>
<joint name='imu_joint' type='revolute'>
<child>imu_link</child>
<parent>base</parent>
<axis>
<xyz>1 0 0</xyz>
<limit>
<lower>0</lower>
<upper>0</upper>
<effort>0</effort>
<velocity>0</velocity>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_LF'>
<pose frame=''>0.165037 0.165037 0.042 0 -0 0.785398</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_LF_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_LF_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_LF_to_propeller_LF' type='revolute'>
<child>propeller_LF</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_LH'>
<pose frame=''>-0.165037 0.165037 0.042 0 -0 2.35619</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_LH_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_LH_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_LH_to_propeller_LH' type='revolute'>
<child>propeller_LH</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_RF'>
<pose frame=''>0.165037 -0.165037 0.042 0 0 -0.785398</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_RF_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_RF_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_RF_to_propeller_RF' type='revolute'>
<child>propeller_RF</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<link name='propeller_RH'>
<pose frame=''>-0.165037 -0.165037 0.042 0 0 -2.35619</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.0005299083</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0005235333</iyy>
<iyz>0</iyz>
<izz>0.000011775</izz>
</inertia>
</inertial>
<collision name='propeller_RH_collision'>
<pose frame=''>0 0 0.009 0 -0 0</pose>
<geometry>
<box>
<size>0.033 0.25 0.018</size>
</box>
</geometry>
</collision>
<visual name='propeller_RH_visual'>
<pose frame=''>0 0 0 0 -0 0.785398</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>model://spiri/meshes/spiri_propeller.dae</uri>
</mesh>
</geometry>
</visual>
</link>
<joint name='shank_RH_to_propeller_RH' type='revolute'>
<child>propeller_RH</child>
<parent>base</parent>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1e+16</lower>
<upper>1e+16</upper>
</limit>
<dynamics>
<spring_reference>0</spring_reference>
<spring_stiffness>0</spring_stiffness>
</dynamics>
<use_parent_model_frame>1</use_parent_model_frame>
</axis>
</joint>
<model name='gps0'>
<self_collide>0</self_collide>
<link name='gps0_link'>
<pose>0 0 0.01 0 0 0</pose>
<inertial>
<pose>0 0 0 0 0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>2.1733e-06</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>2.1733e-06</iyy>
<iyz>0</iyz>
<izz>1.8e-07</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<cylinder>
<radius>0.01</radius>
<length>0.002</length>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/Black</name>
<uri>__default__</uri>
</script>
</material>
</visual>
<sensor name='gps' type='gps'>
<pose>0 0 0 0 0 0</pose>
<plugin name='gps_plugin' filename='libgazebo_gps_plugin.so'>
<robotNamespace/>
<gpsNoise>1</gpsNoise>
<gpsXYRandomWalk>2.0</gpsXYRandomWalk>
<gpsZRandomWalk>4.0</gpsZRandomWalk>
<gpsXYNoiseDensity>0.0002</gpsXYNoiseDensity>
<gpsZNoiseDensity>0.0004</gpsZNoiseDensity>
<gpsVXYNoiseDensity>0.2</gpsVXYNoiseDensity>
<gpsVZNoiseDensity>0.4</gpsVZNoiseDensity>
</plugin>
</sensor>
</link>
<joint name='gps0_joint' type='fixed'>
<parent>base</parent>
<child>gps0_link</child>
</joint>
</model>
<plugin name='rosbag' filename='libgazebo_multirotor_base_plugin.so'>
<robotNamespace/>
<linkName>base</linkName>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='front_right_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_RF_to_propeller_RF</jointName>
<linkName>propeller_RF</linkName>
<turningDirection>ccw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>0</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/0</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='back_left_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_LH_to_propeller_LH</jointName>
<linkName>propeller_LH</linkName>
<turningDirection>ccw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>1</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/1</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='front_left_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_LF_to_propeller_LF</jointName>
<linkName>propeller_LF</linkName>
<turningDirection>cw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>2</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/2</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='back_right_motor_model' filename='libgazebo_motor_model.so'>
<robotNamespace/>
<jointName>shank_RH_to_propeller_RH</jointName>
<linkName>propeller_RH</linkName>
<turningDirection>cw</turningDirection>
<timeConstantUp>0.0125</timeConstantUp>
<timeConstantDown>0.025</timeConstantDown>
<maxRotVelocity>1100</maxRotVelocity>
<motorConstant>5.84e-06</motorConstant>
<momentConstant>0.06</momentConstant>
<commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
<motorNumber>3</motorNumber>
<rotorDragCoefficient>0.000175</rotorDragCoefficient>
<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
<motorSpeedPubTopic>/motor_speed/3</motorSpeedPubTopic>
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
</plugin>
<plugin name='groundtruth_plugin' filename='libgazebo_groundtruth_plugin.so'>
<robotNamespace/>
</plugin>
<plugin name='magnetometer_plugin' filename='libgazebo_magnetometer_plugin.so'>
<robotNamespace/>
<pubRate>100</pubRate>
<noiseDensity>0.0004</noiseDensity>
<randomWalk>6.4e-06</randomWalk>
<biasCorrelationTime>600</biasCorrelationTime>
<magTopic>/mag</magTopic>
</plugin>
<plugin name='barometer_plugin' filename='libgazebo_barometer_plugin.so'>
<robotNamespace/>
<pubRate>50</pubRate>
<baroTopic>/baro</baroTopic>
<baroDriftPaPerSec>0</baroDriftPaPerSec>
</plugin>
<plugin name='mavlink_interface' filename='libgazebo_mavlink_interface.so'>
<robotNamespace/>
<imuSubTopic>/imu</imuSubTopic>
<magSubTopic>/mag</magSubTopic>
<baroSubTopic>/baro</baroSubTopic>
<mavlink_addr>INADDR_ANY</mavlink_addr>
<mavlink_tcp_port>4560</mavlink_tcp_port>
<mavlink_udp_port>14560</mavlink_udp_port>
<serialEnabled>0</serialEnabled>
<serialDevice>/dev/ttyACM0</serialDevice>
<baudRate>921600</baudRate>
<qgc_addr>INADDR_ANY</qgc_addr>
<qgc_udp_port>14550</qgc_udp_port>
<sdk_addr>INADDR_ANY</sdk_addr>
<sdk_udp_port>14540</sdk_udp_port>
<hil_mode>0</hil_mode>
<hil_state_level>0</hil_state_level>
<send_vision_estimation>0</send_vision_estimation>
<send_odometry>1</send_odometry>
<enable_lockstep>1</enable_lockstep>
<use_tcp>1</use_tcp> <!--This needs to be set to 1-->
<motorSpeedCommandPubTopic>/gazebo/command/motor_speed</motorSpeedCommandPubTopic>
<control_channels>
<channel name='rotor1'>
<input_index>0</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor2'>
<input_index>1</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor3'>
<input_index>2</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor4'>
<input_index>3</input_index>
<input_offset>0</input_offset>
<input_scaling>1000</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>100</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>
<channel name='rotor5'>
<input_index>4</input_index>
<input_offset>1</input_offset>
<input_scaling>324.6</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
<joint_control_pid>
<p>0.1</p>
<i>0</i>
<d>0</d>
<iMax>0.0</iMax>
<iMin>0.0</iMin>
<cmdMax>2</cmdMax>
<cmdMin>-2</cmdMin>
</joint_control_pid>
<joint_name>zephyr_delta_wing::propeller_joint</joint_name>
</channel>
<channel name='rotor6'>
<input_index>5</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
<joint_name>zephyr_delta_wing::flap_left_joint</joint_name>
<joint_control_pid>
<p>10.0</p>
<i>0</i>
<d>0</d>
<iMax>0</iMax>
<iMin>0</iMin>
<cmdMax>20</cmdMax>
<cmdMin>-20</cmdMin>
</joint_control_pid>
</channel>
<channel name='rotor7'>
<input_index>6</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
<joint_name>zephyr_delta_wing::flap_right_joint</joint_name>
<joint_control_pid>
<p>10.0</p>
<i>0</i>
<d>0</d>
<iMax>0</iMax>
<iMin>0</iMin>
<cmdMax>20</cmdMax>
<cmdMin>-20</cmdMin>
</joint_control_pid>
</channel>
<channel name='rotor8'>
<input_index>7</input_index>
<input_offset>0</input_offset>
<input_scaling>0.524</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>position</joint_control_type>
</channel>
</control_channels>
</plugin>
<plugin name='rotors_gazebo_imu_plugin' filename='libgazebo_imu_plugin.so'>
<robotNamespace/>
<linkName>imu_link</linkName>
<imuTopic>/imu</imuTopic>
<gyroscopeNoiseDensity>0.00018665</gyroscopeNoiseDensity>
<gyroscopeRandomWalk>3.8785e-05</gyroscopeRandomWalk>
<gyroscopeBiasCorrelationTime>1000.0</gyroscopeBiasCorrelationTime>
<gyroscopeTurnOnBiasSigma>0.0087</gyroscopeTurnOnBiasSigma>
<accelerometerNoiseDensity>0.00186</accelerometerNoiseDensity>
<accelerometerRandomWalk>0.006</accelerometerRandomWalk>
<accelerometerBiasCorrelationTime>300.0</accelerometerBiasCorrelationTime>
<accelerometerTurnOnBiasSigma>0.196</accelerometerTurnOnBiasSigma>
</plugin>
</model>
</sdf>

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>Spiri with Tether Attached</name>
<version>1.0</version>
<sdf version="1.6">spiri_with_tether.sdf</sdf>
<author>
<name>Cesar</name>
<email>cesar.rodriguez@spirirobotics.com</email>
</author>
<description>
Spiri drone with tether attached
</description>
</model>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,391 @@
{#--------------------------------SDF generator for Spiri with Tether Gazebo model---------------------------#}
{#------------------------------Retrieved from:https://github.com/RigidWing/sitl_gazebo----------------------#}
{#---------------------------------Maintained by Kitepower BV: info@kitepower.nl-----------------------------#}
{#--------------------------------The parameters bellow are the ones to be tweaked---------------------------#}
{#--------------------------------------------:Tweakable parameters:-----------------------------------------#}
{%- set number_elements = 1 -%}
{%- set tl = 1 -%} {#- tl: length of the tether element (meters) -#}
{%- set cr = 0.005 -%} {#- cr: radius of the tether element (meters) -#}
{%- set cr_v = 0.005 -%} {#- cr_v: radius of the tether element visual (meters) -#}
{%- set sr = 0.01 -%} {#- sr: element joint radius (sphere) (meters) -#}
{%- set m = 0.005 * tl -%} {#- m: mass of the element (kg), given the length -#}
{%- set cda = 1.253582 -%} {#- cda: the ratio of the drag coefficient before stall. -#}
{%- set cda_stall = 1.4326647564469914 -%} {#- cda_stall: the ratio of the drag coefficient after stall. -#}
{%- set damping = 0.05 -%} {#- Model damping -#}
{%- set friction = 0.0 -%} {#- Friction of the model relative to the world -#}
{%- set tether_stiffness = 0.05 -%} {#- Tether stiffness -#}
{%- set joint_stiffness = 0.05 -%} {#- Joint stiffness, i.e where tether attaches to drone -#}
{%- set spring_reference = 0.0 -%} {#- Reference where the spring forces are applied -#}
{%- set element_color = 'White' -%} {#- Color of the tether elements -#}
{%- set joint_color = 'Red' -%} {#- Color of the tether element joints -#}
{%- set vehicle_spawn_point_y = 0.0 -%} {#- Y coordinate of vehicle spawn point -#}
{%- set debug = 0 -%} {#- Used for debugging tether joints -#}
{#----------------------------------------------------------------------------------------------------------#}
{#---------------------------------------------:Payload parameters:-----------------------------------------#}
{#----------------------------------------------------------------------------------------------------------#}
{%- set payload_m = 0.5 -%} {#- Payload mass (kg) -#}
{%- set pr = 0.025 -%} {#- Payload radius (meters). Has to be less than FULL tether length -#}
{#-----------------------------------------------------------------------------------------------------------#}
{#----------------------------------------------:Spiri parameters:-------------------------------------------#}
{#-----------------------------------------------------------------------------------------------------------#}
{%- set spiri_collision_x = 0.21355 -%}
{%- set spiri_collision_y = 0.132 -%}
{%- set spiri_collision_z = 0.04206 -%}
{%- set theta = 1.5707 -%}
{%- set yaw = 0 -%} {#- Necessary to spawn magnometer and Spiri in correct orientation -#}
{#----------------------------------------------------------------------------------------------------------#}
{#---------------------------------------------:Computed parameters:----------------------------------------#}
{#----------------------------------------------------------------------------------------------------------#}
{%- set last_elem = number_elements |int - 1 -%}
{%- set full_tether_len = number_elements * tl -%}
{%- set vehicle_spawn_point_x = full_tether_len -%}
{#- Check if we are in debug mode -#}
{%- if debug == 1 -%}
{%- set vehicle_spawn_point_z = 4.0 -%} {#- Used to spawn in desired z location -#}
{%- set pload_spawn_x = 0 -%}
{%- set pload_spawn_y = 0 -%}
{%- set pload_spawn_z = vehicle_spawn_point_z - tl -%}
{%- set pload_joint_x = 0 -%}
{%- set pload_joint_y = 0 -%}
{%- set pload_joint_z = -tl/2 -%}
{%- else -%}
{%- set vehicle_spawn_point_z = 0.0 -%}
{%- set pload_spawn_x = full_tether_len -%}
{%- set pload_spawn_y = 0 -%}
{%- set pload_spawn_z = 0 -%}
{%- set pload_joint_x = 0 -%}
{%- set pload_joint_y = 0 -%}
{%- set pload_joint_z = tl/2 -%}
{%- endif -%}
{%- set tether_pos = vehicle_spawn_point_z - tl/2 -%} {#- Spawns tether vertically -#}
{#----------------------------------------------------------------------------------------------------------#}
{#-----------------------------------------------:MACROS:---------------------------------------------------#}
{#----------------------------------------------------------------------------------------------------------#}
{%- macro payload(payload_m, n, pr, x, y, z, j_x, j_y, j_z) -%}
<!-- PAYLOAD -->
<model name='mass'>
<link name="payload">
<pose> {{ x }} {{ y }} {{ z }} 0 0 0</pose>
<!--pose>0 0 0 0 0 0</pose-->
<gravity>1</gravity>
<inertial>
<mass>{{ payload_m }}</mass>
</inertial>
<collision name="payload_collision">
<pose>0 0 0 0 0 0</pose>
<geometry>
<sphere>
<radius>{{ pr }}</radius>
</sphere>
</geometry>
</collision>
<visual name="payload_visual">
<pose>0 0 0 0 0 0</pose>
{{ sphere(pr) }}
</visual>
</link>
<!-- Tether to Payload Connection -->
{%- if number_elements == 1 %}
<joint name="tether_mass_connection" type="fixed">
{%- else -%}
{%- set k = 'ball' -%}
{#- <joint name="tether_mass_connection" type="ball"> -#}
<joint name="tether_mass_connection" type="ball">
{% endif %}
<parent>payload</parent>
<child>link_{{n}}</child>
{#- joint_param(tl, damping, friction, joint_stiffness, spring_reference, k) #}
<pose>{{ j_x }} {{ j_y }} {{ j_z }} 0 0 0</pose>
<physics>
<ode></ode>
<provide_feedback>true</provide_feedback>
</physics>
</joint>
{%- if n is number -%}
<plugin name="ft_sensor_payload" filename="libgazebo_ros_ft_sensor.so">
<updateRate>1.0</updateRate>
<topicName>ft_sensor_topic/payload</topicName>
<jointName>tether_mass_connection</jointName>
</plugin>
{%- endif %}
</model>
{%- endmacro -%}
{%- macro cylinder(tl, cr_v) -%}
<geometry>
<cylinder>
<length>{{tl}}</length>
<radius>{{cr_v}}</radius>
</cylinder>
</geometry>
{%- endmacro -%}
{%- macro sphere(sr) -%}
<geometry>
<sphere>
<radius>{{sr}}</radius>
</sphere>
</geometry>
{%- endmacro -%}
{%- macro inertial(m) -%}
{#- A note about the inertial tensor matrix - It should be as below -#}
{#- set izz = m/2*cr**2 -#}
{#- set ixx = m/12*tl**2 + m/4*cr**2 -#}
{#- set iyy = m/12*tl**2 + m/4*cr**2 -#}
{#- but seems to segfault Gazebo when changing the values of the element specs -#}
{%- set izz = 0.01 -%}
{%- set ixx = 0.01 -%}
{%- set iyy = 0.01 -%}
<inertial>
<mass>{{m}}</mass>
<inertia>
<ixx>{{ixx}}</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>{{iyy}}</iyy>
<iyz>0</iyz>
<izz>{{izz}}</izz>
</inertia>
</inertial>
{%- endmacro -%}
{%- macro collision(tl, cr) -%}
<collision name="collision">
<pose>{{tl / 2 - tl / 2}} 0 0 0 0 0</pose>
{{ cylinder(tl, cr) }}
<surface>
<contact>
<ode>
<min_depth>0.00005</min_depth>
</ode>
</contact>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
</ode>
</friction>
</surface>
</collision>
{%- endmacro -%}
{%- macro element_material(element_color) -%}
<material>
<script>
<name>Gazebo/{{element_color}}</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
{%- endmacro -%}
{%- macro joint_material(joint_color) -%}
<material>
<script>
<name>Gazebo/{{joint_color}}</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
{%- endmacro -%}
{%- macro element_visual(tl, cr_v, element_color) -%}