TT_GetCameraManager::GetCameraList hang the tracking
Posted: Thu Jan 10, 2013 1:13 pm
A call to GetCameraList from the CameraManager will hang the tracking of the rigid body.
From the TrackingTool API, there is a function called TT_GetCameraManager.
I tried to use the function to have access to the cameras to know if they are connected or not.
I have written this function:
void HeadTrackerManager::CheckCameraStatus()
{
CameraLibrary::CameraManager* p_myCameraManager = NULL;
p_myCameraManager = TT_GetCameraManager();
CameraLibrary::CameraList CamList;
p_myCameraManager->GetCameraList(CamList);
}
The problem is when a call to GetCameraList is done, once I exit my function, both cameras are "reinitialized".
I see on both cameras the digits �spinning� and after a few seconds then the digit (on both cameras) shows nothing. After that, my application no longer tracks the rigid body. I have to restart my application to perform tracking again.
Question ) Do you have a sample application which shows how to use the GetCameralist correctly ?
Question) Is this a bug, or is there a restriction that we cannot use the GetCameraList() from the TrackingTool API ?
Note: I have used the TT_GetCameraManager with success to get the internal frequency of the OptiHub.
(This prooves that some part of the TT_GetCameraManager works.)
Here is the the function I wrote to do that:
bool HeadTrackerManager::CheckOptiHubInternalSync()
{
bool bReturnValue = false;
CameraLibrary::CameraManager* p_myCameraManager = NULL;
p_myCameraManager = TT_GetCameraManager();
if( p_myCameraManager != NULL )
{
// This works it return the name of the Optihub v2
const char* p_szName = p_myCameraManager->SyncDeviceName();
CameraLibrary::sSyncSettings mysSyncSettings;
p_myCameraManager->GetSyncSettings(mysSyncSettings);
// Note: it returns 120 when the custom sync mode is used in optihub and that we set 120
int InternalSyncGeneratorFrequency = mysSyncSettings.InternalSyncGeneratorFrequency;
int ImagerScanRate = mysSyncSettings.ImagerScanRate;
CameraLibrary::eSyncMode myeSyncMode;
myeSyncMode = p_myCameraManager->SyncMode();
bReturnValue = true;
}
return bReturnValue;
}
thank you,
From the TrackingTool API, there is a function called TT_GetCameraManager.
I tried to use the function to have access to the cameras to know if they are connected or not.
I have written this function:
void HeadTrackerManager::CheckCameraStatus()
{
CameraLibrary::CameraManager* p_myCameraManager = NULL;
p_myCameraManager = TT_GetCameraManager();
CameraLibrary::CameraList CamList;
p_myCameraManager->GetCameraList(CamList);
}
The problem is when a call to GetCameraList is done, once I exit my function, both cameras are "reinitialized".
I see on both cameras the digits �spinning� and after a few seconds then the digit (on both cameras) shows nothing. After that, my application no longer tracks the rigid body. I have to restart my application to perform tracking again.
Question ) Do you have a sample application which shows how to use the GetCameralist correctly ?
Question) Is this a bug, or is there a restriction that we cannot use the GetCameraList() from the TrackingTool API ?
Note: I have used the TT_GetCameraManager with success to get the internal frequency of the OptiHub.
(This prooves that some part of the TT_GetCameraManager works.)
Here is the the function I wrote to do that:
bool HeadTrackerManager::CheckOptiHubInternalSync()
{
bool bReturnValue = false;
CameraLibrary::CameraManager* p_myCameraManager = NULL;
p_myCameraManager = TT_GetCameraManager();
if( p_myCameraManager != NULL )
{
// This works it return the name of the Optihub v2
const char* p_szName = p_myCameraManager->SyncDeviceName();
CameraLibrary::sSyncSettings mysSyncSettings;
p_myCameraManager->GetSyncSettings(mysSyncSettings);
// Note: it returns 120 when the custom sync mode is used in optihub and that we set 120
int InternalSyncGeneratorFrequency = mysSyncSettings.InternalSyncGeneratorFrequency;
int ImagerScanRate = mysSyncSettings.ImagerScanRate;
CameraLibrary::eSyncMode myeSyncMode;
myeSyncMode = p_myCameraManager->SyncMode();
bReturnValue = true;
}
return bReturnValue;
}
thank you,