Skip to content

Commit

Permalink
rtabmap 0.21.4 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Feb 21, 2024
1 parent f2f8e91 commit 335eb75
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Formula/r/rtabmap.rb
@@ -0,0 +1,61 @@
class Rtabmap < Formula
desc "Visual and LiDAR SLAM library and standalone application"
homepage "https://introlab.github.io/rtabmap"
url "https://github.com/introlab/rtabmap/archive/refs/tags/0.21.4.tar.gz"
sha256 "242f8da7c5d20f86a0399d6cfdd1a755e64e9117a9fa250ed591c12f38209157"
license "BSD-3-Clause"
head "https://github.com/introlab/rtabmap.git", branch: "master"

depends_on "cmake" => [:build, :test]
depends_on "g2o"
depends_on "librealsense"
depends_on "octomap"
depends_on "opencv"
depends_on "pcl"
depends_on "pdal"

def install
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do

Check failure on line 26 in Formula/r/rtabmap.rb

View workflow job for this annotation

GitHub Actions / macOS 12-arm64

`brew test --verbose rtabmap` failed on macOS Monterey (12) on Apple Silicon!

-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** io features related to OpenMP will be disabled -- Found flann version 1.9.2 -- Found Qhull version 8.0.2 -- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework found components: OpenGL -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** surface features related to OpenMP will be disabled -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** filters features related to OpenMP will be disabled -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** features features related to OpenMP will be disabled -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** registration features related to OpenMP will be disabled -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** registration features related to OpenMP will be disabled -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) ** WARNING ** segmentation features related to OpenMP will be disabled -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- looking for PCL_COMMON -- Found PCL_COMMON: /opt/homebrew/lib/libpcl_common.dylib -- looking for PCL_OCTREE -- Found PCL_OCTREE: /opt/homebrew/lib/libpcl_octree.dylib -- looking for PCL_IO -- Found PCL_IO: /opt/homebrew/lib/libpcl_io.dylib -- looking for PCL_KDTREE -- Found PCL_KDTREE: /opt/homebrew/lib/libpcl_kdtree.dylib -- looking for PCL_SEARCH -- Found PCL_SEARCH: /opt/homebrew/lib/libpcl_search.dylib -- looking for PCL_SURFACE -- Found PCL_SURFACE: /opt/homebrew/lib/libpcl_surface.dylib -- looking for PCL_FILTERS -- Found PCL_FILTERS: /opt/homebrew/lib/libpcl_filters.dylib -- looking for PCL_2D -- Found PCL_2D: /opt/homebrew/include/pcl-1.14 -- looking for PCL_FEATURES -- Found PCL_FEATURES: /opt/homebrew/lib/libpcl_features.dylib -- looking for PCL_REGISTRATION -- Found PCL_REGISTRATION: /opt/homebrew/lib/libpcl_registration.dylib -- looking for PCL_SAMPLE_CONSENSUS -- Found PCL_SAMPLE_CONSENSUS: /opt/homebrew/lib/libpcl_sample_consensus.dylib -- looking for PCL_GEOMETRY -- Found PCL_GEOMETRY: /opt/homebrew/include/pcl-1.14 -- looking for PCL_ML -- Found PCL_ML: /opt/homebrew/lib/libpcl_ml.dylib -- looking for PCL_SEGMENTATION -- Found PCL_SEGMENTATION: /opt/homebrew/lib/libpcl_segmentation.dylib -- looking for PCL_VISUALIZATION -- Found PCL_VISUALIZATION: /opt/homebrew/lib/libpcl_visualization.dylib -- Found PCL: pcl_common;pcl_octree;pcl_io;pcl_kdtree;pcl_search;pcl_surface;pcl_filters;pcl_features;pcl_registration;pcl_sample_consensus;pcl_ml;pcl_segmentation;pcl_visualization;Boost::system;Boost::filesystem;Boost::iostreams;Boost::serialization;VTK::ChartsCore;VTK::CommonColor;VTK::CommonComputationalGeometry;VTK::CommonCore;VTK::CommonDataModel;VTK::CommonExecutionModel;VTK::CommonMath;VTK::CommonMisc;VTK::CommonTransforms;VTK::FiltersCore;VTK::FiltersExtraction;VTK::FiltersGeneral;VTK::Filte
# Test if main app is built and can be launched
output = if OS.linux?
# CI linux cannot start windows apps, causing qt plugins failing
shell_output("#{bin}/rtabmap-console --version")
else
shell_output("#{bin}/rtabmap --version")
end
assert_match "RTAB-Map: #{version}", output

# Test c++ library
rtabmap_dir = lib/"rtabmap-#{version.major_minor}"
(testpath/"CMakeLists.txt").write <<~EOS
cmake_minimum_required(VERSION 3.10)
project(test)
find_package(RTABMap REQUIRED COMPONENTS core)
add_executable(test test.cpp)
target_link_libraries(test rtabmap::core)
EOS
(testpath/"test.cpp").write <<~EOS
#include <rtabmap/core/Rtabmap.h>
#include <stdio.h>
int main()
{
rtabmap::Rtabmap rtabmap;
printf(RTABMAP_VERSION);
return 0;
}
EOS
args = std_cmake_args
args << "-DCMAKE_BUILD_RPATH=#{lib}" if OS.linux?
system "cmake", ".", *args, "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DRTABMap_DIR=#{rtabmap_dir}"
system "make"
assert_equal version.to_s, shell_output("./test").strip
end
end

0 comments on commit 335eb75

Please sign in to comment.