Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix added mass contribution. #59

Merged
merged 12 commits into from
Mar 16, 2022
2 changes: 1 addition & 1 deletion lrauv_ignition_plugins/src/HydrodynamicsPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void HydrodynamicsPlugin::PreUpdate(
Ma(3,3) = this->dataPtr->paramKdotP;
Ma(4,4) = this->dataPtr->paramMdotQ;
Ma(5,5) = this->dataPtr->paramNdotR;
const Eigen::VectorXd kAmassVec = Ma * stateDot;
const Eigen::VectorXd kAmassVec = - Ma * stateDot;

// Coriollis and Centripetal forces for under water vehicles (Fossen P. 37)
// Note: this is significantly different from VRX because we need to account
Expand Down
4 changes: 2 additions & 2 deletions lrauv_ignition_plugins/test/test_mission_depth_vbs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST_F(LrauvTestFixture, DepthVBS)

// Run enough iterations (chosen empirically) to reach steady state, then kill
// the controller
int targetIterations{50000};
int targetIterations{100000};
int maxSleep{100};
int sleep{0};
for (; sleep < maxSleep && lrauvRunning && this->iterations < targetIterations; ++sleep)
Expand All @@ -76,7 +76,7 @@ TEST_F(LrauvTestFixture, DepthVBS)

ignmsg << "Logged [" << this->tethysPoses.size() << "] poses" << std::endl;

int maxIterations{28000};
int maxIterations{50000};
ASSERT_LT(maxIterations, this->tethysPoses.size());

ignition::math::Vector3d maxVel(0, 0, 0);
Expand Down
4 changes: 2 additions & 2 deletions lrauv_ignition_plugins/test/test_state_msg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ TEST_F(LrauvTestFixture, State)
EXPECT_NEAR(0.0002, latest.buoyancyposition_(), 1e-3);

// Position
EXPECT_LT(0.3, latest.depth_());
EXPECT_LT(0.2, latest.depth_());

// NED world frame: higher Z is deeper
EXPECT_LT(0.3, latest.pos_().z());
EXPECT_LT(0.2, latest.pos_().z());

// Velocity
// NED world frame: sinking to higher Z
Expand Down