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

while(pangolin::ShouldQuit()) is okay,but if (pangolin::ShouldQuit()) is error occured by corrupted size vs. prev_size, #853

Open
TheSeanParker opened this issue Mar 28, 2023 · 2 comments

Comments

@TheSeanParker
Copy link

TheSeanParker commented Mar 28, 2023

It is so strange that when
pangolin::CreateWindowAndBind("Trajectory Viewer SO3", 1024, 768); pangolin::DataLog RMSE_data; std::vector<std::string> label; label.push_back(std::string("RMSE_Display")); RMSE_data.SetLabels(label); pangolin::Plotter plot(&RMSE_data,.0f, 30.0f, .0f, 4.0f, 0.1, 0.1); plot.SetBounds(0.0, 0.3, 0.7, 1.0); plot.Track("$i"); if(pangolin::ShouldQuit() == false) { /*code*/ }
pangolin::ShouldQuit()
if you want to recurrence this error ,you could git clone https://github.com/TheSeanParker/Pangolin_RMSE.git to run the code and to see the specific issue.
(pangolin::ShouldQuit())` Is okay,but If(pangolin::ShouldQuit()) not work ,error is corrupted size vs. prev_size,needing your help

@TheSeanParker TheSeanParker changed the title while(pangolin::ShouldQuit() ) Is while(pangolin::ShouldQuit()) Is okay,but If(pangolin::ShouldQuit()) not work ,error is corrupted size vs. prev_size,needing your help Mar 28, 2023
@TheSeanParker TheSeanParker changed the title while(pangolin::ShouldQuit()) Is okay,but If(pangolin::ShouldQuit()) not work ,error is corrupted size vs. prev_size,needing your help while(pangolin::ShouldQuit()) is okay,but if (pangolin::ShouldQuit()) is error occured by corrupted size vs. prev_size, Mar 28, 2023
@stevenlovegrove
Copy link
Owner

It's a bit hard to understand your question. What is the error you're experiencing? I see quite a few problems in the code you link to, so I would probably recommend to build up from a minimal example.

Some problems I noticed with a quick look:

  • You're calling pangolin::FinishFrame() at the start and end of the loop per-line. This can cause unexpected results, especially in combination with double buffering
  • You're calling pangolin::DisplayBase().AddDisplay(plot) in the loop
  • You're missing a matching glEnd() for one of your glBegins

@TheSeanParker
Copy link
Author

 ### IT is so honor for me to receive your answer!Recently,I prefer to use the  Pangolin in the project,maybe ask the question for the best use it!
  1. Firstly ,for let you to understand the question,I upload a minimal demo named Simplot, so less code,If I as the https://github.com/TheSeanParker/Pangolin_demo/blob/main/main.cpp#L38 is wrong ,error is**"corrupted size vs. prev_size Core dumped abandoned"**,if change the if->while ,that is right.I donot know why,and the reason.
  2. Secondly the previous code https://github.com/TheSeanParker/Pangolin_RMSE.git,As you suggest,I change the three aspects,but it is wrong still ,error is the same as the "corrupted size vs. prev_size Core dumped abandoned"
  3. I see the demo in the pangolin tutorial, is good for us who favorite the pangolin.But we really more study material for pangolin ,do you know the book or other material
    thanks a lot!

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