Fixed build errors against 0.11.2

This commit is contained in:
matlabbe
2016-02-17 16:05:35 -05:00
parent 2250eb1f01
commit b4c0224f06
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -214,7 +214,7 @@ int main(int argc, char** argv)
else if(!odom.data().rightRaw().empty() && odom.data().rightRaw().type() == CV_8U) else if(!odom.data().rightRaw().empty() && odom.data().rightRaw().type() == CV_8U)
{ {
//stereo //stereo
if(odom.data().stereoCameraModel().isValid()) if(odom.data().stereoCameraModel().isValidForProjection())
{ {
camInfoA.D.resize(8,0); camInfoA.D.resize(8,0);
@@ -262,7 +262,7 @@ int main(int argc, char** argv)
{ {
localTransform = odom.data().cameraModels()[0].localTransform(); localTransform = odom.data().cameraModels()[0].localTransform();
} }
else if(odom.data().stereoCameraModel().isValid()) else if(odom.data().stereoCameraModel().isValidForProjection())
{ {
localTransform = odom.data().stereoCameraModel().left().localTransform(); localTransform = odom.data().stereoCameraModel().left().localTransform();
} }
+5 -5
View File
@@ -224,12 +224,12 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
{ {
if(!(data.imageCompressed().empty() && data.imageRaw().empty()) && if(!(data.imageCompressed().empty() && data.imageRaw().empty()) &&
!(data.depthOrRightCompressed().empty() && data.depthOrRightRaw().empty()) && !(data.depthOrRightCompressed().empty() && data.depthOrRightRaw().empty()) &&
(data.cameraModels().size() || data.stereoCameraModel().isValid())) (data.cameraModels().size() || data.stereoCameraModel().isValidForProjection()))
{ {
// Which data should we decompress? // Which data should we decompress?
cv::Mat image, depth, scan; cv::Mat image, depth, scan;
data.uncompressData( data.uncompressData(
(rgbDepthRequired||data.stereoCameraModel().isValid()) ? &image:0, (rgbDepthRequired||data.stereoCameraModel().isValidForProjection()) ? &image:0,
(rgbDepthRequired||depthRequired) ? &depth:0, (rgbDepthRequired||depthRequired) ? &depth:0,
scanRequired||gridRequired?&scan:0); scanRequired||gridRequired?&scan:0);
@@ -287,7 +287,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
// Make sure that image size is set in camera models. // Make sure that image size is set in camera models.
// The camera models are used when cloud_frustum_culling=true. // The camera models are used when cloud_frustum_culling=true.
std::vector<rtabmap::CameraModel> models; std::vector<rtabmap::CameraModel> models;
if(data.stereoCameraModel().isValid()) if(data.stereoCameraModel().isValidForProjection())
{ {
//insert only the left camera model //insert only the left camera model
rtabmap::CameraModel model = data.stereoCameraModel().left(); rtabmap::CameraModel model = data.stereoCameraModel().left();
@@ -380,7 +380,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
iter->first, iter->first,
!(data.imageCompressed().empty() && data.imageRaw().empty())?1:0, !(data.imageCompressed().empty() && data.imageRaw().empty())?1:0,
!(data.depthOrRightCompressed().empty() && data.depthOrRightRaw().empty())?1:0, !(data.depthOrRightCompressed().empty() && data.depthOrRightRaw().empty())?1:0,
(data.cameraModels().size() || data.stereoCameraModel().isValid())?1:0); (data.cameraModels().size() || data.stereoCameraModel().isValidForProjection())?1:0);
} }
} }
} }
@@ -489,7 +489,7 @@ void MapsManager::publishMaps(
{ {
for(unsigned int i=0; i<kter->second.size(); ++i) for(unsigned int i=0; i<kter->second.size(); ++i)
{ {
if(kter->second[i].isValid()) if(kter->second[i].isValidForProjection())
{ {
int size = assembledCloud->size(); int size = assembledCloud->size();
assembledCloud = util3d::frustumFiltering( assembledCloud = util3d::frustumFiltering(
+2 -2
View File
@@ -487,7 +487,7 @@ rtabmap::Signature nodeDataFromROS(const rtabmap_ros::NodeData & msg)
msg.label, msg.label,
transformFromPoseMsg(msg.pose), transformFromPoseMsg(msg.pose),
transformFromPoseMsg(msg.groundTruthPose), transformFromPoseMsg(msg.groundTruthPose),
stereoModel.isValid()? stereoModel.isValidForProjection()?
rtabmap::SensorData( rtabmap::SensorData(
compressedMatFromBytes(msg.laserScan), compressedMatFromBytes(msg.laserScan),
msg.laserScanMaxPts, msg.laserScanMaxPts,
@@ -545,7 +545,7 @@ void nodeDataToROS(const rtabmap::Signature & signature, rtabmap_ros::NodeData &
transformToGeometryMsg(signature.sensorData().cameraModels()[i].localTransform(), msg.localTransform[i]); transformToGeometryMsg(signature.sensorData().cameraModels()[i].localTransform(), msg.localTransform[i]);
} }
} }
else if(signature.sensorData().stereoCameraModel().isValid()) else if(signature.sensorData().stereoCameraModel().isValidForProjection())
{ {
msg.fx.push_back(signature.sensorData().stereoCameraModel().left().fx()); msg.fx.push_back(signature.sensorData().stereoCameraModel().left().fx());
msg.fy.push_back(signature.sensorData().stereoCameraModel().left().fy()); msg.fy.push_back(signature.sensorData().stereoCameraModel().left().fy());
+1 -1
View File
@@ -259,7 +259,7 @@ void MapCloudDisplay::processMapData(const rtabmap_ros::MapData& map)
rtabmap::Signature s = rtabmap_ros::nodeDataFromROS(map.nodes[i]); rtabmap::Signature s = rtabmap_ros::nodeDataFromROS(map.nodes[i]);
if(!s.sensorData().imageCompressed().empty() && if(!s.sensorData().imageCompressed().empty() &&
!s.sensorData().depthOrRightCompressed().empty() && !s.sensorData().depthOrRightCompressed().empty() &&
(s.sensorData().cameraModels().size() || s.sensorData().stereoCameraModel().isValid())) (s.sensorData().cameraModels().size() || s.sensorData().stereoCameraModel().isValidForProjection()))
{ {
cv::Mat image, depth; cv::Mat image, depth;
s.sensorData().uncompressData(&image, &depth, 0); s.sensorData().uncompressData(&image, &depth, 0);