Page 1 of 1

Live plots

Posted: Tue Sep 10, 2024 1:04 pm
by pelegs
Hi!

I'm doing live ploting using ImPlot (extension of ImGUI), and it works when the ARGoS visualization is off
but not working when the visualization is working.

Two question:
1. Is there a way to know in the code if the visualization is turned on or off?
2. Do you by any chance know the reason for this behavior?

Thank you,

Peleg

Re: Live plots

Posted: Fri Nov 29, 2024 6:13 pm
by pincy
I am not sure why your code does not work when the visualization is on or off, it depends on how you use ImGUI. If ImGUI is supposed to attach to the Qt visualization of ARGoS, turning it off will explain the behavior you see.

To check whether the visualization is on or off, you can use this code:

Code: Select all

if(dynamic_cast<CDefaultVisualization*>(&CSimulator::GetVisualization())) { // No visualization } else { // A visualization has been activated }