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:
matlabbe
2015-10-09 12:28:20 -04:00
parent 96fc6c81d6
commit 3269ccd196
7 changed files with 44 additions and 44 deletions
+13 -11
View File
@@ -817,17 +817,6 @@ void CoreWrapper::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())
@@ -1046,6 +1035,19 @@ void CoreWrapper::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;
}
}
ros::Time stamp = scanMsg.get() != 0?scanMsg->header.stamp:leftImageMsg->header.stamp;
process(stamp,
SensorData(scan,