Nite Gesture Problem [closed]

asked 2012-06-29 07:20:05 -0500

steve_ros gravatar image

updated 2016-10-24 08:34:04 -0500

ngrennan gravatar image

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));
    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));
    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));
    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));
    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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-03-23 19:06:26.707187