Skip to content

Commit

Permalink
Add surface to buoyant_tethys (#161)
Browse files Browse the repository at this point in the history
This PR adds a surface at z=0 to the default buoyant_tethy.sdf. Most things work as expected. I had to move the MassShifter test deeper underwater as the vehicle would not pitch enough at the surface (kind of expected I guess?). I moved the mass shifter test deeper underwater.

Signed-off-by: Arjo Chakravarty arjo@openrobotics.org
  • Loading branch information
arjo129 authored Mar 2, 2022
1 parent e48b561 commit adb15ac
Show file tree
Hide file tree
Showing 4 changed files with 385 additions and 5 deletions.
10 changes: 10 additions & 0 deletions lrauv_ignition_plugins/test/helper/LrauvTestFixture.hh
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,14 @@ class LrauvTestFixture : public LrauvTestFixtureBase
LrauvTestFixtureBase::SetUp("buoyant_tethys.sdf");
}
};

/// \brief Loads the default "buoyant_tethys_at_depth.sdf" world.
class LrauvTestFixtureAtDepth : public LrauvTestFixtureBase
{
/// Documentation inherited
protected: void SetUp() override
{
LrauvTestFixtureBase::SetUp("buoyant_tethys_at_depth.sdf");
}
};
#endif
2 changes: 1 addition & 1 deletion lrauv_ignition_plugins/test/test_mass_shifter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <fstream>

//////////////////////////////////////////////////
TEST_F(LrauvTestFixture, MassShifterTilt)
TEST_F(LrauvTestFixtureAtDepth, MassShifterTilt)
{
// Check initial orientation
this->fixture->Server()->Run(true, 100, false);
Expand Down
8 changes: 4 additions & 4 deletions lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
<plugin
filename="ignition-gazebo-buoyancy-system"
name="ignition::gazebo::systems::Buoyancy">
<!-- TODO: fix behaviour near surface, see https://github.com/osrf/lrauv/issues/102
<!-- TODO: fix behaviour near surface, see https://github.com/osrf/lrauv/issues/102-->
<graded_buoyancy>
<default_density>1025</default_density>
<density_change>
<above_depth>0.5</above_depth>
<density>1</density>
<density>1.125</density>
</density_change>
</graded_buoyancy-->
<uniform_fluid_density>1025</uniform_fluid_density>
</graded_buoyancy>
<!--<uniform_fluid_density>1025</uniform_fluid_density> -->
</plugin>

<!-- Requires ParticleEmitter2 in ign-gazebo 4.8.0, which will be copied
Expand Down
Loading

0 comments on commit adb15ac

Please sign in to comment.