ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are using the catkinized KnowRob that uses rosjava, not rosjava_jni, right? There is no spinner in rosjava any more, see here. It may be that you have been confused by the old Java files in knowrob_perception_tutorial (that used the older rosjava_jni), which I had forgotten to remove. This is the current approach to use.
If you use the older, rosbuild-based KnowRob that is based on rosjava_jni: This rosjava version wraps around roscpp, which would explain your error message. Spin() may only be called by one thread, i.e. you can remove the calls to 'spin()' in the other threads. However, I'd recommend to avoid rosjava_jni altogether since it's not actively maintained any more.