mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-08 10:47:46 +08:00
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:
@@ -69,7 +69,11 @@ MapsManager::MapsManager() :
|
||||
assembledGround_(new pcl::PointCloud<pcl::PointXYZRGB>),
|
||||
occupancyGrid_(new OccupancyGrid),
|
||||
gridUpdated_(true),
|
||||
#ifdef WITH_OCTOMAP_MSGS
|
||||
#ifdef RTABMAP_OCTOMAP
|
||||
octomap_(new OctoMap),
|
||||
#endif
|
||||
#endif
|
||||
octomapTreeDepth_(16),
|
||||
octomapUpdated_(true),
|
||||
latching_(true)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user