Part.I Basic Settings. ROS installation
We are using Ubuntu 12.04 (Precision) and ROS fuerte, on 32 bit system.First you need to follow the instructions on http://www.ros.org/wiki/rgbdslam. If you are new to ROS, better spend at least one week time on the ROS basic things. Keeping in mind that every time downloading packages using svn, you need to enter the /ros_workspace (may differ according to your configuration, mine is /fuerte_workspace) first. Just type 'roscd' in terminal, it should bring you there.
If it brings you into the /opt/ros/fuerte/... something like that, means your ROS_PACKAGE_PATH is not set properly. It is a system environment variable, your can change it in setup.sh. In my case, I added
First, create the overlay and read through the rosws tutorial.
So check out the rgbdslam package using svn in the fuerte_workspace.
svn co http://alufr-ros-pkg.googlecode.com/svn/trunk/rgbdslam_freiburg
Though it is possible to link the package with its source, I do not recommend you to do this. As we know ros is an actively maintained system and many packages are updating frequently. But for most of the users, we only aim for an stable version and do not want to make any change after we successfully integrate it with our own system.
Set rgbdslam_freiburg to a workspace, you should stay in your fuerte_workspace folder.
rosws set rgbdslam_freiburg
Remember to restart your terminal or source the setup.sh. Try roscd rgbdslam, does it work?
Part.II Install all the dependencies
In fuerte and electric, the command to install all the dependencies are different. Though on wiki, the documentation is well distinguished, on the website answer.ros.org, some replies may be misled. We did not use any command other than provided by the wiki.
Remember to install QT first, it deals with GUI. Install it from Ubuntu software center. Install the QT Creator.
rosdep install rgbdslam_freiburg
it may give you some error. If you are installing QT...then wait until finished. Ubuntu can only install one software at one time. If it says missing package rgbdslam, means you did not download the software in the correct path or your ROS_PACKAGE_PATH not set..go to PART. I...
Any other dependencies missing, you need to check manifest.xml. We simply explain the meaning of the scripts.
means you need to have a ros package, namely g2o, it will compile this package when you compiles the rgbdslam.
means you need to install a library. So rosdep install rgbdslam_freiburg will install all the libraries.
Problem for eigen, you need to change package to library. When I downloaded the source, it had changed already. See this link http://answers.ros.org/question/38989/rgbdslam-with-ros-fuerte-installed/
A lot of rgbdslam users mentioned change g2o library to package. We explain this in detail in next part.
Part. III g2o, manifest.xml, CMakeLists.txt
A. Follow http://ros.org/wiki/g2o, make sure that you can use roscd g2o to access the folder. Try to rosmake the package, it gives an certificate verification error...Due to the svn command. Actually the ros g2o package need to use svn to download code from openslam and compile it. Check this link http://answers.ros.org/question/50745/rgbdslam-error-trust-certificate-g2o-problem/
I think the author commented out the wrong line in the g2o makefile https://code.ros.org/svn/ros-pkg/stacks/vslam/trunk/g2o/Makefile, or maybe due to different configurations.
Change the corresponding local makefile to
Change the g2o to package setting. Means change this line
C.Modify the CMakeLists.txt in rgbdslam
Remove the line
Useful info can be found in these two posts
Seems electric and fuerte got same error..Now it should be no problem to compile rgbdslam package. I hope this article can be useful for those who are still struggling with rgbdslam package compiling. Leave me a message if you think anything need to be improved.