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

Science sensor system causes glitches in sim #168

Closed
Tracked by #150
braanan opened this issue Mar 15, 2022 · 5 comments
Closed
Tracked by #150

Science sensor system causes glitches in sim #168

braanan opened this issue Mar 15, 2022 · 5 comments

Comments

@braanan
Copy link
Collaborator

braanan commented Mar 15, 2022

Hi @mabelzhang,

I've been testing the empty_world env with the science sensor system in the loop and it seems like the queries are causing significant slowdowns. As a result the vehicle appears to be glitching along the navigated track.

empty_world_tethys.mp4

The temperature values produced for temperature seem to be correct.

To reproduce run the lrauv-application with the following inputs:
./bin/LRAUV -x "run Science/profile_station.xml"

Thanks

@braanan braanan mentioned this issue Mar 15, 2022
39 tasks
@mabelzhang
Copy link
Collaborator

mabelzhang commented Mar 23, 2022

Hey Ben, I was able to reproduce this on main.
However, when I switch to my trilinear interpolation branch in #127, the lag disappears. So, I recommend getting my PR merged so we have all the improvements.
I haven't dug into what is the problem on main causing this. If #127 solves it for us, then that seems the easiest solution.

I also noticed main is still printing a lot of garbage from my old (3 months now) interpolation code, which has been refactored into its own class in #127 and has cleaner printouts now. Definitely a better experience.

Could you try this out with #127 and see if the lag disappears for you?

@braanan
Copy link
Collaborator Author

braanan commented Mar 23, 2022

Thanks for looking into this issue. Yes, I'll merge in #127 to my local and give it a shot.

@mabelzhang
Copy link
Collaborator

mabelzhang commented Mar 23, 2022

I did a quick test to switch to barycentric interpolation in #127 by this line in ScienceSensorsSystem.cc:

  this->dataPtr->interpolation.SetMethod(BARYCENTRIC);

to try to isolate if the disappearance of lag comes from the TRILINEAR method, or the infrastructure improvements.
Still no lag.

So I'm guessing the lag might come from infrastructure.

That of course says nothing about whether interpolation is correct, which we should check separately. But seems like things are better with the new code, not worse. In any case, to test whether interpolation is correct, which is probably the next step, we should start from the new code.

@mabelzhang
Copy link
Collaborator

I added a few IGN_PROFILE lines. See timelines produced below.
You were right about the kNN search being the bottleneck. FindTrilinearInterpolators() takes 800 ms.
In comparison, publishing point clouds take 30 ms.

2022-03-30-150323_3840x2160_scrot

2022-03-30-150421_3840x2160_scrot

2022-03-30-150440_3840x2160_scrot

@braanan
Copy link
Collaborator Author

braanan commented May 2, 2022

resolved in #191

@braanan braanan closed this as completed May 2, 2022
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

No branches or pull requests

2 participants