Camera class: localTransform parameter should not have optical rotation anymore (it is added afterwards in the constructor). OdomSensor: the extrinsics should not contain optical rotation anymore. These 2 changes make it more convenient to set transfomation parameters in the UI. MainWindow::createCamera() now has odomSensor argument for convenience (for inherited classes to set both camera and odom sensor in the same function).

This commit is contained in:
matlabbe
2021-05-26 13:40:46 -04:00
parent 21dbeed4b7
commit ada3e75005
34 changed files with 96 additions and 80 deletions

View File

@@ -286,10 +286,10 @@ int main(int argc, char * argv[])
pathRightImages,
!raw,
0.0f,
baseToImu*models[0].localTransform()), parameters);
baseToImu*models[0].localTransform()*CameraModel::opticalRotation().inverse()), parameters);
printf("baseToImu=%s\n", baseToImu.prettyPrint().c_str());
std::cout<<"baseToCam0:\n" << baseToImu*models[0].localTransform() << std::endl;
printf("baseToCam0=%s\n", (baseToImu*models[0].localTransform()).prettyPrint().c_str());
std::cout<<"baseToCam0:\n" << baseToImu*models[0].localTransform()*CameraModel::opticalRotation().inverse() << std::endl;
printf("baseToCam0=%s\n", (baseToImu*models[0].localTransform()*CameraModel::opticalRotation().inverse()).prettyPrint().c_str());
printf("imuToCam0=%s\n", models[0].localTransform().prettyPrint().c_str());
printf("imuToCam1=%s\n", models[1].localTransform().prettyPrint().c_str());
((CameraStereoImages*)cameraThread.camera())->setTimestamps(true, "", false);

View File

@@ -371,8 +371,7 @@ int main(int argc, char * argv[])
pathLeftImages,
pathRightImages,
false, // assume that images are already rectified
0.0f,
opticalRotation);
0.0f);
}
CameraThread cameraThread(camera, parameters);
((CameraImages*)cameraThread.camera())->setTimestamps(false, pathTimes, false);

View File

@@ -205,8 +205,7 @@ int main(int argc, char * argv[])
pathRgbImages,
pathDepthImages,
depthFactor,
0.0f,
opticalRotation), parameters);
0.0f), parameters);
((CameraRGBDImages*)cameraThread.camera())->setTimestamps(true, "", false);
if(!pathGt.empty())
{