mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-10 11:59:50 +08:00
fixed some compilation warnings
This commit is contained in:
@@ -197,6 +197,19 @@ bool CameraTango::init(const std::string & calibrationFolder, const std::string
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Drift correction allows motion tracking to recover after it loses tracking.
|
||||||
|
//
|
||||||
|
// The drift corrected pose is is available through the frame pair with
|
||||||
|
// base frame AREA_DESCRIPTION and target frame DEVICE.
|
||||||
|
/*ret = TangoConfig_setBool(tango_config_, "config_enable_drift_correction", true);
|
||||||
|
if (ret != TANGO_SUCCESS) {
|
||||||
|
LOGE(
|
||||||
|
"NativeRTABMap: enabling config_enable_drift_correction "
|
||||||
|
"failed with error code: %d",
|
||||||
|
ret);
|
||||||
|
return false;
|
||||||
|
}*/
|
||||||
|
|
||||||
// Get TangoCore version string from service.
|
// Get TangoCore version string from service.
|
||||||
char tango_core_version[kVersionStringLength];
|
char tango_core_version[kVersionStringLength];
|
||||||
ret = TangoConfig_getString(tango_config_, "tango_service_library_version", tango_core_version, kVersionStringLength);
|
ret = TangoConfig_getString(tango_config_, "tango_service_library_version", tango_core_version, kVersionStringLength);
|
||||||
@@ -229,6 +242,7 @@ bool CameraTango::init(const std::string & calibrationFolder, const std::string
|
|||||||
// Attach the onPoseAvailable callback.
|
// Attach the onPoseAvailable callback.
|
||||||
// The callback will be called after the service is connected.
|
// The callback will be called after the service is connected.
|
||||||
TangoCoordinateFramePair pair;
|
TangoCoordinateFramePair pair;
|
||||||
|
//pair.base = TANGO_COORDINATE_FRAME_AREA_DESCRIPTION; // drift correction is enabled
|
||||||
pair.base = TANGO_COORDINATE_FRAME_START_OF_SERVICE;
|
pair.base = TANGO_COORDINATE_FRAME_START_OF_SERVICE;
|
||||||
pair.target = TANGO_COORDINATE_FRAME_DEVICE;
|
pair.target = TANGO_COORDINATE_FRAME_DEVICE;
|
||||||
ret = TangoService_connectOnPoseAvailable(1, &pair, onPoseAvailableRouter);
|
ret = TangoService_connectOnPoseAvailable(1, &pair, onPoseAvailableRouter);
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ Transform RegistrationVis::computeTransformationImpl(
|
|||||||
// match between all descriptors
|
// match between all descriptors
|
||||||
VWDictionary dictionary(_featureParameters);
|
VWDictionary dictionary(_featureParameters);
|
||||||
std::list<int> fromWordIds;
|
std::list<int> fromWordIds;
|
||||||
for (unsigned int i = 0; i < descriptorsFrom.rows; ++i)
|
for (int i = 0; i < descriptorsFrom.rows; ++i)
|
||||||
{
|
{
|
||||||
int id = orignalWordsFromIds.size() ? orignalWordsFromIds[i] : i;
|
int id = orignalWordsFromIds.size() ? orignalWordsFromIds[i] : i;
|
||||||
dictionary.addWord(new VisualWord(id, descriptorsFrom.row(i), 1));
|
dictionary.addWord(new VisualWord(id, descriptorsFrom.row(i), 1));
|
||||||
|
|||||||
@@ -740,7 +740,7 @@ void SensorData::uncompressDataConst(
|
|||||||
void SensorData::setFeatures(const std::vector<cv::KeyPoint> & keypoints, const std::vector<cv::Point3f> & keypoints3D, const cv::Mat & descriptors)
|
void SensorData::setFeatures(const std::vector<cv::KeyPoint> & keypoints, const std::vector<cv::Point3f> & keypoints3D, const cv::Mat & descriptors)
|
||||||
{
|
{
|
||||||
UASSERT_MSG(keypoints3D.empty() || keypoints.size() == keypoints3D.size(), uFormat("keypoints=%d keypoints3D=%d", (int)keypoints.size(), (int)keypoints3D.size()).c_str());
|
UASSERT_MSG(keypoints3D.empty() || keypoints.size() == keypoints3D.size(), uFormat("keypoints=%d keypoints3D=%d", (int)keypoints.size(), (int)keypoints3D.size()).c_str());
|
||||||
UASSERT_MSG(descriptors.empty() || keypoints.size() == descriptors.rows, uFormat("keypoints=%d descriptors=%d", (int)keypoints.size(), descriptors.rows).c_str());
|
UASSERT_MSG(descriptors.empty() || (int)keypoints.size() == descriptors.rows, uFormat("keypoints=%d descriptors=%d", (int)keypoints.size(), descriptors.rows).c_str());
|
||||||
_keypoints = keypoints;
|
_keypoints = keypoints;
|
||||||
_keypoints3D = keypoints3D;
|
_keypoints3D = keypoints3D;
|
||||||
_descriptors = descriptors;
|
_descriptors = descriptors;
|
||||||
|
|||||||
Reference in New Issue
Block a user