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

@@ -1186,7 +1186,7 @@ void CameraRealSense2::setDualMode(bool enabled, const Transform & extrinsics)
#ifdef RTABMAP_REALSENSE2
UASSERT(!enabled || !extrinsics.isNull());
dualMode_ = enabled;
dualExtrinsics_ = extrinsics;
dualExtrinsics_ = extrinsics*CameraModel::opticalRotation();
if(dualMode_)
{
odometryProvided_ = true;