rpng / open_vins

An open source platform for visual-inertial navigation research.
https://docs.openvins.com
GNU General Public License v3.0
2.22k stars 653 forks source link

`ros2 launch ov_msckf...`: ERROR: flag 'logtostderr' was defined more than once #482

Open diplodocuslongus opened 2 weeks ago

diplodocuslongus commented 2 weeks ago

OpenVINS was built successfully with ROS2 humble, ubuntu 22.04, ceres 2.0.

But when I run:

ros2 launch ov_msckf subscribe.launch.py config:=euroc_mav

I get the error:

flag 'logtostderr' was defined more than once (in files './src/logging.cc' and $HOME/builds/glog/src/logging.cc')

Obviously this is related to the fact that I have built my own glog locally, but why would ros2 launch ... pick up this local logging.cc file? Also there is no logging.cc in ./src (there is only one location where in my $HOME I can find a logging.cc, it is in $HOME/builds/glog/src/logging.cc.

The full error message is:


$ source install/setup.bash
$ ros2 launch ov_msckf subscribe.launch.py config:=euroc_mav
[INFO] [launch]: All log files can be found below $HOME/.ros/log/2024-11-08-16-10-57-225185-52-0960514-95-725864
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [run_subscribe_msckf-1]: process started with pid [725866]
[run_subscribe_msckf-1] ERROR: flag 'logtostderr' was defined more than once (in files './src/logging.cc' and '$HOME/builds/glog/src/logging.cc').
[ERROR] [run_subscribe_msckf-1]: process has died [pid 725866, exit code 1, cmd '$HOME/ROS2_workspaces/open_vins_ws/install/ov_msckf/lib/ov_msckf/run_subscribe_msckf --ros-args -r __ns:=/ov_msckf --params-file /tmp/launch_params_h77ome49 --params-file /tmp/launch_params_eqrid_1w --params-file /tmp/launch_params_v4wmqw1r --params-file /tmp/launch_params_0uvnrf0y --params-file /tmp/launch_params_od52v2kr'].
diplodocuslongus commented 1 week ago

I still don't know how this is happening, but uninstalling my locally built glog solved the issue. I leave this issue open as this may be due to how the openVINS build with colcon is setup (it shouldn't fetch more than one location for glog).