PX4 / PX4-Autopilot

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

sitl of gazebo waitting in preparing your world #18928

Open mengchaoheng opened 2 years ago

mengchaoheng commented 2 years ago

after v1.12.0 the time of preparing is very long.what have you change?

Jaeyoung-Lim commented 2 years ago

@mengchaoheng Please explain more on what setup you are running on (OS, gazebo version etc) and the log of the issue you are experiencing

If you want more outputs, you can add a VERBOSE_SIM=1 in front of your make commands to get more information

mengchaoheng commented 2 years ago

ubuntu 18.04,gazebo9.19

I have downloaded the model offline to the .gazebo folder. My latest test found that no matter what version of px4 (v1.11 or v1.12), when doing "make px4_sitl gazebo", it stays at the "preparing your world" interface. But this situation did not happen a few months ago. The only possibility is that I started to develop ros in the last month and installed other dependent environments, which led to this "preparing your world"

===========================
mch@mch-virtual-machine:~/DF/PX4-Autopilot$ VERBOSE_SIM=1 make px4_sitl gazebo
-- PX4 version: v1.12.0
-- PX4 config file: /home/mch/DF/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/mch/DF/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
[4/817] git submodule Tools/sitl_gazebo
[15/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
Traceback (most recent call last):
  File "/usr/bin/rosversion", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3242, in <module>
    @_call_aside
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rospkg==1.3.0' distribution was not found and is required by the application
-- Found MAVLink: /home/mch/DF/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/mch/DF/PX4-Autopilot/build/px4_sitl_default/build_gazebo
[813/817] Performing build step for 'sitl_gazebo'
[11/126] Generating /home/mch/DF/PX4-A..._gazebo/models/tiltrotor/tiltrotor.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf
[13/126] Generating /home/mch/DF/PX4-A...ndard_vtol_drop/standard_vtol_drop.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf
[15/126] Generating /home/mch/DF/PX4-A...azebo/models/tailsitter/tailsitter.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf
[19/126] Generating /home/mch/DF/PX4-A...o/models/typhoon_h480/typhoon_h480.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf
[20/126] Generating /home/mch/DF/PX4-A...models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
[21/126] Generating /home/mch/DF/PX4-A...sitl_gazebo/models/pixhawk/pixhawk.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf
[22/126] Generating /home/mch/DF/PX4-A...ols/sitl_gazebo/models/plane/plane.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf
[23/126] Generating /home/mch/DF/PX4-A...sitl_gazebo/models/px4flow/px4flow.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf
[24/126] Generating /home/mch/DF/PX4-A...tl_gazebo/models/r1_rover/r1_rover.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf
[25/126] Generating /home/mch/DF/PX4-A...Tools/sitl_gazebo/models/r200/r200.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf
[26/126] Generating /home/mch/DF/PX4-A...ols/sitl_gazebo/models/rover/rover.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf
[27/126] Generating /home/mch/DF/PX4-A...ols/sitl_gazebo/models/sf10a/sf10a.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf
[33/126] Generating /home/mch/DF/PX4-A...models/standard_vtol/standard_vtol.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf
[35/126] Generating /home/mch/DF/PX4-A...ebo/models/3DR_gps_mag/3DR_gps_mag.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf
[43/126] Generating /home/mch/DF/PX4-A...Tools/sitl_gazebo/models/boat/boat.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf
[44/126] Generating /home/mch/DF/PX4-A...Tools/sitl_gazebo/models/c920/c920.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf
[49/126] Generating /home/mch/DF/PX4-A...o/models/depth_camera/depth_camera.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf
[50/126] Generating /home/mch/DF/PX4-A...Tools/sitl_gazebo/models/iris/iris.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
[51/126] Generating /home/mch/DF/PX4-A...ebo/models/matrice_100/matrice_100.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf
[52/126] Generating /home/mch/DF/PX4-A..._gazebo/models/cloudship/cloudship.sdf
/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf.jinja -> /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf
[126/126] Linking CXX shared library libgazebo_user_camera_plugin.so
[816/817] cd /home/mch/DF/PX4-Autopilo...F/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/mch/DF/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
program: gazebo
model: none
world: none
src_path: /home/mch/DF/PX4-Autopilot
build_path: /home/mch/DF/PX4-Autopilot/build/px4_sitl_default
empty model, setting iris as default
GAZEBO_PLUGIN_PATH :/home/mch/DF/PX4-Autopilot/build/px4_sitl_default/build_gazebo
GAZEBO_MODEL_PATH :/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models
LD_LIBRARY_PATH /home/mch/UAV/devel/lib:/opt/ros/melodic/lib:/home/mch/DF/PX4-Autopilot/build/px4_sitl_default/build_gazebo
empty world, setting empty.world as default
Using: /home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
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.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.128.226
[Msg] Loading world file [/home/mch/DF/PX4-Autopilot/Tools/sitl_gazebo/worlds/empty.world]
[Wrn] [gazebo_gps_plugin.cpp:78] [gazebo_gps_plugin]: iris::gps0 using gps topic "gps0"
[Wrn] [gazebo_gps_plugin.cpp:203] [gazebo_gps_plugin] Using default update rate of 5hz 
[Msg] Connecting to PX4 SITL using TCP
[Msg] Lockstep is enabled
[Msg] Speed factor set to: 1
[Msg] Using MAVLink protocol v2.0
SITL COMMAND: "/home/mch/DF/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/mch/DF/PX4-Autopilot/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/home/mch/DF/PX4-Autopilot"/test_data
INFO  [px4] Creating symlink /home/mch/DF/PX4-Autopilot/build/px4_sitl_default/etc -> /home/mch/DF/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
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

* SYS_AUTOCONFIG: curr: 1 -> new: 0
  IMU_INTEG_RATE: curr: 200 -> new: 250
INFO  [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
PX4 SIM HOST: localhost
[Msg] Waiting for master.
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
INFO  [simulator] Simulator connected on TCP port 4560.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.128.226
[Wrn] [GuiIface.cc:298] Couldn't locate specified .ini. Creating file at "/home/mch/.gazebo/gui.ini"
INFO  [commander] LED: open /dev/led0 failed (22)
INFO  [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
  PWM_AUX_OUT: curr: 0 -> new: 1234
INFO  [ekf2] starting instance 0, IMU:0 (1310988), MAG:0 (197388)
INFO  [ekf2] starting instance 1, IMU:1 (1310996), MAG:0 (197388)
INFO  [ekf2] starting instance 2, IMU:2 (1311004), MAG:0 (197388)
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [ekf2] starting instance 3, IMU:0 (1310988), MAG:1 (197644)
INFO  [ekf2] starting instance 4, IMU:1 (1310996), MAG:1 (197644)
INFO  [ekf2] starting instance 5, IMU:2 (1311004), MAG:1 (197644)
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2022-01-02/08_54_27.ulg
INFO  [logger] Opened full log file: ./log/2022-01-02/08_54_27.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] GPS checks passed
INFO  [ecl/EKF] GPS checks passed
INFO  [ecl/EKF] GPS checks passed
INFO  [ecl/EKF] GPS checks passed
INFO  [ecl/EKF] GPS checks passed
INFO  [ecl/EKF] GPS checks passed
[Err] [Connection.hh:267] Header is empty
[Err] [Connection.hh:267] Header is empty
[Err] [Connection.hh:267] Header is empty
[libprotobuf ERROR google/protobuf/message_lite.cc:118] Can't parse message of type "gazebo.msgs.Packet" because it is missing required fields: stamp, serialized_data
Master Unknown message type[get_topics] From[52786]
INFO  [ecl/EKF] 4136000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] 4140000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] 4284000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] 4340000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] 4344000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] 4344000: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [ecl/EKF] reset position to GPS
INFO  [ecl/EKF] reset velocity to GPS
INFO  [ecl/EKF] starting GPS fusion
INFO  [tone_alarm] home set
INFO  [tone_alarm] notify negative
mengchaoheng commented 2 years ago

Ubuntu-2022-01-02-16-16-18

Ubuntu-2022-01-02-16-55-44

mengchaoheng commented 2 years ago

can you help me ? thanks

Jaeyoung-Lim commented 2 years ago

My latest test found that no matter what version of px4 (v1.11 or v1.12),

This means that this is not related to the firmware.

Please try to remove .gazebo and try again if this solves the problem

Also I can see that you have some problems in your dependency chain. e.g.

-- Building OpticalFlow with OpenCV
Traceback (most recent call last):
  File "/usr/bin/rosversion", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3242, in <module>
    @_call_aside
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rospkg==1.3.0' distribution was not found and is required by the application

Also try building in a clean environment by running

make distclean
mengchaoheng commented 2 years ago

My latest test found that no matter what version of px4 (v1.11 or v1.12),

This means that this is not related to the firmware.

Please try to remove .gazebo and try again if this solves the problem

Also I can see that you have some problems in your dependency chain. e.g.

-- Building OpticalFlow with OpenCV
Traceback (most recent call last):
  File "/usr/bin/rosversion", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3242, in <module>
    @_call_aside
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/mch/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rospkg==1.3.0' distribution was not found and is required by the application

Also try building in a clean environment by running

make distclean

I've tried both, but none of them work. I had to redeploy the development environment on the new system.