PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.58k stars 13.56k forks source link

libprotobuf ERROR file already exists in database: Imu.proto #19960

Open Tina-Lau opened 2 years ago

Tina-Lau commented 2 years ago

when I execute _make px4sitl gazebo, something went wrong. At first I didn't see any words in red that told what's wrong, until I rolled back and discovered something concerned libprotobuf in white but seems fatal. I attached the log in terminal and highlighted the block with bullet point(right above PX4 logo). I couldn't find anything similar on the Internet, can someone help?

-- PX4 version: v1.13.0-alpha1
-- PX4 config file: /home/lam/px4/PX4-Autopilot/boards/px4/sitl/default.cmake
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- cmake build type: RelWithDebInfo
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Building for code coverage
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3") 
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-569-g71fc1b8
-- ROMFS: ROMFS/px4fmu_common
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lam/px4/PX4-Autopilot/build/px4_sitl_default
[0/817] git submodule src/drivers/gps/devices
[1/817] git submodule src/lib/ecl
[2/817] git submodule mavlink/include/mavlink/v2.0
[7/817] git submodule Tools/sitl_gazebo
[12/817] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX14
-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using C++17 standard
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.87
-- Found Simbody: /usr/include/simbody  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0") 
-- Boost version: 1.65.1
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.2.5
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.31.1
-- Found UUID: TRUE  
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE  
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Found GTS: TRUE  
-- Checking for module 'libswscale'
--   Found libswscale, version 4.8.100
-- Found SWSCALE: TRUE  
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 57.10.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100") 
-- Checking for module 'libavformat'
--   Found libavformat, version 57.83.100
-- Found AVFORMAT: TRUE  
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
-- Found AVCODEC: TRUE  
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
-- Found AVUTIL: TRUE  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0") 
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.7
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.1.2
-- Found ZIP: TRUE  
-- Checking for one of the modules 'glib-2.0'
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3") 
-- Found OpenCV: /usr (found version "3.2.0") 
-- Found TinyXML: /usr/lib/x86_64-linux-gnu/libtinyxml.so  
-- Checking for module 'gstreamer-1.0 >= 1.0'
--   Found gstreamer-1.0 , version 1.14.5
-- Checking for module 'gstreamer-base-1.0 >= 1.0'
--   Found gstreamer-base-1.0 , version 1.14.5
-- Checking for module 'gstreamer-app-1.0 >= 1.0'
--   Found gstreamer-app-1.0 , version 1.14.5
-- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES (Required is at least version "1.0") 
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Found MAVLink: /home/lam/px4/PX4-Autopilot/mavlink/include (found version "2.0") 
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.0.0") 
-- Checking for module 'protobuf'
--   Found protobuf, version 3.0.0
-- Gazebo version: 9.19
-- Found GStreamer: adding gst_camera_plugin
-- Found GStreamer: adding gst_video_stream_widget
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lam/px4/PX4-Autopilot/build/px4_sitl_default/build_gazebo
[650/817] Performing build step for 'sitl_gazebo'
[13/126] Generating /home/lam/px4/PX4-...ebo/models/3DR_gps_mag/3DR_gps_mag.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf
[26/126] Generating /home/lam/px4/PX4-...Tools/sitl_gazebo/models/boat/boat.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf
[27/126] Generating /home/lam/px4/PX4-...Tools/sitl_gazebo/models/c920/c920.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf
[28/126] Generating /home/lam/px4/PX4-..._gazebo/models/cloudship/cloudship.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf
[29/126] Generating /home/lam/px4/PX4-...o/models/depth_camera/depth_camera.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf
[30/126] Generating /home/lam/px4/PX4-...Tools/sitl_gazebo/models/iris/iris.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
[31/126] Generating /home/lam/px4/PX4-...ebo/models/matrice_100/matrice_100.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf
[32/126] Generating /home/lam/px4/PX4-...models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
[35/126] Generating /home/lam/px4/PX4-...sitl_gazebo/models/pixhawk/pixhawk.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf
[37/126] Generating /home/lam/px4/PX4-...ols/sitl_gazebo/models/plane/plane.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf
[38/126] Generating /home/lam/px4/PX4-...sitl_gazebo/models/px4flow/px4flow.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf
[39/126] Generating /home/lam/px4/PX4-...tl_gazebo/models/r1_rover/r1_rover.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf
[40/126] Generating /home/lam/px4/PX4-...Tools/sitl_gazebo/models/r200/r200.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf
[41/126] Generating /home/lam/px4/PX4-...ols/sitl_gazebo/models/rover/rover.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf
[42/126] Generating /home/lam/px4/PX4-...models/standard_vtol/standard_vtol.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf
[43/126] Generating /home/lam/px4/PX4-...ndard_vtol_drop/standard_vtol_drop.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf
[44/126] Generating /home/lam/px4/PX4-...ols/sitl_gazebo/models/sf10a/sf10a.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf
[47/126] Generating /home/lam/px4/PX4-...azebo/models/tailsitter/tailsitter.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf
[50/126] Generating /home/lam/px4/PX4-..._gazebo/models/tiltrotor/tiltrotor.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf
[51/126] Generating /home/lam/px4/PX4-...o/models/typhoon_h480/typhoon_h480.sdf
/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf.jinja -> /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf
[126/126] Linking CXX shared library libgazebo_camera_manager_plugin.so
[816/817] cd /home/lam/px4/PX4-Autopil...4/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/lam/px4/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
program: gazebo
model: none
world: none
src_path: /home/lam/px4/PX4-Autopilot
build_path: /home/lam/px4/PX4-Autopilot/build/px4_sitl_default
empty model, setting iris as default
GAZEBO_PLUGIN_PATH :/home/lam/px4/PX4-Autopilot/build/px4_sitl_default/build_gazebo:/home/lam/px4/PX4-Autopilot/build/px4_sitl_default/build_gazebo
GAZEBO_MODEL_PATH :/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models:/home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models
LD_LIBRARY_PATH /home/lam/catkin_ws/devel/lib:/home/lam/offboard_ws/devel/lib:/opt/ros/melodic/lib:/home/lam/px4/PX4-Autopilot/build/px4_sitl_default/build_gazebo:/home/lam/px4/PX4-Autopilot/build/px4_sitl_default/build_gazebo
empty world, setting empty.world as default
Using: /home/lam/px4/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf

- [libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: Imu.proto
- [libprotobuf FATAL google/protobuf/descriptor.cc:1164] CHECK failed: generated_database_->Add(encoded_file_descriptor, size): 
- terminate called after throwing an instance of 'google::protobuf::FatalException'
-   what():  CHECK failed: generated_database_->Add(encoded_file_descriptor, size):

SITL COMMAND: "/home/lam/px4/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/lam/px4/PX4-Autopilot/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/home/lam/px4/PX4-Autopilot"/test_data
INFO  [px4] Creating symlink /home/lam/px4/PX4-Autopilot/build/px4_sitl_default/etc -> /home/lam/px4/PX4-Autopilot/build/px4_sitl_default/tmp/rootfs/etc

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
Info: found model autostart file as SYS_AUTOSTART=10016
INFO  [param] selected parameter default file eeprom/parameters_10016
[param] parameter file not found, creating eeprom/parameters_10016
  SYS_AUTOCONFIG: curr: 0 -> new: 1
  SYS_AUTOSTART: curr: 0 -> new: 10016
  CAL_ACC0_ID: curr: 0 -> new: 1310988
  CAL_GYRO0_ID: curr: 0 -> new: 1310988
  CAL_ACC1_ID: curr: 0 -> new: 1310996
  CAL_GYRO1_ID: curr: 0 -> new: 1310996
  CAL_ACC2_ID: curr: 0 -> new: 1311004
  CAL_GYRO2_ID: curr: 0 -> new: 1311004
  CAL_MAG0_ID: curr: 0 -> new: 197388
  CAL_MAG1_ID: curr: 0 -> new: 197644
  SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
  SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
* SYS_AUTOCONFIG: curr: 1 -> new: 0
  IMU_INTEG_RATE: curr: 200 -> new: 250
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
INFO  [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
PX4 SIM HOST: localhost
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
[Err] [Connection.cc:546] Connection[0] Closed during Read
[Err] [ConnectionManager.cc:135] Unable to read from master
[Err] [gazebo_shared.cc:77] Unable to initialize transport.
[Err] [gazebo_client.cc:56] Unable to setup Gazebo
^CERROR [px4] Startup script returned with return value: 2
/home/lam/px4/PX4-Autopilot/Tools/sitl_run.sh: line 235: 12642 Aborted                 (core dumped) gzserver $verbose $world_path  (wd: ~/px4/PX4-Autopilot/build/px4_sitl_default/tmp)
/home/lam/px4/PX4-Autopilot/Tools/sitl_run.sh: line 244: kill: (12642) - No such process
/home/lam/px4/PX4-Autopilot/Tools/sitl_run.sh: line 246: kill: (12705) - No such process
ninja: build stopped: interrupted by user.
Makefile:231: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Interrupt
AlexWUrobot commented 1 year ago

I have a similar issue, when running roslaunch gazebo_ros empty_world.launch world_name:=$(find vrx_gazebo)/worlds/example_course.world and then import rosrun gazebo_ros spawn_model -sdf -file $(pwd)/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/iris/iris.sdf -model iris -x 0 -y 0 -z 0 -R 0 -P 0 -Y 0 image

fgsdfgsda commented 1 year ago

I have a similar issue, did you solve it? 2023-09-27 20-07-14 的屏幕截图