Skip to content
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

Indigo devel #12

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Indigo devel #12

wants to merge 16 commits into from

Conversation

bmagyar
Copy link

@bmagyar bmagyar commented Apr 15, 2015

Hello guys,

First of all, congratulations, nice work!

I've catkinized the package, so that it is easier to start using it in a ROS Hydro-Indigo environment.
I had some issues with g2o not properly overlaying the system installed version I have, but if it is in catkin it works fine. DBoW could have also been moved to a separate package but the CMakeLists.txt there was much more forgiving than g2o so I got away with tiny changes.

This pull request cannot be merged to your master, probably better to keep it that way but you could push this branch to your repo as indigo-devel, and if you wish I can help you out with releasing it to ROS.

@mryellow
Copy link

/orb_slam/g2o/./g2o/solvers/cholmod/linear_solver_cholmod.h:36:21: fatal error: cholmod.h: No such file or directory
 #include <cholmod.h>

Debian jessie, cholmod is in /usr/include/suitesparse/, think there needs a suffix suitesparse on one of those includes somewhere. Bypassed by setting catkin config -DCHOLMOD_INCLUDE_DIR=/usr/include/suitesparse/.

Resulting in:

/usr/bin/ld: CMakeFiles/orb_slam.dir/src/Optimizer.cc.o: undefined reference to symbol 'cholmod_analyze_p'
//usr/lib/x86_64-linux-gnu/libcholmod.so.2.1.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Which from my limited understanding and some googling might be related to commenting out the individual components in target_link_libraries.

@bmagyar
Copy link
Author

bmagyar commented Apr 16, 2015

Hmm, that is quite strange... Which ubuntu are you running?
I made this on Ubuntu 14.04 with Indigo.

@mryellow
Copy link

Debian jessie, it doesn't have many packages in the repo so mostly a source install into a workspace. Which guess means it could be purely my config being odd.

Didn't have a chance to play with it yesterday but will bash my head against it a bit later and see if I can work out the makefile links. Not sure how those target_link_libraries work now g2o is up a directory level above orb_slam, relative path work in there?

@mryellow
Copy link

Ok first successful build, what got me here...

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
find_package(Cholmod REQUIRED)
find_package(G2O REQUIRED)
find_package(Eigen3 REQUIRED)

Found suitesparse/cholmod.h, and think also added pthreads correctly for my system.

The FindG2O.cmake filled ${G2O_CORE_LIBRARY}, ${G2O_SOLVER_CHOLMOD}, ${G2O_SOLVER_DENSE}, ${G2O_STUFF_LIBRARY}, ${G2O_TYPES_SBA}, ${G2O_TYPES_SIM3}, ${G2O_TYPES_SLAM3D} with appropriate files for the libraries.

Then adding cholmod and ${G2O_CORE_LIBRARY} to the target_link_libraries cleared up the last broken links.

Example bag played, all good.

@mryellow
Copy link

Well actually... libg2o should exist for indigo it seems, so I guess being a bleeding edge source install I should build g2o separately and put in a local rosdep. https://github.com/ros-gbp/libg2o-release

@bmagyar
Copy link
Author

bmagyar commented Apr 20, 2015

It is not necessarily bleeding edge, but custom for sure. Having it right
alongside the orb_slam package is in my opinion the most portable solution.

Indeed it would be nice to see if the modifications here could be pushed
upstream to the g2o already being used or if they could be extracted and
made local to orb_slam in the form of wrapping some g2o functions for
instance.
On 20 Apr 2015 07:30, "mryellow" [email protected] wrote:

Well actually... libg2o should exist for indigo it seems, so I guess
being a bleeding edge source install I should build g2o separately and put
in a local rosdep. https://github.com/ros-gbp/libg2o-release


Reply to this email directly or view it on GitHub
#12 (comment).

@mryellow
Copy link

Ahh didn't spot them but figured there must be modifications.

Seems installing the libg2o from source separately broke something (will figure out what exactly later), but I'm an edge case.... So not sure where that puts using FindCholmod and FindG2O.

edit: probably a config issue rather than a conflict...

types_seven_dof_expmap.cpp
types_seven_dof_expmap.h
)

SET_TARGET_PROPERTIES(types_sim3 PROPERTIES OUTPUT_NAME ${LIB_PREFIX}types_sim3)
TARGET_LINK_LIBRARIES(${LIB_PREFIX}types_sim3 ${LIB_PREFIX}types_sba)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types_sim3 = types_sba?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is a linking command. That is fine.

@mryellow
Copy link

mryellow commented May 2, 2015

Righto, having libg2o installed from source resulted in a conflict somewhere, using FindG2O was finding the libg2o version it seems. Switched back to using Thirdparty style install and got it to compile cleanly again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants