mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
createTextureCameras: using CameraModel's localTransform instead of hard coded optical rotation
This commit is contained in:
@@ -581,12 +581,9 @@ pcl::texture_mapping::CameraVector createTextureCameras(
|
|||||||
UASSERT(poseIter->first == modelIter->first);
|
UASSERT(poseIter->first == modelIter->first);
|
||||||
pcl::TextureMapping<pcl::PointXYZ>::Camera cam;
|
pcl::TextureMapping<pcl::PointXYZ>::Camera cam;
|
||||||
|
|
||||||
// transform into optical referential
|
// should be in camera frame
|
||||||
Transform rotation(0,-1,0,0,
|
UASSERT(!modelIter->second.localTransform().isNull() && !poseIter->second.isNull());
|
||||||
0,0,-1,0,
|
Transform t = poseIter->second*modelIter->second.localTransform();
|
||||||
1,0,0,0);
|
|
||||||
|
|
||||||
Transform t = poseIter->second*rotation.inverse();
|
|
||||||
|
|
||||||
cam.pose = t.toEigen3f();
|
cam.pose = t.toEigen3f();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user