robotic-esp / pdt

Planner Developer Tools
26 stars 4 forks source link

Cost and Time Visualization #3

Open liangxu1109 opened 11 months ago

liangxu1109 commented 11 months ago

Hi, Marlin! I've encountered another issue. In your demonstration video, you managed to simultaneously display the interactive visualizer, the iteration times, time, and cost shown on the terminal. How did you achieve this?

liangxu1109 commented 11 months ago

I have added some pangolin::Var to display on the side. Is there any way to embed these display modules into the graph instead of the sidebar?"

liangxu1109 commented 11 months ago

Moreover, I noticed a phenomenon. In the EIT algorithm, sampling points only begin to be generated after the 100th iteration. However, in the ABIT algorithm, they appear from the very first iteration. Why is that?

marlinstrub commented 11 months ago

Hi @liangxu1109

I've encountered another issue. In your demonstration video, you managed to simultaneously display the interactive visualizer, the iteration times, time, and cost shown on the terminal. How did you achieve this?

Unfortunately this requires some manual work. First, make the visualizer show the last iteration you want in your video. Next, create high-quality images of all iterations up to the shown iteration by clicking on Export. Images created this way will contain the time and cost information in the upper-left corner. Finally, use ffmpeg to create the video from the exported images. If you want each iteration to be shown for (a multiple of) its iteration-time, you can create a file, say frame_times.txt, with the durations of each iteration and the associated iteration-image, e.g.,

file iter00001.png
duration 0.1
file iter00002.png
duration 0.2
...

And then run ffmpeg -i frame_times.txt -vf "fps=30" out.mp4 in the folder of the files.

I have added some pangolin::Var to display on the side. Is there any way to embed these display modules into the graph instead of the sidebar?"

Almost certainly, but you will have to implement it yourself. I would start by looking at the documentation and examples of Pangolin.

Moreover, I noticed a phenomenon. In the EIT algorithm, sampling points only begin to be generated after the 100th iteration. However, in the ABIT algorithm, they appear from the very first iteration. Why is that?

This is because ABIT doesn't check the termination condition during sampling, but EIT does. ABIT* should really do it too, because it helps respect time-based termination conditions when sampling is computationally expensive.

liangxu1109 commented 10 months ago

Thanks! solved!