ros-drivers/openni_camera — pull request #8 by jkammerl (2013-01-15 08:25:48+00:00)
Title: fixing late dynamic_reconfigure initialization

nodelet/driver.cpp:

important globals such as the image width and height are initialized within the config callback triggered by dynamic_reconfigure. During initialization of dynamic_reconfigure, this callback is executed in order to provide the default configuration.

Interestingly, the initialization of dynamic_reconfigure takes place within a separate thread (and not within the constructor). If a subscriber already connects during start-up to the image_raw publisher, the initialization thread might not be ready yet and width&height defined within the dynamic_reconfigure callback is undefined (leading to a crash of the nodelet manager).