Skip to content

Commit

Permalink
add DUSE_PLUGINLIB_CLASS_LIST_MACROS_H for old(hydro) platform
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Sep 19, 2022
1 parent a22b97d commit b4627d9
Show file tree
Hide file tree
Showing 31 changed files with 122 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7")
endif()
endif(CMAKE_COMPILER_IS_GNUCXX)

find_package(catkin REQUIRED COMPONENTS cv_bridge dynamic_reconfigure message_generation image_transport nodelet roscpp sensor_msgs std_msgs std_srvs)
find_package(catkin REQUIRED COMPONENTS cv_bridge dynamic_reconfigure message_generation image_transport nodelet roscpp sensor_msgs std_msgs std_srvs class_loader)

find_package(OpenCV REQUIRED)
message(STATUS "OpenCV VERSION: ${OpenCV_VERSION}")
Expand All @@ -37,6 +37,9 @@ endif()
if(cv_bridge_VERSION VERSION_LESS "1.11.13")
add_definitions("-DCV_BRIDGE_CVT_COLOR_FOR_DISPLAY_OPTION_IS_NOT_SUPPORTED")
endif()
if(class_loader_VERSION VERSION_LESS "0.4.0")
add_definitions("-DUSE_PLUGINLIB_CLASS_LIST_MACROS_H")
endif()

# generate the dynamic_reconfigure config file
generate_dynamic_reconfigure_options(
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>class_loader</build_depend>

<run_depend>cv_bridge</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
Expand All @@ -39,6 +40,7 @@
<run_depend>sensor_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>std_srvs</run_depend>
<run_depend>class_loader</run_depend>

<test_depend>roslaunch</test_depend>
<test_depend>rostest</test_depend>
Expand Down
4 changes: 4 additions & 0 deletions src/nodelet/adding_images_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ class AddingImagesNodelet : public opencv_apps::AddingImagesNodelet
};
} // namespace adding_images

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::AddingImagesNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(adding_images::AddingImagesNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/camshift_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ class CamShiftNodelet : public opencv_apps::CamShiftNodelet
};
} // namespace camshift

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::CamShiftNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(camshift::CamShiftNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/color_filter_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,11 @@ class HSVColorFilterNodelet : public opencv_apps::HSVColorFilterNodelet
};
} // namespace color_filter

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(color_filter::RGBColorFilterNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(color_filter::HLSColorFilterNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(color_filter::HSVColorFilterNodelet, nodelet::Nodelet);
Expand Down
4 changes: 4 additions & 0 deletions src/nodelet/contour_moments_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ class ContourMomentsNodelet : public opencv_apps::ContourMomentsNodelet
};
} // namespace contour_moments

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::ContourMomentsNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(contour_moments::ContourMomentsNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/convex_hull_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ class ConvexHullNodelet : public opencv_apps::ConvexHullNodelet
};
} // namespace convex_hull

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::ConvexHullNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(convex_hull::ConvexHullNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/corner_harris_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ class CornerHarrisNodelet : public opencv_apps::CornerHarrisNodelet
};
} // namespace corner_harris

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::CornerHarrisNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(corner_harris::CornerHarrisNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/discrete_fourier_transform_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ class DiscreteFourierTransformNodelet : public opencv_apps::DiscreteFourierTrans
};
} // namespace discrete_fourier_transform

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::DiscreteFourierTransformNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(discrete_fourier_transform::DiscreteFourierTransformNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/edge_detection_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ class EdgeDetectionNodelet : public opencv_apps::EdgeDetectionNodelet
};
} // namespace edge_detection

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::EdgeDetectionNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(edge_detection::EdgeDetectionNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/equalize_histogram_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,9 @@ class EqualizeHistogramNodelet : public opencv_apps::Nodelet
};
} // namespace opencv_apps

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::EqualizeHistogramNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/face_detection_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ class FaceDetectionNodelet : public opencv_apps::FaceDetectionNodelet
};
} // namespace face_detection

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::FaceDetectionNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(face_detection::FaceDetectionNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/face_recognition_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ class FaceRecognitionNodelet : public opencv_apps::FaceRecognitionNodelet
};
} // namespace face_recognition

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::FaceRecognitionNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(face_recognition::FaceRecognitionNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/fback_flow_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ class FBackFlowNodelet : public opencv_apps::FBackFlowNodelet
};
} // namespace fback_flow

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::FBackFlowNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(fback_flow::FBackFlowNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/find_contours_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ class FindContoursNodelet : public opencv_apps::FindContoursNodelet
};
} // namespace find_contours

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::FindContoursNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(find_contours::FindContoursNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/general_contours_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ class GeneralContoursNodelet : public opencv_apps::GeneralContoursNodelet
};
} // namespace general_contours

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::GeneralContoursNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(general_contours::GeneralContoursNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/goodfeature_track_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ class GoodfeatureTrackNodelet : public opencv_apps::GoodfeatureTrackNodelet
};
} // namespace goodfeature_track

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::GoodfeatureTrackNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(goodfeature_track::GoodfeatureTrackNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/hough_circles_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ class HoughCirclesNodelet : public opencv_apps::HoughCirclesNodelet
};
} // namespace hough_circles

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::HoughCirclesNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(hough_circles::HoughCirclesNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/hough_lines_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ class HoughLinesNodelet : public opencv_apps::HoughLinesNodelet
};
} // namespace hough_lines

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::HoughLinesNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(hough_lines::HoughLinesNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/lk_flow_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ class LKFlowNodelet : public opencv_apps::LKFlowNodelet
};
} // namespace lk_flow

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::LKFlowNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(lk_flow::LKFlowNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/morphology_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ class MorphologyNodelet : public opencv_apps::MorphologyNodelet
};
} // namespace morphology

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::MorphologyNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(morphology::MorphologyNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/people_detect_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ class PeopleDetectNodelet : public opencv_apps::PeopleDetectNodelet
};
} // namespace people_detect

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::PeopleDetectNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(people_detect::PeopleDetectNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/phase_corr_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ class PhaseCorrNodelet : public opencv_apps::PhaseCorrNodelet
};
} // namespace phase_corr

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::PhaseCorrNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(phase_corr::PhaseCorrNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/pyramids_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ class PyramidsNodelet : public opencv_apps::PyramidsNodelet
};
} // namespace pyramids

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::PyramidsNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(pyramids::PyramidsNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/segment_objects_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ class SegmentObjectsNodelet : public opencv_apps::SegmentObjectsNodelet
};
} // namespace segment_objects

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::SegmentObjectsNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(segment_objects::SegmentObjectsNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/simple_compressed_example_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ class SimpleCompressedExampleNodelet : public opencv_apps::SimpleCompressedExamp
};
} // namespace simple_compressed_example

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::SimpleCompressedExampleNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(simple_compressed_example::SimpleCompressedExampleNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/simple_example_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ class SimpleExampleNodelet : public opencv_apps::SimpleExampleNodelet
};
} // namespace simple_example

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::SimpleExampleNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(simple_example::SimpleExampleNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/simple_flow_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ class SimpleFlowNodelet : public opencv_apps::SimpleFlowNodelet
};
} // namespace simple_flow

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::SimpleFlowNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(simple_flow::SimpleFlowNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/smoothing_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ class SmoothingNodelet : public opencv_apps::SmoothingNodelet
};
} // namespace smoothing

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::SmoothingNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(smoothing::SmoothingNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/threshold_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ class ThresholdNodelet : public opencv_apps::ThresholdNodelet
};
} // namespace threshold

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::ThresholdNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(threshold::ThresholdNodelet, nodelet::Nodelet);
4 changes: 4 additions & 0 deletions src/nodelet/watershed_segmentation_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ class WatershedSegmentationNodelet : public opencv_apps::WatershedSegmentationNo
};
} // namespace watershed_segmentation

#ifdef USE_PLUGINLIB_CLASS_LIST_MACROS_H
#include <pluginlib/class_list_macros.h>
#else
#include <pluginlib/class_list_macros.hpp>
#endif
PLUGINLIB_EXPORT_CLASS(opencv_apps::WatershedSegmentationNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(watershed_segmentation::WatershedSegmentationNodelet, nodelet::Nodelet);

0 comments on commit b4627d9

Please sign in to comment.