Skip to content

Commit

Permalink
rtabmap 0.21.3 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Feb 16, 2024
1 parent cfb5468 commit 3df9ac5
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions Formula/r/rtabmap.rb
@@ -0,0 +1,60 @@
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.3-noetic.tar.gz"
sha256 "d7fc662d19a6ff772c81cc96365862afdb9bac7f41aeb4d6c543ed3a2477fb01"
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 / Linux

`brew test --verbose rtabmap` failed on Linux!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle clean ==> Testing rtabmap ==> /home/linuxbrew/.linuxbrew/Cellar/rtabmap/0.21.3/bin/rtabmap-console --version ==> cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -DRTABMap_DIR=/home/linuxbrew/.linuxbrew/Cellar/rtabmap/0.21.3/lib/rtabmap-0.21 -- The C compiler identification is GNU 11.4.0 -- The CXX compiler identification is GNU 11.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc-11 - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++-11 - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenCV: /home/linuxbrew/.linuxbrew/Cellar/opencv/4.9.0_2 (found version "4.9.0") found components: core calib3d imgproc highgui stitching photo video aruco xfeatures2d missing components: nonfree gpu cudafeatures2d -- Found Boost: /home/linuxbrew/.linuxbrew/lib/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable version "1.84.0", minimum required is "1.65.0") found components: system filesystem iostreams serialization -- Found Pcap: /home/linuxbrew/.linuxbrew/lib/libpcap.so -- Found ZLIB: /home/linuxbrew/.linuxbrew/lib/libz.so (found version "1.3.1") -- Found PNG: /home/linuxbrew/.linuxbrew/lib/libpng.so (found version "1.6.42") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found GLEW: /home/linuxbrew/.linuxbrew/lib/libGLEW.so -- Found OpenGL: /home/linuxbrew/.linuxbrew/lib/libGL.so found components: OpenGL -- Found utf8cpp: /home/linuxbrew/.linuxbrew/include/utf8cpp -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Found OpenGL: /home/linuxbrew/.linuxbrew/lib/libGL.so -- Found WrapOpenGL: TRUE -- Found XKB: /home/linuxbrew/.linuxbrew/lib/libxkbcommon.so (found suitable version "1.5.0", minimum required is "0.5.0") -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Found Eigen3: /home/linuxbrew/.linuxbrew/include/eigen3 (found version "3.4.0") -- Found X11: /home/linuxbrew/.linuxbrew/include -- Looking for XOpenDisplay in /home/linuxbrew/.linuxbrew/lib/libX11.so;/home/linuxbrew/.linuxbrew/lib/libXext.so -- Looking for XOpenDisplay in /home/linuxbrew/.linuxbrew/lib/libX11.so;/home/linuxbrew/.linuxbrew/lib/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found EXPAT: /home/linuxbrew/.linuxbrew/lib/libexpat.so (found version "2.5.0") -- Found double-conversion: /home/linuxbrew/.linuxbrew/lib/libdouble-conversion.so -- Found LZ4: /home/linuxbrew/.linuxbrew/lib/liblz4.so (found version "1.9.4") -- Found LZMA: /home/linuxbrew/.linuxbrew/lib/liblzma.so (found version "5.4.5") -- Found JPEG: /home/linuxbrew/.linuxbrew/lib/libjpeg.so (found version "80") -- Found TIFF: /home/linuxbrew/.linuxbrew/lib/libtiff.so (found version "4.6.0") -- Checking for module 'libusb-1.0' -- Found libusb-1.0, version 1.0.27 -- Found libusb: /home/linuxbrew/.linuxbrew/lib/libusb-1.0.so -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") found components: CXX CMake Warning (dev) at /home/linuxbrew/.linuxbrew/share/pcl-1.14/Modules/FindFLANN.cmake:45 (find_package): Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT variables. Run "cmake --help-policy CMP0144" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMake variable FLANN_ROOT is set to: /home/linuxbrew/.linux
# 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
ENV.delete "CPATH" # error xcode headers missing
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
system "cmake", ".", "-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 3df9ac5

Please sign in to comment.