openworm/OpenWorm

Generation of video from execution of simulation via Docker not working

Closed this issue · 3 comments

At the end of running the sibernetic/c302 simulation via the latest version on the https://github.com/openworm/OpenWorm/tree/development branch, the following video files are generated:

  C2_FW_2019-01-05_13-01-09.mp4  
  cut_C2_FW_2019-01-05_13-01-09.mp4   
  speeded_C2_FW_2019-01-05_13-01-09.mp4

but none is a working video (play correctly for approx right time, but blank throughout). Ran on Ubuntu.

Probably related to #280 (tested on Mac there)

lungd commented

@pgleeson this happens because the rerun of the prev executed Sibernetic simulation does not work with the latest version.
I think the sibernetic_c302 simulation works as intended because the generated plots look good.
A manually started Sibernetic simulation (./Release/Sibernetic -f worm) works with a virtual screen.
If I manually call the rerun with '-l_from', I get a 'Segmentation fault (core dumped)'.

A blank video could be seen as an indicator for a faulty execution of the rerun.
The reason for that is because the recording of the virtual screen starts before the rerun of the Sibernetic sim.
After the rerun ends, the screen recording stops and the movie gets generated.
If nothing was displayed on the virtual screen, the video will be blank.
Due to the blank orig video, the 'cut' and 'speeded' videos are also blank.

We should add some proper error handling inside master_openworm.py and stop the script if there is an issue with the rerun, to prevent the generation of the other two videos and maybe remove the blank orig video.

Fixed in #280