Compiling
Posted by gpuvoxels | Tags:
How can I build and use GPU-Voxels?
The environment
- The software is an interchangeable library (ICL) running within FZIs ic_workspace. “ic” means it can run in whatever environment, e.g. as a ROS-node, as a MCA-module or as a standalone program.
- ICLs are made to be platform independent. Therefore it should be possible to run gpu-voxels natively on the Mac. We never tried though…
- We build it with FZIs icmaker, which is a comfort layer on top of cmake, comparable to ROS catkin
- gpu_voxels depends on the basic library icl_core (OS independent comfort layer that implements logging, config, …) which is delivered with the code.
- There are many more ICLs, making autonomous cars drive, Mars rovers explore, walking machines walk… Some of them will become OpenSource sooner or later.
The build process
- Install the required libraries and make sure that CUDA and its nvcc is correctly installed.
- Clone the software from GitHub into a directory of your choice.
- Change into the directory and create a build folder: mkdir build
- Change into the build folder and run cmake: cd build && cmake ..
A successfull cmake run should contain a section like this:hermann-local@ids-isabel-2:~/src/ic_workspace_open_source/build$ cmake .. -- -------------------------------------------------------------------------- -- ------------------------ GPU Voxels configuration ------------------------ -- -- [OK] Building GPU-Voxels. Found CUDA. -- [OK] Building GPU-Voxels with visualization. GLEW, GLM, OpenGL and GLUT were found. -- [OK] Building GPU-Voxels with URDF support. urdfdom, orocos and kdl_parser were found. -- [OK] Building GPU-Voxels with ROS connections. ROS was found. -- [OK] Building GPU-Voxels with Kinect support. OpenNI was found. -- [OK] Building GPU-Voxels with Octomap support. Octomap found. -- [OK] Building GPU-Voxels with PCL interfaces. PCL found. -- -- -------------------- END of GPU Voxels configuration --------------------- -- --------------------------------------------------------------------------
- Start compilation: make (or if you have some more cores make -j9)
Feel free to use ninja for the build. We experienced no problems with that.
To switch between Debug and Release builds, use cmake .. -DCMAKE_BUILD_TYPE=[Release/Debug/RelWithDebInfo]
==> After installing the libs, continue with starting an example.
Troubleshooting
- No build targets are generated by cmake? ==> Read the output of cmake and search for missing dependencies.
- You see some warnings during the build process? ==> Don’t worry, many of them are irrelevant. Please create an issue on GitHub if you notice something unexpected related to the build.
- Problems with GLM while building the Visualizer? ==> Most probably you will have to patch one file: See https://github.com/g-truc/glm/issues/530