-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling on OSX Mavericks 10.9.3 with clang and No-ROS (Success!) #16
Comments
Hi, |
That's another issue related to Mac Mavericks (Xcode 5.1). When I compile svo, the compiler gives such message:
It seems that the compiler with the new xcode is quite restrictive when it comes to warnings. I guess that may need additional ARCHFLAGS but I don't know which one is proper. |
isnanf() is not defined on OSX, could this: |
i changed it to std::isnan(). (http://en.cppreference.com/w/cpp/numeric/math/isnan) |
Thanks! |
Very similar experience to @b4silio. Kudos to him for finding the workarounds! This is on OSX 10.9.5, using XCode 6.0.1. Follow all directions in https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-Plain-CMake-(No-ROS), with the following modifications: Eigen
SophusIn sophus/so2.cpp replace:
with:
(Could the SVO maintainers upgrade to using latest Sophus? It compiles correctly on OSX.) Fast(No OpenCV problems similar to those reported by @b4silio.) In CMakeLists.txt, remove (Could the SVO maintainers make this flag compiler dependent? Clang fails due to its presence.) G2O (optional)skipped Vikit(No OpenCV problems similar to those reported by @b4silio.) RPG-SVOIn CMakeLists.txt, remove (Could the SVO maintainers make this flag compiler dependent? Clang fails due to its presence.) Running the testsThe tests work fine, as does test_pipeline on a custom dataset! |
Thanks for your experience sharing (especially the complex number part in Sophus)! I can compile the source smoothly on OS X 10.10.2 with Xcode 6.1.1! |
On an OS X 10.10.3 with Xcode 6.3.1, I have Sophus installed, and the files are present at /usr/local/include/sophus. All the tests for Sophus pass. The tail of Install the project...
/usr/local/Cellar/cmake/3.2.1/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include/sophus
-- Up-to-date: /usr/local/include/sophus/rxso3.hpp
-- Up-to-date: /usr/local/include/sophus/se2.hpp
-- Up-to-date: /usr/local/include/sophus/se3.hpp
-- Up-to-date: /usr/local/include/sophus/sim3.hpp
-- Up-to-date: /usr/local/include/sophus/so2.hpp
-- Up-to-date: /usr/local/include/sophus/so3.hpp
-- Up-to-date: /usr/local/include/sophus/sophus.hpp
-- Up-to-date: /usr/local/include/sophus/tests.hpp Now when I try to build rpg_svo/svo the output of MACOSX_RPATH is not specified for the following targets:
svo Here is the output of [ 4%] Building CXX object CMakeFiles/svo.dir/src/frame_handler_mono.cpp.o
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
In file included from /Users/pranav/workspace/rpg_svo/svo/src/frame_handler_mono.cpp:18:
In file included from /Users/pranav/workspace/rpg_svo/svo/include/svo/frame_handler_mono.h:22:
In file included from /Users/pranav/workspace/rpg_svo/svo/include/svo/frame_handler_base.h:26:
/Users/pranav/workspace/rpg_svo/svo/include/svo/global.h:29:10: fatal error: 'sophus/se3.h' file not found
#include <sophus/se3.h>
^
2 warnings and 1 error generated.
make[2]: *** [CMakeFiles/svo.dir/src/frame_handler_mono.cpp.o] Error 1
make[1]: *** [CMakeFiles/svo.dir/all] Error 2
make: *** [all] Error 2 I can't seem to find out the solution for this. What could be causing it? |
@pranny I'm pretty sure you just forgot to checkout the a621ff commit of Sophus as mentioned in the wiki page for the install instructions https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-Plain-CMake-(No-ROS). This will give you the .h files instead of the .hpp files in the current master branch. That seems to be what's giving you the file not found fatal error. |
Hi, Everyone, Thanks for the helpful posts for running SVO on Mac without ROS. I have successfully compiled the code and all tests seem work except ./test_depth_filter. It causes errors in two places listed below. Please help me and let me know how to fix the problem. Thanks! ======= Problem 1 ============ ======== Problem 2 ========= |
@weiminshen99, have you solved Problem 1 yet? I have the exactly the same error. |
I finally managed to compile rpg_svo successfully after several hours of headbanging (due in no small part to my ineptitude with CMake)
I followed the instruction on https://github.com/uzh-rpg/rpg_svo/wiki/Installation:-Plain-CMake-(No-ROS). What follow are the issues I encountered along the way, and how I solved them.
Eigen 3
Sophus - Lie groups
unit_complex = Complexd(1.,0.);_
instead of
unit_complex.real() = 1.;_
unit_complex.imag() = 0.;_
solves the issue.
Fast - Corner Detector
Compiling G2O (optional)
vikit_common
rpg_svo
set(vikit_common_LIBRARIES "/Users/basilio/Code/RPG_SVO/rpg_vikit/vikit_common/lib/libvikit_common.dylib")
as well as copying the vikit include folder in svo (the lazy alternative to actually doing it properly in CMake)
#include < ros/package.h >
needs to be commented away if you’re not using ROS
boost::make_shared< svo::Frame > (cam, img, 0.0);_
adding
#include < boost/make_shared.hpp >
#include < boost/shared_ptr.hpp >
Solved the issue
Running the tests
The tests work fine, as does test_pipeline on a custom dataset!
p.s. sorry for the bad formatting, not a guru with Markdown!
p.p.s posting this as an Issue because I didn't know where else to put it!
The text was updated successfully, but these errors were encountered: