raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.19k stars 4.69k forks source link

Error running ROS Mono #402

Open rosbeginneruser opened 6 years ago

rosbeginneruser commented 6 years ago

Built and ran properly the example datasets, but when I tried to run it with ROS ran into a few problems. Seeking help -- other similar issues said to "After removing gtk+ 2.x, reinstalling Opencv and ROS, everything works well. Make sure that you are compiling the codes (cmake projects) using the same gtk version!" @David-Willo in issue 325 But I had a few questions:

Shouldn't I not remove gtk+ 2.x due to its necessity in the system? How can I compile with cmake to ensure that I'm using the same gtk version?

Terminal output:

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Camera Parameters:

ORB Extractor Parameters:

(Mono:9555): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)

rosbeginneruser commented 6 years ago

Update: Redid OpenCV with cmake GTK ON and now have a similar error but new number:

(Mono:27720): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)

rimitalahiri commented 6 years ago

@rosbeginneruser could you solve the problem??? I am also facing the same and posted an issue. If you have got rid of the issue, please share the solution with us..

jtbon20 commented 6 years ago

@rimitalahiri uninstall opencv then remake with cmake with your favorite flags and add -D WITH_GTK_2_X=ON make sure to install necessary libraries sudo apt install libgtk2.0-dev pkg-config and then rebuild ROS and reinstall ORB SLAM

Santi-7 commented 6 years ago

I experimented the same issue, and @jtbon20 answer solved it.

benjamintanweihao commented 5 years ago

Had the same problem. I just had to recompile with -D WITH_GTK_2_X=ON OpenCV and reinstall and that was it.