osrf/gazebo_ros_pkgs — pull request #51 by meyerj (2013-06-26 13:26:07+00:00)
Title: Fix depth and openni kinect camera plugin segfaults

Unfortunately there was a new chicken and egg problem introduced with the solution from my pull request #31. I am not sure why this did not happen when I tested the patch some days before.

The depth topics will never been advertised before the first OnNew...Frame callback has been executed, but on the other hand the sensor is not activated before the first subscriber connects to the relevant topics. I now added an OnLoad() method to the GazeboRosCameraUtils class that plugins can use to register a callback that is executed in the load thread after the initialization has been completed.

I also added the gazebo/ prefix to some include directories. This did not cause any compiler errors, but I noticed the difference while I compared the openni and depth camera plugins.