Comments (17)
@Alabate Thanks a lot for your efforts to port maplab to ARM based devices and for sharing your diff. Regarding your remarks: I agree, ANDROID
is not a good flag name for this purpose, but having a global cmake flag which is set based on the processor architecture sounds like a good idea. Potentially, we can also replace the script from aslam_cv_common
with a combination of FindARM.cmake and FindSSE.cmake and then set the -mssse3
or -mfpu=neon
flags based on this. I think we can put this script just in aslam_cv_common
and then copy it to the two other repos that also use it. As I'm currently also building maplab on an Odroid, I will try to put something together and tag you, ok?
from maplab.
We released an experimental pre-release branch which adds build compatibility for armv7
and armv8
processors (along with some other changes).
You can test it by checking out the branch pre-release-january
in both the maplab
and the maplab_dependencies
repo:
git pull
git checkout pre-release-january
git submodule init
git submodule update --recursive
After this, clean the catkin workspace and rebuild it:
catkin clean
catkin build maplab
We are happy to hear if this works for you.
from maplab.
Good news! With that change the entire package builds successfully.
from maplab.
Hi, thanks a lot for your question.
To be honest, the amount of work is difficult to predict, but I think it's worth a try. It's also hard to say what will be the impact on performance as you're lacking SSE optimization that Eigen broadly uses (and Eigen matrices are present all over the project).
-
This Id problem in
maplab_common
is rather easy to fix, you just need to hack in a routine to generate a unique id on a 32-bit machine. As you can see, id is composed of two 64-bit values so you just need to properly initialize them (make sure the id space is 128bit not 64bit to avoid Id clashes). -
-mssse3
flag is just to enable Eigen optimizations using SSE3. You can probably kick out this flag for now and see what happens, I don't think we strictly depend on SSE, it was just to promote the optimization by the compiler.
Another issue you may encounter are Eigen alignment issues (we might be missing proper alignment in some places), which show up much more often on 32-bit machines. On the other hand, they are resulting from x86 SSE optimizations, not sure if Eigen has some ARM-specific code (NEON?) that might cause them.
from maplab.
Ok, so I managed to build and start a bag. I'm giving you the diff of my workspace, to let anyone do the same. But those are really dirty modifications, sometimes even useless or just dumb (like in descriptor-projection
where I tried to add 3 times the same thing in the CMakeLists.txt
because it wouldn't work). We have to find clean ways to fix the same problems.
https://gist.github.com/Alabate/c1017c4f0a6c3b9e5e6db75ddbcddf0b
from maplab.
As you can see, most of modifications are removing the -mssse3
to add -mfpu=neon
instead. How could we do this in a clean way ?
- I see on some part of the project that there is an
ANDROID
flag in cmake that enable neon. We could use this flag in every part of the project. In this case a simple parameter in the catkin worskpace would enable the arm build. However, I don't thinkANDROID
is a good name for a such flag, because android is not the only arm system and android can be installed on x86. - In
aslam_cv2/aslam_cv_common/cmake/export_flags.cmake
there is also theIS_ARM_ARCHITECTURE
flag which is generated by the following script. This could also be a good solution, the name of the flag is definitely better. But in this case, we have to put this script somewhere and include it in every CMakeFile.txt. We could put it in every repo that need it, or in another simple repo which would be a dependency.
set(IS_ARM_ARCHITECTURE FALSE)
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE)
if (ARCHITECTURE MATCHES "^(arm)")
set(IS_ARM_ARCHITECTURE TRUE)
endif()
What do you think ?
from maplab.
Actually a think this script might do the job.
from maplab.
Guys, thanks for the amazing project. As @Alabate I was trying to make it work on the Nvidia TX1.
Like you point out, the extensive use of -mssse3 is the biggest concern. Regarding the dependencies, I manage to compile:
doxygen_catkin -> ok
catkin_simple -> ok
gflags -> ok
glogs -> ok (use lates version from git, remove the patch in the make,
have libunwind-dev libunwind8-dev pre installed)
Voxblox -> ok
Opencv3_catkin -> ok
the rest still trying out, especially aslam pkg (-mssse3) and brisk. Brisk released a v2, and it should implement NEON. Still need to try it.
Keep you update and thanks for the work!
from maplab.
Could this be a simple fix - JakobEngel/dso#59 ?
from maplab.
@bidbest Have you managed to build brisk on the TX1? When I remove the -msse3
option I get error:
fatal error: emmintrin.h: No such file or directory
I found this SSE2NEON.h, maybe this could help?
from maplab.
@hoangthien94 Diden't try it yet. I'm currently working on x86 processors, will try again on arm in the future. If I remember correctly emmintrin.h file is considered only when flagh sse3 is present. You can try to test Brisk v2, that should support NEON., and hope it will not conflict with the rest of maplab.
from maplab.
@hoangthien94 We are working on porting maplab to ARM. Regarding ethz-asl/brisk repo, you can alreay checkout the feature/port-to-arm branch there which should do the job.
from maplab.
Hi @fabianbl, I have tried the feature/port-to-arm branch ,but it still failed when building brisk with following errors:
c++: error: unrecognized command line option ‘-mfpu=neon’
My device is Nvidia Jetson TX2 which's architecture is aarch64.
$ uname -a
Linux CAR01-CU03 4.4.38 #1 SMP PREEMPT Tue Oct 10 15:24:32 CST 2017 aarch64 aarch64 aarch64 GNU/Linux
from maplab.
Hi @megamindhe . Thank you a lot for your report. Unfortunately, we weren't able yet to test this on an armv8
architecture (but will do so soon). Apparently, for these processors, no specifications for using advanced SIMD are necessary (see here). For now, you can simply comment out all occurrences of -mfpu=neon
(e.g. here in ethz-asl/ethzasl_brisk).
from maplab.
I tried building on a Jetson tx2, ubuntu 16.04, ROS kinetic, with the experimental pre-release branch.
The initial try failed with an "internal compiler error" while building rovio. Looking at the logfile, the error occurred right after:
[ 94%] Built target feature_tracker_node
On the second try, it succeeded with rovio but failed while building vi_map (46/91), with this error:
Errors << vi_map:cmake /home/nvidia/maplab_ws/logs/vi_map/build.cmake.000.log
CMake Error at /home/nvidia/maplab_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:38 (find_package):
By not providing "Findbenchmark_catkin.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"benchmark_catkin", but CMake did not find one.Could not find a package configuration file provided by "benchmark_catkin"
with any of the following names:benchmark_catkinConfig.cmake benchmark_catkin-config.cmake
from maplab.
@dan9thsense Thank you for your report. I think what you can do is:
cd ~/maplab_ws/src/maplab_dependencies
git submodule init
git submodule update
This will initialize and checkout benchmark_catkin which was not there in the master branch. Forgot to mention this, I now added it to the description above.
from maplab.
@fabianbl I added your instructions to the PR description as well, thx.
from maplab.
Related Issues (20)
- How to use rovio or other odometery with multi-camera on maplab 2.0 HOT 4
- "aslam/common/id.pb.h" not found HOT 3
- Compilation Error ROS Noetic, Ubunto 20.04 HOT 4
- Unable to open example VI map in maplab - missing vi_map/vi_map_metadata HOT 6
- How to add lidar resource with vio data to map in maplab2.0?
- Failed to save mesh to disk
- The generation process of the dense point cloud image is not displayed after executing sdr --flagfile=
- Could I get a demo for lidar date process in maplab2.0?Especially the lidar yaml and .sh file.
- plot_vi_states_of_mission not work
- wheels odometry integration HOT 1
- Cmake submodules for internal dependencies
- How to transmit the actual submap data to the mapping server?
- multi-cam run
- Error while running the tutorial_euroc_live script HOT 1
- maplab2.0 branch problem
- ROVIO on EUROC V2_03 difficult misses trajectory estimates
- undefined reference to `void backend::addLabelToPointCloud<resources::VoxbloxColorPointCloud>(unsigned int, unsigned long, resources::VoxbloxColorPointCloud*)'
- Write an assembly program that simulates a single-digit counter (0-9) that: increments on the rising edges of RB4 (by interrupt); decrement on the rising edges of RB5 (by interrupt); automatically initializes if its value reaches the maximum value of 9; it can be initialized by the operator using an interrupt on RB0. Modify your program to add an LED that blinks as long as the counter=0 by: Using a timer based on timer0 of 250 ms (Osc=16MHz)
- Not able to execute `init-git-hooks.py`
- LiDAR based Mapping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maplab.