Calling xn_sensor_server_cleanup.sh from launchfile
There are a lot of threads on a bug in openni that crash the kinect because xnsensorserver is not shut down correctly. The solution seems to be to run this script (xn_sensor_server_cleanup.sh) from the launchfile to kill xnsensorserver automatically.
I tried to call this from my launchfile, but it just waits for ctrl-c without starting any of the nodes that should be started by the launchfile. Have anyone been successful in running this script? Currently I call the script by this command (in the end of the launchfile):
<param name="cleanup" command="$(find crops_fruit_localization)/include/xn_sensor_server_cleanup.sh"/>
By putting this into a param command, are you trying some nasty hack that will have this executed before actual nodes? I'm not sure what this will result in.
No i would like it to execute after the other nodes have been executed. The script waits until the user press ctrl-c and then it kills xnsensorserver, so it does not remove anything until the program is terminated. The problem is that it prevents any other nodes to be started.