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

make failed, g2o issue #984

Closed
cu-autobike opened this issue Mar 5, 2023 · 2 comments
Closed

make failed, g2o issue #984

cu-autobike opened this issue Mar 5, 2023 · 2 comments

Comments

@cu-autobike
Copy link

I followed the instructions on #427 (comment) to install rtabmap on ros-melodic for the Jetson Xavier (running Ubuntu 18.04), but encountered the following error message when running make:
/home/autobike/rtabmap/corelib/src/optimizer/OptimizerG2O.cpp:157:133: error: no matching function for call to ‘g2o::Factory::registerType(const char [17], std::unique_ptr<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset>, std::default_delete<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> > >)’ erType("CACHE_SE3_OFFSET", g2o::make_unique<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> >()); In file included from /home/autobike/rtabmap/corelib/src/optimizer/OptimizerG2O.cpp:46:0: /opt/ros/melodic/include/g2o/core/factory.h:62:12: note: candidate: void g2o::Factory::registerType(const string&, g2o::AbstractHyperGraphElementCreator*) void registerType(const std::string& tag, AbstractHyperGraphElementCreator* c); /opt/ros/melodic/include/g2o/core/factory.h:62:12: note: no known conversion for argument 2 from ‘std::unique_ptr<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset>, std::default_delete<g2o::HyperGraphElementCreator<g2o::CacheSE3Offset> > >’ to ‘g2o::AbstractHyperGraphElementCreator*’ corelib/src/CMakeFiles/rtabmap_core.dir/build.make:915: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/optimizer/OptimizerG2O.cpp.o' failed make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/optimizer/OptimizerG2O.cpp.o] Error 1 CMakeFiles/Makefile2:825: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: *** [all] Error 2

The cmake output can be found here
cmakeoutput.txt

@matlabbe
Copy link
Member

matlabbe commented Mar 5, 2023

cmake is mixing up two g2o. In cmake log, it found the one you built locally in /usr/local, but in that log error, it is referring to a g2o file in /opt/ros/melodic. If you want to use your local version, uninstall ros-melodic-libg2o, cleanup the build cache and rebuild.

cheers,
Mathieu

@cu-autobike
Copy link
Author

Thanks, this fixed the issue!

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

No branches or pull requests

2 participants