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

Check yaw rates instead of positions when yoyoing #124

Closed

Conversation

arjo129
Copy link
Member

@arjo129 arjo129 commented Dec 21, 2021

This PR depends on #89, #96.

Recommended review order is #89 > #96 > this PR. If we want I can cherry pick this branch as the changes are independent of the underlying code. The merge order should be this PR > #96 > #89.

There is a slight change in the center of rotation of the yoyo mission with #96. This leads to test expectations failing. Rather than use position to check whether the vehicle is yoyoing, I think we should use @tfoote's suggestion and use yaw rate which makes the test independent of the center of rotation and hence more robust while at the same time ensuring that the vehicle actually moves in a circle.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
This  PR depends on #89, #96.

Recommended review order is #89 > #96 > this PR. If we want I can cherry pick this branch as the changes are independent of the underlying code. The merge order should be this PR > #96 > #89.

There is a slight change in the center of rotation of the yoyo mission with #96. This leads to test expectations failing. Rather than use position to check whether the vehicle is yoyoing, I think we should use @tfoote's suggestion and use yaw rate which makes the test independent of the center of rotation and hence more robust while at the same time ensuring that the vehicle actually moves in a circle.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
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.

I think this is ok, just a couple of questions

yaw rate which makes the test independent of the center of rotation and hence more robust

Is that more robust because future dynamics updates won't affect the yaw rate? I can imagine fixes to lift/drag changing the forces on the rudder, which may change the yaw rate for example.

ensuring that the vehicle actually moves in a circle.

The tolerance for the yaw rate now is in the same order of magnitude than the rate itself (0.037 +- 0.02). So we should just make sure that we're not actually regressing and that's why we're not getting a circle anymore.

if (i > 6000)
{
// Once the vehicle achieves its full velocity the vehicle should have a
// nominal yaw rate of around 0.37-0.38rad/s. This means that the vehicle
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this number chosen empirically through the test or is this something we got from the real vehicle?

Copy link
Member Author

@arjo129 arjo129 Dec 21, 2021

Choose a reason for hiding this comment

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

I believe I used empirical means. But we should verify the actual rate with @braanan. BTW its missing a few zeros above.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. It would be good to document this on the comment so we know in the future that this isn't a target that we're trying to get to, just what we've observed so far. This is in contrast with the 1 m/s velocity for example, which is an actual target

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
@arjo129
Copy link
Member Author

arjo129 commented Dec 21, 2021

The tolerance for the yaw rate now is in the same order of magnitude than the rate itself (0.037 +- 0.02). So we should just make sure that we're not actually regressing and that's why we're not getting a circle anymore.

Thanks for spotting this 🤦‍♂️ . Yeah we don't need search tolerances I forgot to bump the tolerance back down. its now 0.037 +/- 0.002.

I can imagine fixes to lift/drag changing the forces on the rudder, which may change the yaw rate for example.

I do not believe yaw rate should change. The reason is that for this regime, the current LiftDrag plugin suffices to give an accurate model of the vehicle. Basically the yaw rate is determined by the lift generated by the rudder and the thruster thus resulting in circular motion. Our LiftDrag plugin is not however correct for situations where we are drifting, or where current plays a role or the depthVBS mission for instance where the angle of attack is very high.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
@arjo129 arjo129 self-assigned this Dec 21, 2021
@chapulina
Copy link
Contributor

I cherry-picked this PR onto main in #133 so we can merge it faster.

chapulina added a commit that referenced this pull request Jan 6, 2022
…o main) (#133)

* bump depth expectations

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>

* Check yaw rates instead of positions when yoyoing

This  PR depends on #89, #96.

Recommended review order is #89 > #96 > this PR. If we want I can cherry pick this branch as the changes are independent of the underlying code. The merge order should be this PR > #96 > #89.

There is a slight change in the center of rotation of the yoyo mission with #96. This leads to test expectations failing. Rather than use position to check whether the vehicle is yoyoing, I think we should use @tfoote's suggestion and use yaw rate which makes the test independent of the center of rotation and hence more robust while at the same time ensuring that the vehicle actually moves in a circle.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>

* remove unused variable

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>

* Fix tolerances. :man-facepalming:

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>

* increase ramp up time

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>

* Fix bad merge and increase tolerance

Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Arjo Chakravarty <arjo@openrobotics.org>
@chapulina
Copy link
Contributor

#133 got merged. We should adjust the tolerance on #89 or #96.

@chapulina chapulina closed this Jan 6, 2022
chapulina added a commit that referenced this pull request Jan 6, 2022
…atch #124

Signed-off-by: Louise Poubel <louise@openrobotics.org>
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.

YoYo expectations have high tolerances
3 participants