Fixed OctoMap cmpil error when rtabmap is not built with OctoMap dep (https://github.com/introlab/rtabmap/issues/759#issuecomment-948766713). stereo_odometry: added check for identity stereo transform (same frame used for left and right).

This commit is contained in:
matlabbe
2021-10-21 15:25:44 -04:00
parent 79369f654c
commit eb297e147f
2 changed files with 18 additions and 1 deletions
+14 -1
View File
@@ -210,7 +210,20 @@ private:
cameraInfoLeft->header.stamp);
if(stereoTransform.isNull())
{
NODELET_ERROR("Parameter %s is false but we cannot get TF between the two cameras!", Parameters::kRtabmapImagesAlreadyRectified().c_str());
NODELET_ERROR("Parameter %s is false but we cannot get TF between the two cameras! (between frames %s and %s)",
Parameters::kRtabmapImagesAlreadyRectified().c_str(),
cameraInfoRight->header.frame_id.c_str(),
cameraInfoLeft->header.frame_id.c_str());
return;
}
else if(stereoTransform.isIdentity())
{
NODELET_ERROR("Parameter %s is false but we cannot get a valid TF between the two cameras! "
"Identity transform returned between left and right cameras. Verify that if TF between "
"the cameras is valid: \"rosrun tf tf_echo %s %s\".",
Parameters::kRtabmapImagesAlreadyRectified().c_str(),
cameraInfoRight->header.frame_id.c_str(),
cameraInfoLeft->header.frame_id.c_str());
return;
}
}