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) -%}
{%- set x = tl * 0.5 -%}
<visual name="element_visual">
<pose>0 0 0 0 0 0</pose>
{{ cylinder(tl, cr_v) }}
{{ element_material(element_color) }}
</visual>
{%- endmacro -%}
{%- macro sphere_visual(sr, joint_color) -%}
<visual name="sphere_visual">
<pose> 0 0 {{ tl / -2 }} 0 0 0 </pose>
{{ sphere(sr) }}
{{ joint_material(joint_color) }}
</visual>
{%- endmacro -%}
{%- macro link(n, x, y, z, theta, m, tl, cr, cr_v, sr, element_color, joint_color) -%}
{% if debug == 1 %}
<model name="tether">
{%- endif %}
<link name="link_{{n}}">
<gravity>true</gravity>
<pose>{{x}} {{y}} {{z}} 0.0 {{theta}} 0.0</pose>
{{ inertial(m) }}
{%- if n != 0 and n != "spiri_attch_fixed" %}
{{ collision(tl, cr) }}
{{ element_visual(tl, cr_v, element_color) }}
{%- endif -%}
{%- if n != 0 -%}
{{ sphere_visual(sr, joint_color) }}
{%- endif %}
</link>
{%- endmacro %}
{%- macro joint(k, damping, friction, joint_stiffness, spring_reference, joint_type, number_elements) -%}
{%- if k is number -%}
{%- set link_n = k - 1 -%}
<joint name="joint_{{k}}" type="{{joint_type}}">
<child>link_{{k}}</child>
<parent>link_{{link_n}}</parent>
{{ joint_param(tl, damping, friction, tether_stiffness, spring_reference, k) }}
{%- elif number_elements == 1 -%}
{%- else -%}
{%- set link_n = 1 -%}
<joint name="joint_{{k}}" type="{{joint_type}}">
<child>link_{{k}}</child>
<parent>link_{{link_n}}</parent>
{{ joint_param(tl, damping, friction, tether_stiffness, spring_reference, k) }}
{%- endif %}
{%- endmacro -%}
{%- macro joint_param(tl, damping, friction, joint_stiffness, spring_reference, k) -%}
{%- if k is number -%}
<pose>0 0 -{{ tl/2 }} 0 0 0 </pose>
{%- else -%}
<pose>0 0 {{ tl/2 }} 0 0 0 </pose>
{%- endif %}
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>{{damping}}</damping>
<friction>{{friction}}</friction>
<joint_stiffness>{{joint_stiffness}}</joint_stiffness>
<spring_reference>{{spring_reference}}</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>{{damping}}</damping>
<friction>{{friction}}</friction>
<joint_stiffness>{{joint_stiffness}}</joint_stiffness>
<spring_reference>{{spring_reference}}</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
{%- if k is not number -%}
<provide_feedback>true</provide_feedback>
{%- endif -%}
</physics>
</joint>
{%- endmacro -%}
{%- macro lift_drag(n, tl, cr) -%}
{%- set area = 2 * cr * tl -%}
<plugin name="link_{{n}}_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>{{cda}}</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>{{cda_stall}}</cda_stall>
<useConstantDragCoefficient>true</useConstantDragCoefficient>
<cp>{{tl/2}} {{cr}} {{cr}}</cp>
<area>{{area}}</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_{{n}}</link_name>
</plugin>
{%- endmacro -%}
{#- <!-- Creates the final link - Where payload is attached(?) --> -#}
{%- macro final_tether(tl) -%}
{%- if debug == 1 -%}
{{ link("spiri_attch", 0, 0, tether_pos, 0, m, tl, cr, cr_v, sr, element_color, joint_color) }}
{{ lift_drag("spiri_attch", tl, cr) }}
{{ joint("spiri_attch", damping, friction, joint_stiffness, spring_reference, "universal", number_elements) }}
{%- else -%}
{%- set lose_x = tl/2 -%}
{{ link("spiri_attch", tl/2, vehicle_spawn_point_y, 0, theta, m, tl, cr, cr_v, sr, element_color, joint_color) }}
{{ lift_drag("spiri_attch", tl, cr) }}
{{ joint("spiri_attch", damping, friction, joint_stiffness, spring_reference, "universal", number_elements) }}
{%- endif -%}
{%- if debug == 1 -%}
</model>
{%- endif -%}
{%- endmacro -%}
{#- <!-- Used to change attachment joint of tether and drone --> -#}
{%- macro joint_type(j_type) -%}
{%- if j_type == 'ball' -%}
<joint name="tether_to_spiri_joint" type="ball">
<child>link_spiri_attch</child>
<parent>spiri::base</parent>
{#- joint_param(tl, damping, friction, joint_stiffness, spring_reference, 1) -#}
{% if debug == 1 %}
<pose>0 0 {{ tl/2 }} 0 0 0 </pose>
{%- else -%}
<pose>0 0 -{{ tl/2 }} 0 0 0 </pose>
{% endif %}
<physics>
<ode></ode>
<provide_feedback>true</provide_feedback>
</physics>
</joint>
{%- else -%}
<joint name="tether_to_spiri_joint" type="universal">
<child>link_spiri_attch</child>
<parent>spiri::base</parent>
{{ joint_param(tl, damping, friction, joint_stiffness, spring_reference, 1) }}
{%- endif -%}
{%- endmacro -%}
{#----------------------------------------------------------------------------------------------------------#}
{#-----------------------------------------------:SDF GENERATION:-------------------------------------------#}
{#----------------------------------------------------------------------------------------------------------#}
<!-- DO NOT EDIT: Generated from spiri_with_tether.sdf.jinja -->
<!-- tl = {{tl}} num. of el. = {{number_elements}} payload sz: {{pr}}-->
<sdf version="1.5">
<model name="spiri_with_tether">
<pose> 0 0 0 0.0 0.0 0.0</pose> {# only have to change this to change spawn location #}
<include>
<uri>model://spiri</uri>
<pose>0.0 0.0 {{ vehicle_spawn_point_z }} 0.0 0.0 {{ yaw }}</pose>
<static>{{ debug }}</static>
</include>
{{joint_type('ball')}}
<plugin name="ft_sensor_spiri" filename="libgazebo_ros_ft_sensor.so">
<updateRate>1.0</updateRate>
<topicName>ft_sensor_topic/spiri</topicName>
<jointName>tether_to_spiri_joint</jointName>
</plugin>
{#- ---------- CREATE TETHER LINKS -------- -#}
{{ final_tether(tl) }}
{%- for n in range(1, number_elements) -%}
{%- set x = (tl / 2 + (n*tl)) -%}
{{ link(n, x, vehicle_spawn_point_y, 0.0, theta, m, tl, cr, cr_v, sr, element_color, joint_color) }}
{{ lift_drag(n, tl, cr) }}
{%- endfor -%}
{%- for k in range(2, number_elements) -%}
{{ joint(k, damping, friction, tether_stiffness, spring_reference, "universal", number_elements) }}
{% endfor %}
{#------------- PAYLOAD -----------#}
{%- if number_elements == 1 -%}
{%- set n = "spiri_attch" -%}
{%- else -%}
{%- set n = number_elements - 1 -%}
{% endif %} {{ payload(payload_m,n,pr,pload_spawn_x,pload_spawn_y,pload_spawn_z,pload_joint_x,pload_joint_y,pload_joint_z) }}
</model>
</sdf>
<!-- vim: set et ft=xml fenc=utf-8 ff=unix sts=0 sw=2 ts=2 : -->

View File

@ -0,0 +1,13 @@
<?xml version='1.0'?>
<model>
<name>tether</name>
<version>1.0.0</version>
<sdf version='1.5'>tether-gen.sdf</sdf>
<author>
<name>Nuno Marques</name>
<email>n.marques21@hotmail.com</email>
</author>
<description>
This model approximates a tether cord.
</description>
</model>

2249
models/tether/model.sdf Normal file

File diff suppressed because it is too large Load Diff

264
models/tether/tether.sdf Normal file
View File

@ -0,0 +1,264 @@
<?xml version="1.0" ?>
<!-- DO NOT EDIT: Generated from tether.sdf.jinja -->
<sdf version="1.5">
<model name="tether">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
<link name="link_0">
<gravity>true</gravity>
<pose>-0.085 0.0 0.0 0.0 0.0 0.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_0_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_0</link_name>
</plugin>
<link name="link_y_left">
<gravity>true</gravity>
<pose>-0.085 0.0 0.0 0.0 0.0 -9.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><collision name="collision">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<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>
<visual name="element_visual">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/White</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_y_left_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_y_left</link_name>
</plugin>
<link name="link_y_right">
<gravity>true</gravity>
<pose>-0.085 0 0.0 0.0 0.0 9.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><collision name="collision">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<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>
<visual name="element_visual">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/White</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_y_right_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_y_right</link_name>
</plugin>
<joint name="joint_y_left" type="universal">
<child>link_0</child>
<parent>link_y_left</parent>
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
</physics>
</joint>
<joint name="joint_y_right" type="universal">
<child>link_0</child>
<parent>link_y_right</parent>
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
</physics>
</joint>
<joint name="fixed_to_world" type="fixed">
<child>link_0</child>
<parent>world</parent>
</joint>
</model>
</sdf>

View File

@ -0,0 +1,223 @@
{#-------------------SDF generator for Tether Gazebo model--------------------#}
{#--------------The parameters bellow are the ones to be tweaked--------------#}
{#--------------------------:Tweakable parameters:----------------------------#}
{%- set number_elements = 1 -%}
{%- set last_elem = number_elements |int - 1 -%}
{%- set cl = 0.17 -%} {#- cl: length of the element (meters) -#}
{%- set cr = 0.001 -%} {#- cr: radius of the element (meters) -#}
{%- set sr = 0.009 -%} {#- sr: element joint radius (sphere) (meters) -#}
{%- set y_el = 0.2 -%} {#- y_el: length of the Y elements (meters) -#}
{%- set y_tetha = 18 -%} {#- y_tetha: angle between the Y elements (degrees)-#}
{%- set m = 0.03 * cl -%} {#- m: mass of the element (kg), given the length -#}
{%- set damping = 0.05 -%}
{%- set friction = 0.0 -%}
{%- set spring_stiffness = 0.01 -%}
{%- set spring_reference = 0.0 -%}
{%- set element_color = 'White' -%}
{%- set joint_color = 'Red' -%}
{#----------------------------------------------------------------------------#}
{%- macro cylinder(cl, cr) -%}
<geometry>
<cylinder>
<length>{{cl}}</length>
<radius>{{cr}}</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 bellow -#}
{#- {%- set izz = m/2*cr**2 -%} -#}
{#- {%- set ixx = m/12*cl**2 + m/4*cr**2 -%} -#}
{#- {%- set iyy = m/12*cl**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(cl, cr) -%}
<collision name="collision">
<pose>0.1 0 0 0 1.570790 0</pose>
{{ cylinder(cl, 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(cl, cr, element_color) -%}
{%- set x = cl * 0.5 -%}
<visual name="element_visual">
<pose>{{x}} 0 0 0 1.570790 0</pose>
{{ cylinder(cl, cr) }}
{{ element_material(element_color) }}
</visual>
{%- endmacro -%}
{%- macro sphere_visual(sr, sphere_clor) -%}
<visual name="sphere_visual">
{{ sphere(sr) }}
{{ joint_material(joint_color) }}
</visual>
{%- endmacro -%}
{%- macro link(n, x, y, z, yaw, m, cl, cr, sr, element_color, joint_color) -%}
<link name="link_{{n}}">
<gravity>true</gravity>
<pose>{{x}} {{y}} {{z}} 0.0 0.0 {{yaw}}</pose>
{{ inertial(m) }}
{%- if n != last_elem -%}
{{ collision(cl, cr) }}
{{ element_visual(cl, cr, element_color) }}
{%- endif -%}
{{ sphere_visual(sr, joint_color) }}
</link>
{%- endmacro %}
{%- macro joint(k, damping, friction, spring_stiffness, spring_reference) -%}
{%- if k is number -%}
{%- set link_n = k - 1 -%}
<joint name="joint_{{k}}" type="universal">
<child>link_{{k}}</child>
<parent>link_{{link_n}}</parent>
{%- else -%}
{%- set link_n = 0 -%}
<joint name="joint_{{k}}" type="universal">
<child>link_{{link_n}}</child>
<parent>link_{{k}}</parent>
{%- endif %}
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>{{damping}}</damping>
<friction>{{friction}}</friction>
<spring_stiffness>{{spring_stiffness}}</spring_stiffness>
<spring_reference>{{spring_reference}}</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>{{damping}}</damping>
<friction>{{friction}}</friction>
<spring_stiffness>{{spring_stiffness}}</spring_stiffness>
<spring_reference>{{spring_reference}}</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
</physics>
</joint>
{%- endmacro -%}
{%- macro lift_drag(n, cl, cr) -%}
{%- set area = 2 * cr * cl -%}
<plugin name="link_{{n}}_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>{{area}}</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_{{n}}</link_name>
</plugin>
{%- endmacro %}
{%- macro y_element(cl, y_el, y_tetha) %}
{%- set x_l = - cl / 2 -%}
{%- set y_l = 0.0 -%}
{%- set z_l = 0.0 -%}
{%- set yaw_l = - y_tetha / 2 -%}
{{ link("y_left", x_l, y_l, z_l, yaw_l, m, y_el, cr, sr, element_color, joint_color) }}
{{ lift_drag("y_left", cl, cr) }}
{%- set x_r = - cl / 2 -%}
{%- set y_r = 0 -%}
{%- set z_r = 0.0 -%}
{%- set yaw_r = y_tetha / 2 %}
{{ link("y_right", x_r, y_r, z_r, yaw_r, m, y_el, cr, sr, element_color, joint_color) }}
{{ lift_drag("y_right", cl, cr) }}
{{ joint("y_left", damping, friction, spring_stiffness, spring_reference) }}
{{ joint("y_right", damping, friction, spring_stiffness, spring_reference) }}
{%- endmacro -%}
<?xml version="1.0" ?>
<!-- DO NOT EDIT: Generated from tether.sdf.jinja -->
<sdf version="1.5">
<model name="tether">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
{% for n in range(number_elements) -%}
{%- set x = n * cl / 2 + ( n - 1) * cl / 2 -%}
{%- set y = 0.0 -%}
{%- set z = 0.0 -%}
{%- set yaw = 0.0 -%}
{{ link(n, x, y, z, yaw, m, cl, cr, sr, element_color, joint_color) }}
{{ lift_drag(n, cl, cr) }}
{% endfor -%}
{{ y_element(cl, y_el, y_tetha) }}
{% for k in range(1, number_elements) -%}
{{ joint(k, damping, friction, spring_stiffness, spring_reference) }}
{% endfor -%}
<joint name="fixed_to_world" type="fixed">
<child>link_{{last_elem}}</child>
<parent>world</parent>
</joint>
</model>
</sdf>

View File

@ -0,0 +1,264 @@
<?xml version="1.0" ?>
<!-- DO NOT EDIT: Generated from tether.sdf.jinja -->
<sdf version="1.5">
<model name="tether">
<pose>0.0 0.0 0.0 0.0 0.0 0.0</pose>
<link name="link_0">
<gravity>true</gravity>
<pose>-0.085 0.0 0.0 0.0 0.0 0.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_0_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_0</link_name>
</plugin>
<link name="link_y_left">
<gravity>true</gravity>
<pose>-0.085 0.0 0.0 0.0 0.0 -9.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><collision name="collision">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<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>
<visual name="element_visual">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/White</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_y_left_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_y_left</link_name>
</plugin>
<link name="link_y_right">
<gravity>true</gravity>
<pose>-0.085 0 0.0 0.0 0.0 9.0</pose>
<inertial>
<mass>0.0051</mass>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial><collision name="collision">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<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>
<visual name="element_visual">
<pose>0.1 0 0 0 1.570790 0</pose>
<geometry>
<cylinder>
<length>0.2</length>
<radius>0.001</radius>
</cylinder>
</geometry>
<material>
<script>
<name>Gazebo/White</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual><visual name="sphere_visual">
<geometry>
<sphere>
<radius>0.009</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
<uri>file://media/materials/scripts/gazebo.material</uri>
</script>
</material>
</visual>
</link>
<plugin name="link_y_right_drag" filename="libLiftDragPlugin.so">
<robotNamespace></robotNamespace>
<a0>0</a0>
<cla>0</cla>
<cda>1.2535816618911175</cda>
<alpha_stall>0</alpha_stall>
<cda_stall>1.4326647564469914</cda_stall>
<cp>0 0 0</cp>
<area>0.00034</area>
<air_density>1.2041</air_density>
<forward>0 1 0</forward>
<upward>0 0 1</upward>
<link_name>link_y_right</link_name>
</plugin>
<joint name="joint_y_left" type="universal">
<child>link_0</child>
<parent>link_y_left</parent>
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
</physics>
</joint>
<joint name="joint_y_right" type="universal">
<child>link_0</child>
<parent>link_y_right</parent>
<axis>
<xyz>0 1 0</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis>
<axis2>
<xyz>0 0 1</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
<spring_stiffness>0.01</spring_stiffness>
<spring_reference>0.0</spring_reference>
</dynamics>
<use_parent_model_frame>true</use_parent_model_frame>
</axis2>
<physics>
<ode>
<cfm_damping>1</cfm_damping>
</ode>
</physics>
</joint>
<joint name="fixed_to_world" type="fixed">
<child>link_0</child>
<parent>world</parent>
</joint>
</model>
</sdf>

View File

@ -38,6 +38,7 @@ STEP 1) Installing ROS Melodic
cd ~/catkin_ws
sudo ./src/mavros/mavros/scripts/install_geographiclib_datasets.sh
- BUILD SOURCE
cd ~/catkin_ws
catkin build
@ -47,12 +48,14 @@ STEP 2) PX4 Environment Development
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
- RUN UBUNTU.SH
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
Restart computer after it is done
- BUILD ROS/GAZEBO: Gets Gazebo9
wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_ros_melodic.sh
bash ubuntu_sim_ros_melodic.sh
- Download QGroundControl from:
https://docs.qgroundcontrol.com/master/en/releases/daily_builds.html
- Build jMAVSim and Gazebo
cd ~/PX4-Autopilot
make px4_sitl jmavsim
%%% May need to open QGroundControl for it to work %%%
make px4_sitl gazebo
@ -85,9 +88,10 @@ STEP 3) This is Cesar stuff, need to do stuff to rebuild oscillation_ctrl
change default sitl_gazebo folder with working folder
-- Change this to add model, change airframe, etc and add citadel_hill world
-ROMFS/PX4FMU_COMMON
create airframe file in init.d-posix
add it to cmake list in same 'airframe' folder (with number)
add airframe name in ~/PX4-Autopilot/platforms/posix/cmake/sitl_target.cmake (no number)
add files in oscillation_ctrl/models and oscillation_ctrl/worlds to PX4-Autopilot/Tools/sitl_gazebo/models and PX4-Autopilot/Tools/sitl_gazebo/worlds respectively
add files in oscillation_ctrl/airframes to PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix
add file name to CmakeLists.txt in same 'airframe' folder (with number)
add airframe name in ~/PX4-Autopilot/platforms/posix/cmake/sitl_target.cmake (no number!)
-LAUNCH FILES
change default ~/PX4-Autopilot/launch folder with working folder
-MAVROS

View File

@ -0,0 +1,57 @@
<?xml version="1.0" ?>
<sdf version="1.6">
<world name="citadel_hill">
<gravity>0 0 -9.8066</gravity>
<magnetic_field>6.0e-6 2.3e-5 -4.2e-5</magnetic_field>
<scene>
<ambient>0.4 0.4 0.4 1</ambient>
<background>0.25 0.25 0.25 1</background>
<shadows>false</shadows>
</scene>
<include>
<uri>model://sun</uri>
</include>
<gui>
<camera name="user_camera">
<pose>-5 5 1 0 0 -1.124</pose>
</camera>
</gui>
<include>
<scale>0.1 0.1 0.1 </scale>
<pose>-275 -250 0 0 0 0</pose>
<uri>model://ground_plane</uri>
</include>
<model name="citadel_hill">
<static>true</static>
<include>
<uri>model://citadel_hill</uri>
<pose>-275 -250 0 0 0 0</pose>
</include>
</model>
<spherical_coordinates>
<surface_model>EARTH_WGS84</surface_model>
<latitude_deg>44.6475</latitude_deg>
<longitude_deg>-63.5796</longitude_deg>
</spherical_coordinates>
<physics name='default_physics' default='0' type='ode'>
<ode>
<solver>
<type>quick</type>
<iters>10</iters>
<sor>1.3</sor>
<use_dynamic_moi_rescaling>0</use_dynamic_moi_rescaling>
</solver>
<constraints>
<cfm>0</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>100</contact_max_correcting_vel>
<contact_surface_layer>0.001</contact_surface_layer>
</constraints>
</ode>
<max_step_size>0.004</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>250</real_time_update_rate>
</physics>
</world>
</sdf>