Live plots

Requests regarding how to set up experiments in ARGoS.
pelegs
Posts: 6
Joined: Sat Aug 12, 2023 10:33 am

Live plots

Postby pelegs » Tue Sep 10, 2024 1:04 pm

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

pincy
Site Admin
Posts: 640
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Live plots

Postby pincy » Fri Nov 29, 2024 6:13 pm

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 }
I made ARGoS.


Return to “How to... ?”