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

Use actual depth vbs expectations #113

Merged
merged 12 commits into from
Dec 22, 2021
Merged

Conversation

arjo129
Copy link
Member

@arjo129 arjo129 commented Dec 10, 2021

This test is a rewrite of the testDepthVBS test. The key change is instead of a trajectory, we check that the vehicle eventually reaches a depth of 10m and its depth rate eventually reaches zero. It also checks that the velocity is reducing slowly. I expect this to be a ❌ till the upstream changes in the controller are merged and a new docker image is generated,

Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up the test!

this->CheckRange(26000, {16.95, 3.13, -5.16, 0.00, 0.00, 1.66}, {15.0, 3.14});
this->CheckRange(28000, {16.65, 5.57, -6.79, -0.00, 0.02, 2.17}, {15.0, 3.14});
ignition::math::Vector3d maxVel(0, 0, 0);
for (int i = 1; i <= this->tethysPoses.size(); i ++)
Copy link
Contributor

@chapulina chapulina Dec 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about not checking every single pose? It takes longer with little benefit. I think that every 1000~2000 iterations should be enough to catch issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @arjo129 , I think this comment is especially important now that the number of iterations was increased

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can address this later

lrauv_ignition_plugins/test/test_mission_depth_vbs.cc Outdated Show resolved Hide resolved
lrauv_ignition_plugins/test/test_mission_depth_vbs.cc Outdated Show resolved Hide resolved
lrauv_ignition_plugins/test/test_mission_depth_vbs.cc Outdated Show resolved Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
…lrauv into arjo/fix/testdepthvbs_expectations

Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 marked this pull request as ready for review December 20, 2021 01:55
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 requested a review from chapulina December 21, 2021 05:45
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just have some recommendations below to make the test quicker and to check other directions (X, Y and yaw), so we can catch problems if we introduce (more) drift in the future.

this->CheckRange(26000, {16.95, 3.13, -5.16, 0.00, 0.00, 1.66}, {15.0, 3.14});
this->CheckRange(28000, {16.65, 5.57, -6.79, -0.00, 0.02, 2.17}, {15.0, 3.14});
ignition::math::Vector3d maxVel(0, 0, 0);
for (int i = 1; i <= this->tethysPoses.size(); i ++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping @arjo129 , I think this comment is especially important now that the number of iterations was increased

ignition::math::Vector3d maxVel(0, 0, 0);
for (int i = 1; i <= this->tethysPoses.size(); i ++)
{
// Vehicle roll should be constant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check other quantities that should also be constant? i.e. X, Y and yaw?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X, Y and Yaw are not constant. This was also found in real life data. There is a significant amount of translation along the X axis and yawing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know how much change we should expect on these dimensions? Is there a point when it's too much?

@arjo129
Copy link
Member Author

arjo129 commented Dec 22, 2021 via email

@chapulina
Copy link
Contributor

it is ok for the vehicle to translate and spin (significantly as normally the pitchmass is used to prevent the vehicle from excessive pitching and thus translation).
The test pitchmass + depth VBS mission however should have some bounds on translation.

I see, ok, so it sounds like it's difficult (impossible?) to use this test to detect regressions on our dynamics if it introduces extra drifting, and we have other tests that can be used to check that instead 👍

@chapulina
Copy link
Contributor

I'll merge this so the test becomes stable for other branches

@chapulina chapulina merged commit 30bb247 into main Dec 22, 2021
@chapulina chapulina deleted the arjo/fix/testdepthvbs_expectations branch December 22, 2021 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants