mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Fixed compilation warning of not used variables when some odom approaches are not supported
This commit is contained in:
@@ -53,10 +53,12 @@ private:
|
||||
virtual Transform computeTransform(SensorData & image, const Transform & guess = Transform(), OdometryInfo * info = 0);
|
||||
|
||||
private:
|
||||
#ifdef RTABMAP_DVO
|
||||
dvo::DenseTracker * dvo_;
|
||||
dvo::core::RgbdImagePyramid * reference_;
|
||||
dvo::core::RgbdCameraPyramid * camera_;
|
||||
bool lost_;
|
||||
#endif
|
||||
Transform motionFromKeyFrame_;
|
||||
Transform previousLocalTransform_;
|
||||
|
||||
|
||||
@@ -53,13 +53,15 @@ private:
|
||||
virtual Transform computeTransform(SensorData & image, const Transform & guess = Transform(), OdometryInfo * info = 0);
|
||||
|
||||
private:
|
||||
#ifdef RTABMAP_FOVIS
|
||||
fovis::VisualOdometry * fovis_;
|
||||
fovis::Rectification * rect_;
|
||||
fovis::StereoCalibration * stereoCalib_;
|
||||
fovis::DepthImage * depthImage_;
|
||||
fovis::StereoDepth * stereoDepth_;
|
||||
ParametersMap fovisParameters_;
|
||||
bool lost_;
|
||||
#endif
|
||||
ParametersMap fovisParameters_;
|
||||
Transform previousLocalTransform_;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,9 +51,11 @@ private:
|
||||
virtual Transform computeTransform(SensorData & image, const Transform & guess = Transform(), OdometryInfo * info = 0);
|
||||
|
||||
private:
|
||||
#ifdef RTABMAP_ORB_SLAM2
|
||||
ORBSLAM2System * orbslam2_;
|
||||
ORB_SLAM2::System * system_;
|
||||
bool firstFrame_;
|
||||
#endif
|
||||
Transform originLocalTransform_;
|
||||
|
||||
};
|
||||
|
||||
@@ -47,12 +47,14 @@ private:
|
||||
virtual Transform computeTransform(SensorData & image, const Transform & guess = Transform(), OdometryInfo * info = 0);
|
||||
|
||||
private:
|
||||
#ifdef RTABMAP_VISO2
|
||||
VisualOdometryStereo * viso2_;
|
||||
int ref_frame_change_method_; // Reference frame method (defautl 0): 0=under inliers threshold, 1=min pixel motion,
|
||||
int ref_frame_inlier_threshold_; // method 0. Change the reference frame if the number of inliers is low
|
||||
double ref_frame_motion_threshold_; // method 1. Change the reference frame if last motion is small
|
||||
bool lost_;
|
||||
bool keep_reference_frame_;
|
||||
#endif
|
||||
Transform reference_motion_;
|
||||
Transform previousLocalTransform_;
|
||||
ParametersMap viso2Parameters_;
|
||||
|
||||
@@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/OdometryDVO.h"
|
||||
#include "rtabmap/core/OdometryInfo.h"
|
||||
#include "rtabmap/core/util2d.h"
|
||||
#include "rtabmap/core/Version.h"
|
||||
#include "rtabmap/utilite/ULogger.h"
|
||||
#include "rtabmap/utilite/UTimer.h"
|
||||
#include "rtabmap/utilite/UStl.h"
|
||||
@@ -43,10 +42,12 @@ namespace rtabmap {
|
||||
|
||||
OdometryDVO::OdometryDVO(const ParametersMap & parameters) :
|
||||
Odometry(parameters),
|
||||
#ifdef RTABMAP_DVO
|
||||
dvo_(0),
|
||||
reference_(0),
|
||||
camera_(0),
|
||||
lost_(false),
|
||||
#endif
|
||||
motionFromKeyFrame_(Transform::getIdentity())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/OdometryFovis.h"
|
||||
#include "rtabmap/core/OdometryInfo.h"
|
||||
#include "rtabmap/core/util2d.h"
|
||||
#include "rtabmap/core/Version.h"
|
||||
#include "rtabmap/utilite/ULogger.h"
|
||||
#include "rtabmap/utilite/UTimer.h"
|
||||
#include "rtabmap/utilite/UStl.h"
|
||||
@@ -40,13 +39,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
namespace rtabmap {
|
||||
|
||||
OdometryFovis::OdometryFovis(const ParametersMap & parameters) :
|
||||
Odometry(parameters),
|
||||
Odometry(parameters)
|
||||
#ifdef RTABMAP_FOVIS
|
||||
,
|
||||
fovis_(0),
|
||||
rect_(0),
|
||||
stereoCalib_(0),
|
||||
depthImage_(0),
|
||||
stereoDepth_(0),
|
||||
lost_(false)
|
||||
#endif
|
||||
{
|
||||
fovisParameters_ = Parameters::filterParameters(parameters, "OdomFovis");
|
||||
if(parameters.find(Parameters::kOdomVisKeyFrameThr()) != parameters.end())
|
||||
|
||||
@@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/OdometryORBSLAM2.h"
|
||||
#include "rtabmap/core/OdometryInfo.h"
|
||||
#include "rtabmap/core/util2d.h"
|
||||
#include "rtabmap/core/Version.h"
|
||||
#include "rtabmap/core/util3d_transforms.h"
|
||||
#include "rtabmap/utilite/ULogger.h"
|
||||
#include "rtabmap/utilite/UTimer.h"
|
||||
@@ -746,10 +745,13 @@ public:
|
||||
namespace rtabmap {
|
||||
|
||||
OdometryORBSLAM2::OdometryORBSLAM2(const ParametersMap & parameters) :
|
||||
Odometry(parameters),
|
||||
Odometry(parameters)
|
||||
#ifdef RTABMAP_ORB_SLAM2
|
||||
,
|
||||
orbslam2_(0),
|
||||
system_(0),
|
||||
firstFrame_(true)
|
||||
#endif
|
||||
{
|
||||
#ifdef RTABMAP_ORB_SLAM2
|
||||
orbslam2_ = new ORBSLAM2System(parameters);
|
||||
|
||||
@@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/OdometryViso2.h"
|
||||
#include "rtabmap/core/OdometryInfo.h"
|
||||
#include "rtabmap/core/util2d.h"
|
||||
#include "rtabmap/core/Version.h"
|
||||
#include "rtabmap/utilite/ULogger.h"
|
||||
#include "rtabmap/utilite/UTimer.h"
|
||||
#include "rtabmap/utilite/UStl.h"
|
||||
@@ -53,15 +52,19 @@ namespace rtabmap {
|
||||
|
||||
OdometryViso2::OdometryViso2(const ParametersMap & parameters) :
|
||||
Odometry(parameters),
|
||||
#ifdef RTABMAP_VISO2
|
||||
viso2_(0),
|
||||
ref_frame_change_method_(0),
|
||||
ref_frame_inlier_threshold_(Parameters::defaultOdomVisKeyFrameThr()),
|
||||
ref_frame_motion_threshold_(5.0),
|
||||
lost_(false),
|
||||
keep_reference_frame_(false),
|
||||
#endif
|
||||
reference_motion_(Transform::getIdentity())
|
||||
{
|
||||
#ifdef RTABMAP_VISO2
|
||||
Parameters::parse(parameters, Parameters::kOdomVisKeyFrameThr(), ref_frame_inlier_threshold_);
|
||||
#endif
|
||||
viso2Parameters_ = Parameters::filterParameters(parameters, "OdomViso2");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user