mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Fixed compilation warnings
This commit is contained in:
@@ -368,8 +368,8 @@ LaserScan LaserScan::clone() const
|
|||||||
|
|
||||||
float & LaserScan::field(unsigned int pointIndex, unsigned int channelOffset)
|
float & LaserScan::field(unsigned int pointIndex, unsigned int channelOffset)
|
||||||
{
|
{
|
||||||
UASSERT(pointIndex < data_.cols);
|
UASSERT(pointIndex < (unsigned int)data_.cols);
|
||||||
UASSERT(channelOffset < data_.channels());
|
UASSERT(channelOffset < (unsigned int)data_.channels());
|
||||||
return data_.ptr<float>(0, pointIndex)[channelOffset];
|
return data_.ptr<float>(0, pointIndex)[channelOffset];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -205,7 +205,14 @@ Transform OdometryMono::computeTransform(SensorData & data, const Transform & gu
|
|||||||
{
|
{
|
||||||
cv::Mat newFrame;
|
cv::Mat newFrame;
|
||||||
cv::cvtColor(data.imageRaw(), newFrame, cv::COLOR_BGR2GRAY);
|
cv::cvtColor(data.imageRaw(), newFrame, cv::COLOR_BGR2GRAY);
|
||||||
data.setImageRaw(newFrame);
|
if(data.stereoCameraModel().isValidForProjection())
|
||||||
|
{
|
||||||
|
data.setStereoImage(newFrame, data.rightRaw(), data.stereoCameraModel());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.setRGBDImage(newFrame, data.depthRaw(), data.cameraModels());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!localMap_.empty())
|
if(!localMap_.empty())
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ struct big_any_policy : typed_base_any_policy<T>
|
|||||||
{
|
{
|
||||||
virtual void static_delete(void** x)
|
virtual void static_delete(void** x)
|
||||||
{
|
{
|
||||||
if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;
|
if (* x)
|
||||||
|
delete (* reinterpret_cast<T**>(x));
|
||||||
|
*x = NULL;
|
||||||
}
|
}
|
||||||
virtual void copy_from_value(void const* src, void** dest)
|
virtual void copy_from_value(void const* src, void** dest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1323,7 +1323,7 @@ void ExportCloudsDialog::viewClouds(
|
|||||||
for(unsigned int j=0; j<vertices.vertices.size(); ++j)
|
for(unsigned int j=0; j<vertices.vertices.size(); ++j)
|
||||||
{
|
{
|
||||||
UASSERT(oi < cloud->size());
|
UASSERT(oi < cloud->size());
|
||||||
UASSERT_MSG(vertices.vertices[j] < originalCloud->size(), uFormat("%d vs %d", vertices.vertices[j], (int)originalCloud->size()).c_str());
|
UASSERT_MSG(vertices.vertices[j] < (int)originalCloud->size(), uFormat("%d vs %d", vertices.vertices[j], (int)originalCloud->size()).c_str());
|
||||||
cloud->at(oi) = originalCloud->at(vertices.vertices[j]);
|
cloud->at(oi) = originalCloud->at(vertices.vertices[j]);
|
||||||
vertices.vertices[j] = oi; // new vertice index
|
vertices.vertices[j] = oi; // new vertice index
|
||||||
++oi;
|
++oi;
|
||||||
@@ -3270,7 +3270,7 @@ bool ExportCloudsDialog::getExportedClouds(
|
|||||||
for(int k=0; k<polygonSize; ++k)
|
for(int k=0; k<polygonSize; ++k)
|
||||||
{
|
{
|
||||||
//uv
|
//uv
|
||||||
UASSERT(vertices.vertices[k] < oter->second.size());
|
UASSERT(vertices.vertices[k] < (int)oter->second.size());
|
||||||
int originalVertex = oter->second[vertices.vertices[k]];
|
int originalVertex = oter->second[vertices.vertices[k]];
|
||||||
textureMesh->tex_coordinates[0][i*polygonSize+k] = Eigen::Vector2f(
|
textureMesh->tex_coordinates[0][i*polygonSize+k] = Eigen::Vector2f(
|
||||||
float(originalVertex % w) / float(w), // u
|
float(originalVertex % w) / float(w), // u
|
||||||
|
|||||||
Reference in New Issue
Block a user