mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 09:17:47 +08:00
Leaving the depth format check to rtabmap library. Added warning on large baseline detected. Added "convert_depth_to_mm"=true argument to rgbd_mapping.launch
This commit is contained in:
+13
-11
@@ -612,17 +612,6 @@ void GuiWrapper::commonDepthCallback(
|
||||
}
|
||||
cv_bridge::CvImageConstPtr ptrDepth = cv_bridge::toCvShare(depthMsgs[i]);
|
||||
cv::Mat subDepth = ptrDepth->image;
|
||||
if(subDepth.type() == CV_32FC1)
|
||||
{
|
||||
subDepth = util2d::cvtDepthFromFloat(subDepth);
|
||||
static bool shown = false;
|
||||
if(!shown)
|
||||
{
|
||||
ROS_WARN("Use depth image with \"unsigned short\" type to "
|
||||
"avoid conversion. This message is only printed once...");
|
||||
shown = true;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize
|
||||
if(rgb.empty())
|
||||
@@ -823,6 +812,19 @@ void GuiWrapper::commonStereoCallback(
|
||||
model.baseline(),
|
||||
localTransform);
|
||||
|
||||
if(model.baseline() > 10.0)
|
||||
{
|
||||
static bool shown = false;
|
||||
if(!shown)
|
||||
{
|
||||
ROS_WARN("Detected baseline (%f m) is quite large! Is your "
|
||||
"right camera_info P(0,3) correctly set? Note that "
|
||||
"baseline=-P(0,3)/P(0,0). This warning is printed only once.",
|
||||
model.baseline());
|
||||
shown = true;
|
||||
}
|
||||
}
|
||||
|
||||
// left
|
||||
cv_bridge::CvImageConstPtr ptrImage;
|
||||
cv::Mat left;
|
||||
|
||||
Reference in New Issue
Block a user