backward compatibility hydro

This commit is contained in:
matlabbe
2017-10-27 10:06:05 +02:00
parent 9846ddbfbc
commit d7db848dad
7 changed files with 29 additions and 16 deletions
+7 -2
View File
@@ -167,7 +167,6 @@ SET(rtabmap_ros_lib_src
src/nodelets/obstacles_detection_old.cpp src/nodelets/obstacles_detection_old.cpp
src/nodelets/point_cloud_aggregator.cpp src/nodelets/point_cloud_aggregator.cpp
src/nodelets/undistort_depth.cpp src/nodelets/undistort_depth.cpp
src/nodelets/rgbd_sync.cpp
src/OdometryROS.cpp src/OdometryROS.cpp
src/MsgConversion.cpp src/MsgConversion.cpp
src/MapsManager.cpp src/MapsManager.cpp
@@ -179,7 +178,13 @@ SET(rtabmap_ros_lib_src
src/impl/CommonDataSubscriberRGBD2.cpp src/impl/CommonDataSubscriberRGBD2.cpp
src/impl/CommonDataSubscriberRGBD3.cpp src/impl/CommonDataSubscriberRGBD3.cpp
src/impl/CommonDataSubscriberRGBD4.cpp src/impl/CommonDataSubscriberRGBD4.cpp
) )
IF(${cv_bridge_VERSION_MAJOR} GREATER 1 OR ${cv_bridge_VERSION_MINOR} GREATER 10)
SET(rtabmap_ros_lib_src ${rtabmap_ros_lib_src} src/nodelets/rgbd_sync.cpp)
ELSE()
ADD_DEFINITIONS("-DCV_BRIDGE_HYDRO")
ENDIF()
# If costmap_2d is found, add the plugin # If costmap_2d is found, add the plugin
IF(costmap_2d_FOUND) IF(costmap_2d_FOUND)
+2 -2
View File
@@ -189,8 +189,8 @@ private:
std::string groundTruthBaseFrameId_; std::string groundTruthBaseFrameId_;
std::string configPath_; std::string configPath_;
std::string databasePath_; std::string databasePath_;
float odomDefaultAngVariance_; double odomDefaultAngVariance_;
float odomDefaultLinVariance_; double odomDefaultLinVariance_;
bool waitForTransform_; bool waitForTransform_;
double waitForTransformDuration_; double waitForTransformDuration_;
bool useActionForGoal_; bool useActionForGoal_;
+8
View File
@@ -134,7 +134,11 @@ void toCvCopy(const rtabmap_ros::RGBDImage & image, cv_bridge::CvImagePtr & rgb,
} }
else if(!image.rgbCompressed.data.empty()) else if(!image.rgbCompressed.data.empty())
{ {
#ifdef CV_BRIDGE_HYDRO
ROS_ERROR("Unsupported compressed image copy, please upgrade at least to ROS Indigo to use this.");
#else
rgb = cv_bridge::toCvCopy(image.rgbCompressed); rgb = cv_bridge::toCvCopy(image.rgbCompressed);
#endif
} }
else else
{ {
@@ -170,7 +174,11 @@ void toCvShare(const rtabmap_ros::RGBDImageConstPtr & image, cv_bridge::CvImageC
} }
else if(!image->rgbCompressed.data.empty()) else if(!image->rgbCompressed.data.empty())
{ {
#ifdef CV_BRIDGE_HYDRO
ROS_ERROR("Unsupported compressed image copy, please upgrade at least to ROS Indigo to use this.");
#else
rgb = cv_bridge::toCvCopy(image->rgbCompressed); rgb = cv_bridge::toCvCopy(image->rgbCompressed);
#endif
} }
else else
{ {
+4 -4
View File
@@ -58,9 +58,9 @@ public:
ICPOdometry() : ICPOdometry() :
OdometryROS(false, false, true), OdometryROS(false, false, true),
scanCloudMaxPoints_(0), scanCloudMaxPoints_(0),
scanVoxelSize_(0.0f), scanVoxelSize_(0.0),
scanNormalK_(0), scanNormalK_(0),
scanNormalRadius_(0.0f) scanNormalRadius_(0.0)
{ {
} }
@@ -260,9 +260,9 @@ private:
ros::Subscriber scan_sub_; ros::Subscriber scan_sub_;
ros::Subscriber cloud_sub_; ros::Subscriber cloud_sub_;
int scanCloudMaxPoints_; int scanCloudMaxPoints_;
float scanVoxelSize_; double scanVoxelSize_;
int scanNormalK_; int scanNormalK_;
float scanNormalRadius_; double scanNormalRadius_;
}; };
PLUGINLIB_EXPORT_CLASS(rtabmap_ros::ICPOdometry, nodelet::Nodelet); PLUGINLIB_EXPORT_CLASS(rtabmap_ros::ICPOdometry, nodelet::Nodelet);
+2 -2
View File
@@ -74,7 +74,7 @@ public:
noiseFilterRadius_(0.0), noiseFilterRadius_(0.0),
noiseFilterMinNeighbors_(5), noiseFilterMinNeighbors_(5),
normalK_(0), normalK_(0),
normalRadius_(0.0f), normalRadius_(0.0),
filterNaNs_(false), filterNaNs_(false),
approxSyncDepth_(0), approxSyncDepth_(0),
approxSyncDisparity_(0), approxSyncDisparity_(0),
@@ -346,7 +346,7 @@ private:
double noiseFilterRadius_; double noiseFilterRadius_;
int noiseFilterMinNeighbors_; int noiseFilterMinNeighbors_;
int normalK_; int normalK_;
float normalRadius_; double normalRadius_;
bool filterNaNs_; bool filterNaNs_;
std::vector<float> roiRatios_; std::vector<float> roiRatios_;
+2 -2
View File
@@ -76,7 +76,7 @@ public:
noiseFilterRadius_(0.0), noiseFilterRadius_(0.0),
noiseFilterMinNeighbors_(5), noiseFilterMinNeighbors_(5),
normalK_(0), normalK_(0),
normalRadius_(0.0f), normalRadius_(0.0),
filterNaNs_(false), filterNaNs_(false),
approxSyncDepth_(0), approxSyncDepth_(0),
approxSyncDisparity_(0), approxSyncDisparity_(0),
@@ -497,7 +497,7 @@ private:
double noiseFilterRadius_; double noiseFilterRadius_;
int noiseFilterMinNeighbors_; int noiseFilterMinNeighbors_;
int normalK_; int normalK_;
float normalRadius_; double normalRadius_;
bool filterNaNs_; bool filterNaNs_;
std::vector<float> roiRatios_; std::vector<float> roiRatios_;
rtabmap::ParametersMap stereoBMParameters_; rtabmap::ParametersMap stereoBMParameters_;
+4 -4
View File
@@ -74,9 +74,9 @@ public:
exactCloudSync_(0), exactCloudSync_(0),
queueSize_(5), queueSize_(5),
scanCloudMaxPoints_(0), scanCloudMaxPoints_(0),
scanVoxelSize_(0.0f), scanVoxelSize_(0.0),
scanNormalK_(0), scanNormalK_(0),
scanNormalRadius_(0.0f) scanNormalRadius_(0.0)
{ {
} }
@@ -464,9 +464,9 @@ private:
message_filters::Synchronizer<MyExactCloudSyncPolicy> * exactCloudSync_; message_filters::Synchronizer<MyExactCloudSyncPolicy> * exactCloudSync_;
int queueSize_; int queueSize_;
int scanCloudMaxPoints_; int scanCloudMaxPoints_;
float scanVoxelSize_; double scanVoxelSize_;
int scanNormalK_; int scanNormalK_;
float scanNormalRadius_; double scanNormalRadius_;
}; };
PLUGINLIB_EXPORT_CLASS(rtabmap_ros::RGBDICPOdometry, nodelet::Nodelet); PLUGINLIB_EXPORT_CLASS(rtabmap_ros::RGBDICPOdometry, nodelet::Nodelet);