ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are a few snippets from the code I use. I can get you the entire package if you want, but there is alot of other stuff going on that might be confusing. I call SaveCalibration after a user calibrates during the user calibrated callback function. It creates the UserCalibration.bin file:

define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"

void SaveCalibration() { XnUserID aUserIDs[20] = {0}; XnUInt16 nUsers = 20; g_UserGenerator.GetUsers(aUserIDs, nUsers); for (int i = 0; i < nUsers; ++i) { // Find a user who is already calibrated if (g_UserGenerator.GetSkeletonCap().IsCalibrated(aUserIDs[i])) { // Save user's calibration to file g_UserGenerator.GetSkeletonCap().SaveCalibrationDataToFile(aUserIDs[i], XN_CALIBRATION_FILE_NAME); printf("saved data\n"); break; } } }

Here are a few snippets from the code I use. I can get you the entire package if you want, but there is alot of other stuff going on that might be confusing. I call SaveCalibration after a user calibrates during the user calibrated callback function. It creates the UserCalibration.bin file:

'

define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"

void SaveCalibration() { XnUserID aUserIDs[20] = {0}; XnUInt16 nUsers = 20; g_UserGenerator.GetUsers(aUserIDs, nUsers); for (int i = 0; i < nUsers; ++i) { // Find a user who is already calibrated if (g_UserGenerator.GetSkeletonCap().IsCalibrated(aUserIDs[i])) { // Save user's calibration to file g_UserGenerator.GetSkeletonCap().SaveCalibrationDataToFile(aUserIDs[i], XN_CALIBRATION_FILE_NAME); printf("saved data\n"); break; } } }}'

Here are a few snippets from the code I use. I can get you the entire package if you want, but there is alot of other stuff going on that might be confusing. I call SaveCalibration after a user calibrates during the user calibrated callback function. It creates the UserCalibration.bin file:

''#define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"'

define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"

void SaveCalibration() { XnUserID aUserIDs[20] = {0}; XnUInt16 nUsers = 20; g_UserGenerator.GetUsers(aUserIDs, nUsers); for (int i = 0; i < nUsers; ++i) { // Find a user who is already calibrated if (g_UserGenerator.GetSkeletonCap().IsCalibrated(aUserIDs[i])) { // Save user's calibration to file g_UserGenerator.GetSkeletonCap().SaveCalibrationDataToFile(aUserIDs[i], XN_CALIBRATION_FILE_NAME); printf("saved data\n"); break; } } }'

Here are a few snippets from the code I use. I can get you the entire package if you want, but there is alot of other stuff going on that might be confusing. I call SaveCalibration after a user calibrates during the user calibrated callback function. It creates the UserCalibration.bin file:

'#define

#define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"'

"UserCalibration.bin" void SaveCalibration() { XnUserID aUserIDs[20] = {0}; XnUInt16 nUsers = 20; g_UserGenerator.GetUsers(aUserIDs, nUsers); for (int i = 0; i < nUsers; ++i) { // Find a user who is already calibrated if (g_UserGenerator.GetSkeletonCap().IsCalibrated(aUserIDs[i])) { // Save user's calibration to file g_UserGenerator.GetSkeletonCap().SaveCalibrationDataToFile(aUserIDs[i], XN_CALIBRATION_FILE_NAME); printf("saved data\n"); break; } } }'

}

Here are a few snippets from is an example of the code I use. I can get function you the entire package if you want, but there is alot should find inside of other stuff going on that might be confusing. I call SaveCalibration after a user calibrates during the user calibrated callback function. recent unstable NiUserTracker demo code. It creates the UserCalibration.bin file:

#define XN_CALIBRATION_FILE_NAME "UserCalibration.bin"


void SaveCalibration()
{
    XnUserID aUserIDs[20] = {0};
    XnUInt16 nUsers = 20;
    g_UserGenerator.GetUsers(aUserIDs, nUsers);
    for (int i = 0; i < nUsers; ++i)
    {
        // Find a user who is already calibrated
        if (g_UserGenerator.GetSkeletonCap().IsCalibrated(aUserIDs[i]))
        {
            // Save user's calibration to file
            g_UserGenerator.GetSkeletonCap().SaveCalibrationDataToFile(aUserIDs[i], XN_CALIBRATION_FILE_NAME);
            printf("saved data\n");
                break;
        }
    }
}