I am trying to get the factory calibration for the sensor to sensor extrinsic matrices.
Here is my code:
#include <libobsensor/ObSensor.hpp>
int main(int argc, char *argv[]){
std::shared_ptr<ob::Pipeline> obPipeline;
try {
// Create OrbbecSDK pipeline (with default device).
obPipeline = std::make_shared<ob::Pipeline>();
} catch(ob::Error &e) {
std::cerr << "Make sure your Orbbec device is connected!" << std::endl;
return EXIT_FAILURE;
}
OBCalibrationParam calibrationParam = obPipeline->getCalibrationParam(obPipeline->getConfig());
float *rot = calibrationParam.extrinsics[OB_SENSOR_ACCEL][OB_SENSOR_GYRO].rot;
float *trans = calibrationParam.extrinsics[OB_SENSOR_ACCEL][OB_SENSOR_GYRO].trans;
std::vector<float> extrinsicsList;
extrinsicsList.reserve(12); // Reserve space for 12 elements to avoid reallocations
// Copy rotation matrix
std::copy(rot, rot + 9, std::back_inserter(extrinsicsList));
// Copy translation vector
std::copy(trans, trans + 3, std::back_inserter(extrinsicsList));
// Example of printing the combined list
for(auto val : extrinsicsList) {
std::cout << val << " ";
}
std::cout << std::endl;
}
And here is the error I am getting:
[07/20 16:32:05.359820][warning][49412][Pipeline.cpp:741] Get calibration param failed,support profile info invalid!
Any help would be greatly appreciated!