felixendres / rgbdslam_v2

RGB-D SLAM for ROS
GNU General Public License v3.0
935 stars 399 forks source link

Error while loading shared libraries: libg2o_ext_freeglut_minimal.so: cannot open shared object file: No such file or directory #120

Closed ankurjay closed 3 years ago

ankurjay commented 3 years ago

I am trying to launch the package while my gazebo simulation (that has some robots with kinects) in it. However, the following message appears and everything shuts down:

process[ankurbot_1/rgbdslam-8]: started with pid [12809]
/home/ankur/catkin_ws/devel/lib/rgbdslam/rgbdslam: error while loading shared libraries: libg2o_ext_freeglut_minimal.so: cannot open shared object file: No such file or directory
================================================================================REQUIRED process [ankurbot_1/rgbdslam-8] has died!
process has died [pid 12809, exit code 127, cmd /home/ankur/catkin_ws/devel/lib/rgbdslam/rgbdslam __name:=rgbdslam __log:=/home/ankur/.ros/log/0c84ebb4-d04e-11ea-9e9a-5435308b6f49/ankurbot_1-rgbdslam-8.log].
log file: /home/ankur/.ros/log/0c84ebb4-d04e-11ea-9e9a-5435308b6f49/ankurbot_1-rgbdslam-8*.log
Initiating shutdown!
================================================================================

If I launch the package without running my gazebo simulation, the error still persists. What can I do to resolve this?

felixendres commented 3 years ago

It seems you are missing a library that should come with g2o. I do not know how to solve this. Do you have libg2o_ext_freeglut_minimal.so in your system?

Bardreamaster commented 3 years ago

I have the same problem. But I have make sure that there's libg2o_ext_freeglut_minimal.so file in my system. By using ldconfig -v | grep "g2o" I can find it. libg2o_solver_cholmod.so -> libg2o_solver_cholmod.so libg2o_csparse_extension.so -> libg2o_csparse_extension.so libg2o_types_slam2d_addons.so -> libg2o_types_slam2d_addons.so libg2o_types_icp.so -> libg2o_types_icp.so libg2o_opengl_helper.so -> libg2o_opengl_helper.so libg2o_solver_slam2d_linear.so -> libg2o_solver_slam2d_linear.so libg2o_cli.so -> libg2o_cli.so libg2o_solver_eigen.so -> libg2o_solver_eigen.so libg2o_types_slam2d.so -> libg2o_types_slam2d.so libg2o_types_slam3d_addons.so -> libg2o_types_slam3d_addons.so libg2o_solver_pcg.so -> libg2o_solver_pcg.so libg2o_types_slam3d.so -> libg2o_types_slam3d.so libg2o_core.so -> libg2o_core.so libg2o_types_sim3.so -> libg2o_types_sim3.so libg2o_solver_structure_only.so -> libg2o_solver_structure_only.so libg2o_ext_freeglut_minimal.so -> libg2o_ext_freeglut_minimal.so libg2o_stuff.so -> libg2o_stuff.so libg2o_solver_csparse.so -> libg2o_solver_csparse.so libg2o_solver_dense.so -> libg2o_solver_dense.so libg2o_types_sclam2d.so -> libg2o_types_sclam2d.so libg2o_types_sba.so -> libg2o_types_sba.so libg2o_types_data.so -> libg2o_types_data.so

But it still report the error ~Code/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam: error while loading shared libraries: libg2o_ext_freeglut_minimal.so: cannot open shared object file: No such file or directory

REQUIRED process [rgbdslam-2] has died! process has died [pid 19169, exit code 127, cmd /home/changshanshi/Code/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam name:=rgbdslam log:=/home/changshanshi/.ros/log/8c85926c-b8c1-11eb-afea-6807157e95b4/rgbdslam-2.log]. log file: /home/changshanshi/.ros/log/8c85926c-b8c1-11eb-afea-6807157e95b4/rgbdslam-2*.log Initiating shutdown!

Bardreamaster commented 3 years ago

I have solve it.

  1. add the lib path where the lib you missed into /etc/ld.so.conf
  2. using sudo ldconfig to make it working
  3. finally roslaunch