-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement hydrodynamics and thruster plugin. Signed-off-by: Arjo Chakravarty <[email protected]> Co-authored-by: Mabel Zhang <[email protected]> Co-authored-by: Carlos Agüero <[email protected]>
- Loading branch information
1 parent
51befb4
commit 9599770
Showing
10 changed files
with
1,194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
<?xml version="1.0" ?> | ||
<sdf version="1.6"> | ||
<world name="buoyant_tethys"> | ||
<scene> | ||
<!-- For turquoise ambient --> | ||
<ambient>0.0 1.0 1.0</ambient> | ||
<background>0.0 0.7 0.8</background> | ||
</scene> | ||
|
||
<physics name="1ms" type="ode"> | ||
<max_step_size>0.001</max_step_size> | ||
<real_time_factor>1.0</real_time_factor> | ||
</physics> | ||
<plugin | ||
filename="ignition-gazebo-physics-system" | ||
name="ignition::gazebo::systems::Physics"> | ||
</plugin> | ||
<plugin | ||
filename="ignition-gazebo-user-commands-system" | ||
name="ignition::gazebo::systems::UserCommands"> | ||
</plugin> | ||
<plugin | ||
filename="ignition-gazebo-scene-broadcaster-system" | ||
name="ignition::gazebo::systems::SceneBroadcaster"> | ||
</plugin> | ||
<plugin | ||
filename="ignition-gazebo-contact-system" | ||
name="ignition::gazebo::systems::Contact"> | ||
</plugin> | ||
|
||
<plugin | ||
filename="ignition-gazebo-buoyancy-system" | ||
name="ignition::gazebo::systems::Buoyancy"> | ||
<uniform_fluid_density>1000</uniform_fluid_density> | ||
</plugin> | ||
|
||
<light type="directional" name="sun"> | ||
<cast_shadows>true</cast_shadows> | ||
<pose>0 0 10 0 0 0</pose> | ||
<diffuse>1 1 1 1</diffuse> | ||
<specular>0.5 0.5 0.5 1</specular> | ||
<attenuation> | ||
<range>1000</range> | ||
<constant>0.9</constant> | ||
<linear>0.01</linear> | ||
<quadratic>0.001</quadratic> | ||
</attenuation> | ||
<direction>-0.5 0.1 -0.9</direction> | ||
</light> | ||
|
||
<include> | ||
<pose>0 0 1 0 0 1.57</pose> | ||
<uri>https://fuel.ignitionrobotics.org/1.0/accurrent/models/MBARI%20Tethys%20LRAUV</uri> | ||
|
||
<!-- Joint controllers --> | ||
<plugin | ||
filename="ignition-gazebo-joint-position-controller-system" | ||
name="ignition::gazebo::systems::JointPositionController"> | ||
<joint_name>horizontal_fins_joint</joint_name> | ||
<p_gain>0.1</p_gain> | ||
</plugin> | ||
|
||
<plugin | ||
filename="ignition-gazebo-joint-position-controller-system" | ||
name="ignition::gazebo::systems::JointPositionController"> | ||
<joint_name>vertical_fins_joint</joint_name> | ||
<p_gain>0.1</p_gain> | ||
</plugin> | ||
|
||
<plugin | ||
filename="ignition-gazebo-thruster-system" | ||
name="ignition::gazebo::systems::Thruster"> | ||
<namespace>tethys</namespace> | ||
<joint_name>propeller_joint</joint_name> | ||
<thrust_coefficient>0.004422</thrust_coefficient> | ||
<fluid_density>1000</fluid_density> | ||
<propeller_diameter>0.2</propeller_diameter> | ||
</plugin> | ||
|
||
<!-- Lift and drag --> | ||
|
||
<!-- Vertical fin --> | ||
<plugin | ||
filename="ignition-gazebo-lift-drag-system" | ||
name="ignition::gazebo::systems::LiftDrag"> | ||
<air_density>1000</air_density> | ||
<cla>4.13</cla> | ||
<cla_stall>-1.1</cla_stall> | ||
<cda>0.2</cda> | ||
<cda_stall>0.03</cda_stall> | ||
<alpha_stall>0.17</alpha_stall> | ||
<a0>0</a0> | ||
<area>0.0244</area> | ||
<upward>0 1 0</upward> | ||
<forward>1 0 0</forward> | ||
<link_name>vertical_fins</link_name> | ||
<cp>0 0 0</cp> | ||
</plugin> | ||
|
||
<!-- Horizontal fin --> | ||
<plugin | ||
filename="ignition-gazebo-lift-drag-system" | ||
name="ignition::gazebo::systems::LiftDrag"> | ||
<air_density>1000</air_density> | ||
<cla>4.13</cla> | ||
<cla_stall>-1.1</cla_stall> | ||
<cda>0.2</cda> | ||
<cda_stall>0.03</cda_stall> | ||
<alpha_stall>0.17</alpha_stall> | ||
<a0>0</a0> | ||
<area>0.0244</area> | ||
<upward>0 0 1</upward> | ||
<forward>1 0 0</forward> | ||
<link_name>horizontal_fins</link_name> | ||
<cp>0 0 0</cp> | ||
</plugin> | ||
|
||
<!-- hydrodynamics plugin--> | ||
<plugin | ||
filename="ignition-gazebo-hydrodynamics-system" | ||
name="ignition::gazebo::systems::Hydrodynamics"> | ||
<link_name>base_link</link_name> | ||
<xDotU>-4.876161</xDotU> | ||
<yDotV>-126.324739</yDotV> | ||
<zDotW>-126.324739</zDotW> | ||
<kDotP>0</kDotP> | ||
<mDotQ>-33.46</mDotQ> | ||
<nDotR>-33.46</nDotR> | ||
<xUU>-6.2282</xUU> | ||
<xU>0</xU> | ||
<yVV>-601.27</yVV> | ||
<yV>0</yV> | ||
<zWW>-601.27</zWW> | ||
<zW>0</zW> | ||
<kPP>-0.1916</kPP> | ||
<kP>0</kP> | ||
<mQQ>-632.698957</mQQ> | ||
<mQ>0</mQ> | ||
<nRR>-632.698957</nRR> | ||
<nR>0</nR> | ||
</plugin> | ||
|
||
</include> | ||
|
||
</world> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gz_add_system(hydrodynamics | ||
SOURCES | ||
Hydrodynamics.cc | ||
PUBLIC_LINK_LIBS | ||
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER} | ||
) |
Oops, something went wrong.