Openni_manager service call to manually load Kinect driver
Hey,
I am trying (for days now) to manually control the nodelets that run my Kinect camera.
My scenario is a highly automated robot (turtlebot), with the capability to switch off Kinect just before going onto loading dock. Since the Kinect is powered by the Rommba motor outputs, it is switched off as soon as the Roomba starts reloading.
So I have to re-enable the Kinect stack after leaving the dock.
The Openni_manager I am using to run Kinect, provides rosservices (/openni_manager/load_nodelet) in order to achieve this. It is no problem to shut down a nodelet via service, but I am not able to put it back on properly.
The rosservice call in my program
load_nodelet_proxy("/openni_launch","openni_camera/OpenNINodelet",[],[], ["load openni_camera/OpenNINodelet openni_manager"], "1")
loads the driver with an output that looks fine and exactly the same as when I start the nodelet with launch file, but after a few seconds (possibly the timeout declared in the particular /openni_manager/bond message for that nodelet) it is automatically unloaded by the openni_manager!
What am I doing wrong?
Hopefully somebody can give some advice.
Cheers, Jasper