This problem only happens on certain machines. To try to reproduce, setup a cemera in Gazebo and run the save_jpeg example.
NOTE:
I am not sure what causes the problem, but it looks like it can be circumvented if the gazebo instance is used in the loop at the end. It looks like the garbage collector is trying to delete the gazebo instance prematurely. The following code hides the problem:
#!python
console.log('setup a loop with 5 sec interval tick');
setInterval(function (){
console.log('tick');
// ADD THIS LINE TO HIDE THE PROBLEM
var x = gazebo;
},1000);
Original report (archived issue) by Hugo Boyer (Bitbucket: hugomatic, GitHub: hugomatic).
The callback is not invoked afterwards.
This problem only happens on certain machines. To try to reproduce, setup a cemera in Gazebo and run the save_jpeg example.
NOTE:
I am not sure what causes the problem, but it looks like it can be circumvented if the gazebo instance is used in the loop at the end. It looks like the garbage collector is trying to delete the gazebo instance prematurely. The following code hides the problem: