-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
I noticed that added mass was acting in the wrong direction. This was after visuallizing the individual forces separately (in this case added mass and damping forces). To be honest it still doesn't fix any of our outstanding issues. Signed-off-by: Arjo Chakravarty <[email protected]>
This PR is causing test failures. I'm not sure yet if we should update the tests or if there's something wrong with the PR. One thing I noticed in the tests is that this PR is exacerbating this issue: #47 Is there a way we can unit test the plugin so we check what the high-level expectations are? i.e. move 2 vehicles forward, one with added mass enabled and one disabled, and check that the one affected by added mass is slower. |
I need to update test expectations (The old ones were slightly off, this becomes obvious when you run a visuallization). We can extract out the individual components a functions and unit test the functions as is. One of the problems I face is that I can't test the wrenches with the physics engine running (this would be ideal). Otherwise the easiest test is that the direction of the force should always oppose the direction of motion. For some remedy to 47 I would recommend looking at #57. |
Can you elaborate? I think it should be possible to test the hydrodynamics isolated in a world without gravity, buoyancy or lift-drag. Apply a force to the vehicle, and see if its resulting velocity is damped as expected?
+1, I think this should help us detect sign errors |
That's not exactly correct. Only when accelerating. When decelerating it will go in the direction of motion. It should be in the opposite of the direction of the acceleration. |
That's correct for the direction of the added mass, but the damping matrix would dominate at higher velocities. |
@arjo129 , how would you like to proceed here? Let me know if you need help updating the test expectations. |
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
…icle sinks slower now. Thus the tests have had to be updated. Signed-off-by: Arjo Chakravarty <[email protected]>
I noticed that added mass was acting in the wrong direction. This was after visuallizing the individual forces separately (in this case added mass and damping forces). To be honest it still doesn't fix any of our outstanding issues.
Signed-off-by: Arjo Chakravarty [email protected]