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 Mar 20, 2024
1 parent 9a92687 commit 0844190
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions Formula/r/rtabmap.rb
@@ -0,0 +1,66 @@
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 13-arm64

`brew test --verbose rtabmap` failed on macOS Ventura (13) on Apple Silicon!

-- 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::FiltersGeometry;VTK::FiltersModeling;VTK::FiltersSources;VTK::ImagingCore;VTK::ImagingSources;VTK::InteractionImage;VTK::InteractionStyle;VTK::InteractionWidgets;VTK::IOCore;VTK::IOGeometry;VTK::IOImage;VTK::IOLegacy;VTK::IOPLY;VTK::RenderingAnnotation;VTK::RenderingCore;VTK::RenderingContext2D;VTK::RenderingLOD;VTK::RenderingFreeType;VTK::ViewsCore;VTK::ViewsContext2D;VTK::RenderingOpenGL2;VTK::RenderingContextOpenGL2;VTK::GUISupportQt;FLANN::FLANN;QHULL::QHULL (Required is at least version "1.7") -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Configuring done (4.8s) -- Generating done (0.0s) CMake Warning: Manually-specified variables were not used by the project: BUILD_TESTING -- Build files have been written to: /tmp/rtabmap-test-20240319-26049-2bd01h ==> make /opt/homebrew/Cellar/cmake/3.28.3/bin/cmake -S/tmp/rtabmap-test-20240319-26049-2bd01h -B/tmp/rtabmap-test-20240319-26049-2bd01h --check-build-system CMakeFiles/Makefile.cmake 0 /opt/homebrew/Cellar/cmake/3.28.3/bin/cmake -E cmake_progress_start /tmp/rtabmap-test-20240319-26049-2bd01h/CMakeFiles /tmp/rtabmap-test-20240319-26049-2bd01h//CMakeFiles/progress.marks /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/depend cd /tmp/rtabmap-test-20240319-26049-2bd01h && /opt/homebrew/Cellar/cmake/3.28.3/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/rtabmap-test-20240319-26049-2bd01h /tmp/rtabmap-test-20240319-26049-2bd01h /tmp/rtabmap-test-20240319-26049-2bd01h /tmp/rtabmap-test-20240319-26049-2bd01h /tmp/rtabmap-test-20240319-26049-2bd01h/CMakeFiles/test.dir/DependInfo.cmake "--color=" /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/build [ 50%] Building CXX object CMakeFiles/test.dir/test.cpp.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DEIGEN_HAS_CXX17_OVERALIGN=0 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -Dkiss_fft_scalar=double -isystem /opt/homebrew/include/eigen3 -isystem /opt/homebrew/Cellar/rtabmap/0.21.4/include/rtabmap-0.21 -isystem /opt/homebrew/Cellar/opencv/4.9.0_5/include/opencv4 -isystem /opt/homebrew/include/pcl-1.14 -isystem /opt/homebrew/include -isystem /opt/homebrew/opt/libpcap/include -isystem /Library/Developer/C
# 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

# Required to avoid missing Xcode headers
# https://github.com/Homebrew/homebrew-core/pull/162576/files#r1489824628
ENV.delete "CPATH" if OS.mac? && !MacOS::CLT.installed?

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 0844190

Please sign in to comment.