Nite Gesture Problem [closed]
Hi there, i am working alongside with the openni / nite kinect packages. I already have used the psi pose and the wave gesture for recognition of users, nevertheless the nite package seems to have problems with the wave gesture.
For the moment nite won't detect any gestures but the 'RaiseHand' gesture. This means that the gesture detector is working. Adding the 'Wave' or the 'Click' gesture throws no errors, nite recognizes them, gestures like 'Swipe', etc. are throwing errors.
When i am standing in front of the kinect, making the different added gestures, both the wave and click gestures aren't recognized. Raising the hand is recognized perfectly. I know how the gestures work, with a previous compiled version of the code everything was fine. Yet when i compile i won't get errors, still the gesture cannot be recognized.
Does anybody has a clue to this problem? I tried already a lot of things, kind of reinstalling whole ros, using latest stable binaries of OpenNI (making ros unable to recognize that a kinect is plugged) and searching the whole linux for the installed gestures without getting anything other than the header files within /usr/include/nite. Neighter fuerte nor diamondback recognizes the gestures with current packages.
For further information, here's the main code without callbacks:
// initialize context object
nRetVal = context.Init();
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to initialize context: %s", xnGetStatusString(nRetVal));
// create a DepthGenerator node
nRetVal = depthGenerator.Create(context);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to create depth generator: %s", xnGetStatusString(nRetVal));
// create a UserGenerator node
nRetVal = userGenerator.Create(context);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to create user generator: %s", xnGetStatusString(nRetVal));
// check if skeleton is supported
if (!userGenerator.IsCapabilitySupported(XN_CAPABILITY_SKELETON)) {
ROS_INFO("Supplied user generator doesn't support skeleton\nexit program...\n");
return 1;
}
// create a GestureGenerator node
nRetVal = gestureGenerator.Create(context);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to create gesture generator: %s", xnGetStatusString(nRetVal));
// register user callbacks
userGenerator.RegisterUserCallbacks(User_NewUser, User_LostUser, NULL, hUserCallbacks);
// register pose callbacks
XnCallbackHandle hPoseCallbacks;
userGenerator.GetPoseDetectionCap().RegisterToPoseCallbacks(UserPose_PoseDetected, NULL, NULL, hPoseCallbacks);
// register gesture callbacks
XnCallbackHandle hGestureCallbacks;
gestureGenerator.RegisterGestureCallbacks(Gesture_Recognized, Gesture_Process, NULL, hGestureCallbacks);
// add gesture to use
nRetVal = gestureGenerator.AddGesture(GESTURE_TO_USE, NULL);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to add gesture '%s': %s", GESTURE_TO_USE, xnGetStatusString(nRetVal));
else
ROS_INFO("Added gesture '%s' successful", GESTURE_TO_USE);
nRetVal = context.StartGeneratingAll();
// CHECK_RC(nRetVal, "StartGenerating");
if (nRetVal != XN_STATUS_OK)
ROS_INFO("%s failed: %s\n", "StartGenerating", xnGetStatusString(nRetVal));
else
ROS_INFO("OpenNI generations succeeded");
nRetVal = gestureGenerator.AddGesture("Click", NULL);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to add gesture '%s': %s", "Click", xnGetStatusString(nRetVal));
else
ROS_INFO("Added gesture '%s' successful", "Click");
nRetVal = gestureGenerator.AddGesture("RaiseHand", NULL);
if (nRetVal != XN_STATUS_OK)
ROS_INFO("Failed to add gesture '%s': %s", "RaiseHand", xnGetStatusString(nRetVal));
else
ROS_INFO("Added gesture '%s' successful", "RaiseHand");
Hope anybody know something about this problem. For me, it looks like any ros update might have caused the problem.
Greetings, Steve