Log (save) joint trajectories over time and plot with python

Hello!

I found that it is not straight forward to log or save the data for plotting purposes. For instance, we typically need plots as below to analyze the performance over time.

Does anyone have a suggestion for this?

I used the following workaround:
Create a list updatables and save it somewhere. Each entry is a function (to be precise, a closure) which delivers the value you want to track. E.g. something along this line:

updatables.append(lambda: myobject.getSomething())

You might want to save additional data like ID and name in this list, too. Then you can call all these functions every tick and save their values in a numpy array or similar.

Hi Turakar!

I’m getting inspired from the solution. But I am a bit surprized that
“DART” does not offer a proper integrated-logger.

Thank you very much!

Yuquan