diff --git a/patch/ros-lyrical-rtabmap-conversions.patch b/patch/ros-lyrical-rtabmap-conversions.patch new file mode 100644 index 00000000..ed9d61a0 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-conversions.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4dc4190..ed08e21 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,8 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + builtin_interfaces__rosidl_generator_c_LIB NAMES builtin_interfaces__rosidl_generator_c +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + +diff --git a/include/rtabmap_conversions/MsgConversion.h b/include/rtabmap_conversions/MsgConversion.h +index 4e82e38..6f657f3 100644 +--- a/include/rtabmap_conversions/MsgConversion.h ++++ b/include/rtabmap_conversions/MsgConversion.h +@@ -39,7 +39,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + + #include ++#if CV_MAJOR_VERSION < 5 + #include ++#else ++#include ++#endif + #ifdef PRE_ROS_IRON + #include + #else diff --git a/patch/ros-lyrical-rtabmap-msgs.patch b/patch/ros-lyrical-rtabmap-msgs.patch new file mode 100644 index 00000000..0c3dd7d2 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-msgs.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 01e7ceb..f97a796 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,8 +14,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + rcutils_LIB NAMES rcutils +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + diff --git a/patch/ros-lyrical-rtabmap-odom.patch b/patch/ros-lyrical-rtabmap-odom.patch new file mode 100644 index 00000000..787c9e90 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-odom.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b10ad2..6ef5020 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,8 +14,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + builtin_interfaces__rosidl_generator_c_LIB NAMES builtin_interfaces__rosidl_generator_c +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + diff --git a/patch/ros-lyrical-rtabmap-rviz-plugins.patch b/patch/ros-lyrical-rtabmap-rviz-plugins.patch new file mode 100644 index 00000000..69e452c3 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-rviz-plugins.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4e47a68..c8eb361 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,8 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + message_filters_LIB NAMES message_filters +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + diff --git a/patch/ros-lyrical-rtabmap-slam.patch b/patch/ros-lyrical-rtabmap-slam.patch new file mode 100644 index 00000000..24b821e9 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-slam.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6107b23..97ea89f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,8 +14,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + builtin_interfaces__rosidl_generator_c_LIB NAMES builtin_interfaces__rosidl_generator_c +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + +diff --git a/src/CoreWrapper.cpp b/src/CoreWrapper.cpp +index c1fb75b..bb732d6 100644 +--- a/src/CoreWrapper.cpp ++++ b/src/CoreWrapper.cpp +@@ -1474,7 +1474,7 @@ void CoreWrapper::commonMultiCameraCallbackImpl( + cv::Mat leftMono; + if(rgb.channels() == 3) + { +- cv::cvtColor(rgb, leftMono, CV_BGR2GRAY); ++ cv::cvtColor(rgb, leftMono, cv::COLOR_BGR2GRAY); + } + else + { diff --git a/patch/ros-lyrical-rtabmap-sync.patch b/patch/ros-lyrical-rtabmap-sync.patch new file mode 100644 index 00000000..683ece51 --- /dev/null +++ b/patch/ros-lyrical-rtabmap-sync.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 106d23c..70eaa47 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,13 +5,11 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + builtin_interfaces__rosidl_generator_c_LIB NAMES builtin_interfaces__rosidl_generator_c +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + find_library( + crypto_LIB NAMES crypto +- PATHS "/usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + diff --git a/patch/ros-lyrical-rtabmap-viz.patch b/patch/ros-lyrical-rtabmap-viz.patch new file mode 100644 index 00000000..cbe6465a --- /dev/null +++ b/patch/ros-lyrical-rtabmap-viz.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index add21b0..371140e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,18 +9,15 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + builtin_interfaces__rosidl_generator_c_LIB NAMES builtin_interfaces__rosidl_generator_c +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + find_library( + rcutils_LIB NAMES rcutils +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + find_library( + crypto_LIB NAMES crypto +- PATHS "/usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu" +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED + ) + endif() + +diff --git a/src/GuiNode.cpp b/src/GuiNode.cpp +index 88895ed..e62af21 100644 +--- a/src/GuiNode.cpp ++++ b/src/GuiNode.cpp +@@ -32,6 +32,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include ++#include ++#include ++#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1) ++#include ++#endif + + QApplication * app = 0; + +@@ -49,6 +54,13 @@ int main(int argc, char** argv) + + rclcpp::init(argc, argv); + ++#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1) ++ // needed to ensure appropriate OpenGL context is created for VTK rendering ++ // (without it, macOS creates a legacy OpenGL 2.1 context and VTK crashes). ++ QSurfaceFormat::setDefaultFormat(QVTKRenderWidget::defaultFormat()); ++#endif ++ QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); ++ + app = new QApplication(argc, argv); + app->connect( app, SIGNAL( lastWindowClosed() ), app, SLOT( quit() ) ); + diff --git a/vinca.yaml b/vinca.yaml index 85deac0f..3573a543 100644 --- a/vinca.yaml +++ b/vinca.yaml @@ -431,6 +431,7 @@ packages_select_by_deps: - rqt_reconfigure - rqt_tf_tree - rslidar_sdk + - rtabmap_ros - rviz_2d_overlay_plugins - rviz_satellite - serial_driver