Showing posts with label Slam6d. Show all posts
Showing posts with label Slam6d. Show all posts

Monday, December 21, 2015

"No debugging symbols found" in gdb after compiling 3D Toolkit on Linux with CMake

I wanted to step through the source code as I execute the 3D Toolkit show program on Linux but the gdb debugger was unable to load debugging symbols, as shown in the screenshot below.

Previously, I compiled the application with the "make" command but by default, it created build instead of debug executables. So I had to enable debug compilation. In order to do that, I had to do the following:

  1. Open up the 3D Toolkit's CMakeList.txt file in a text editor.


  2. Locate the line

    set (CMAKE_BUILD_TYPE "" CACHE INTERNAL "" FORCE)
  3. Change the above line to the following:

    set (CMAKE_BUILD_TYPE "Debug")


  4. Now recompile the application.
Now, the debugger gdb should be able to load the debug symbols and the source code can be stepped through, as shown below.

 

Monday, September 1, 2014

How to build 3D Toolkit's SLAM6D on Ubuntu 64 bit

The open source 3D Toolkit http://slam6d.sourceforge.net/index.html provides tools to process 3D point clouds. The binary executables can be downloaded but unfortunately they may be outdated. The latest and greatest can be downloaded from the source code repository but you must build and compile the code. I could not compile it successfully on Windows but I could do it on the latest Ubuntu 14.04 64 bit operating system.

The following steps show how to build SLAM6D on Ubuntu.

  1. In Ubuntu, open a Terminal window.
  2. If necessary, update Ubuntu and download the g++ compiler and other development essentials. Run the following commands.

    $ sudo apt-get update
    $ sudo apt-get install build-essential

  3. Download the latest SLAM6D source code to a folder e.g. /home/obama/Documents/slam6d-code.

    $ svn checkout http://svn.code.sf.net/p/slam6d/code/trunk slam6d-code
  4. Install the prerequisite Boost libraries.

    $ sudo apt-get install libboost-all-dev libcv-dev freeglut3-dev libxmu-dev libxi-dev
  5. Use an Internet browser to download the latest OpenCV source code for Linux from http://opencv.org/downloads.html. Extract the files into a folder e.g. /home/obama/Documents/opencv-2.4.9/.
  6. In a Terminal window, use cmake to configure OpenCV source code by entering the following commands.

    $ cd opencv-2.4.9
    $ mkdir release
    $ cd release
    $ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

  7. Now compile and install OpenCV.

    $ make
    $ sudo make install

  8. Compile and build the SLAM6D source code downloaded previously.

    $ cd slam6d-code
    $ make

At this point, the SLAM6D executables would have been built and can be used to process 3D point clouds.