Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to '"make px4_sitl gazebo" #18999

Closed
Jeswin17 opened this issue Jan 12, 2022 · 30 comments
Closed

Unable to '"make px4_sitl gazebo" #18999

Jeswin17 opened this issue Jan 12, 2022 · 30 comments
Labels
Sim: gazebo classic Gazebo classic simulator

Comments

@Jeswin17
Copy link

Jeswin17 commented Jan 12, 2022

I followed the instructions given here https://docs.px4.io/master/en/dev_setup/dev_env_linux_ubuntu.html to setup Gazebo and PX4.
But when it try to run gazebo, it throws the following error.

Env:
Ubuntu 20.04.3 LTS Virtual Machine
Gazebo 11 ( d/led when I ran the https://github.com/PX4/PX4-Autopilot/blob/master/Tools/setup/ubuntu.sh script as mentioned in the docs.

-- Found GStreamer: adding gst_video_stream_widget
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
-- Configuring incomplete, errors occurred!
See also "/home/VMuser/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/VMuser/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
[247/846] ROMFS: copying, generating airframes
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure
cd /home/VMuser/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/VMuser/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/VMuser/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[249/846] Generating parameters.xml
ninja: build stopped: subcommand failed.
make: *** [Makefile:235: px4_sitl] Error 1

The output of the CMakeError.log file is as follows:

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/VMuser/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/ninja cmTC_f4056 && [1/2] Building C object CMakeFiles/cmTC_f4056.dir/src.c.o
[2/2] Linking C executable cmTC_f4056
FAILED: cmTC_f4056
: && /bin/cc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_f4056.dir/src.c.o -o cmTC_f4056 && :
/bin/ld: CMakeFiles/cmTC_f4056.dir/src.c.o: in function main': src.c:(.text+0x46): undefined reference to pthread_create'
/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /bin/ld: src.c:(.text+0x63): undefined reference to pthread_join'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Source file was:
#include <pthread.h>

void* test_func(void* data)
{
return data;
}

int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);

return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/VMuser/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/ninja cmTC_21238 && [1/2] Building C object CMakeFiles/cmTC_21238.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_21238
FAILED: cmTC_21238
: && /bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_21238.dir/CheckFunctionExists.c.o -o cmTC_21238 -lpthreads && :
/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

While the issue is similiar to #13759, re-downloading the gazebo plugins do not seem to make the difference.
Moreover, running sudo apt-get install libprotobuf-dev libprotoc-dev protobuf-compiler libeigen3-dev libxml2-utils python-rospkg python-jinja2 throws the error (not sure if related to above error though) :

Package python-rospkg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-rospkg

E: Package 'python-rospkg' has no installation candidate

Hence, I suspect the error could be Cmake files but I don't have the sufficient know-how to fix it.

Any advice is appreciated.

@julianoes
Copy link
Contributor

Try sudo apt install python3-rospkg.

@Jeswin17
Copy link
Author

Try sudo apt install python3-rospkg.

Tried it, it was already installed thus same error o/p :(

@Jaeyoung-Lim
Copy link
Member

@Jeswin17 I think your install script might have failed somewhere. Did the script output any errors?

@Jeswin17
Copy link
Author

@Jaeyoung-Lim I do not think so..
image

@Jeswin17
Copy link
Author

Not sure if related but I am also not able to make jMAVSim, it gets stuck after the TCP port connection while throwing a ClassNotFoundExeption: org.apache.tools.ant.launch.Launcher. I will open an issue for this also and link it here.

@Jaeyoung-Lim
Copy link
Member

@Jeswin17 It is related. You are missing some dependencies that should have been installed as part of the setup script.

@Jeswin17
Copy link
Author

How do I identify these missing dependencies since the setup?sh script does not throw any errors?

@julianoes
Copy link
Contributor

@Jeswin17 what's the full output when you get the ClassNotFoundException?

@Jeswin17
Copy link
Author

Jeswin17 commented Jan 13, 2022

@julianoes Looking at related issues with jAVSim, I tried using OpenJDK 11 & 8 and got the following errors.
openjdk-11
jmavsim-issue3

openjdk-8
jmavsim-issue2

@julianoes
Copy link
Contributor

Try a newer version.

@Jeswin17
Copy link
Author

@julianoes no luck with it. Does openjdk need to bet set to JAVA_HOME in /etc/environmetnt file? Anyway I think I will try to downgrade to 18.4 and try it.

@julianoes
Copy link
Contributor

I suggest to use 20.04 and use what setup.sh suggests. If that does not work, we'll have to fix it.

@julianoes
Copy link
Contributor

On my Ubuntu 20.04 I have:

java --version
openjdk 13.0.7 2021-04-20
OpenJDK Runtime Environment (build 13.0.7+5-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 13.0.7+5-Ubuntu-0ubuntu120.04, mixed mode, sharing)

And make px4_sitl jmavsim works.

@Jeswin17
Copy link
Author

@julianoes I was able to get jMAVSim to work!
The issue was with environment variables JAVA_HOME & ANT_HOME which were not there in the environments.

However the make gazebo still returns the original CMAKE/Booster related issue. Do you reckon it needs any environment variables?

@julianoes
Copy link
Contributor

@Jeswin17 please remove the build folder and try make px4_sitl gazebo again and paste the full output.

@Jeswin17
Copy link
Author

Jeswin17 commented Jan 14, 2022

@julianoes after removing build folder and making this is the output

[0/10] git submodule Tools/sitl_gazebo
[5/10] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /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: /bin/c++
-- Check for working CXX compiler: /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)
-- Found Boost: /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.58") found components: system thread filesystem
-- Found PkgConfig: /bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.88
-- Found ccd: /usr/include (found suitable version "2.0", minimum required is "2.0")
-- Found fcl: /usr/include (found suitable version "0.5.0", minimum required is "0.3.2")
-- Found assimp: /usr/include (found version "5.0.0")
-- Found DART: /usr/include (Required is at least version "6.6") found components: dart
-- Found Boost: /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Looking for ignition-math6 -- found version 6.9.2
-- Searching for dependencies of ignition-math6
-- 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
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-transport8 -- found version 8.2.1
-- Searching for dependencies of ignition-transport8
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "3")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.34.0
-- Found UUID: TRUE
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.9.2
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 6.2.0
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Looking for ignition-common3 -- found version 3.14.0
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- Searching for component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.14.0
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-fuel_tools4 -- found version 4.4.0
-- Searching for dependencies of ignition-fuel_tools4
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.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.2.2
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.5.1
-- Found ZIP: TRUE
-- Looking for ignition-common3 -- found version 3.14.0
-- Looking for ignition-math6 -- found version 6.9.2
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Checking for one of the modules 'glib-2.0'
-- Found PythonInterp: /bin/python3 (found suitable version "3.8.10", minimum required is "3")
-- Found OpenCV: /usr (found version "4.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.16.2
-- Checking for module 'gstreamer-base-1.0 >= 1.0'
-- Found gstreamer-base-1.0 , version 1.16.2
-- Checking for module 'gstreamer-app-1.0 >= 1.0'
-- Found gstreamer-app-1.0 , version 1.16.2
-- 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/VMadmin/PX4-Autopilot/build/px4_sitl_default/mavlink (found version "2.0")
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Checking for module 'protobuf'
-- Found protobuf, version 3.6.1
-- Gazebo version: 11.10
-- Found GStreamer: adding gst_camera_plugin
-- Found GStreamer: adding gst_video_stream_widget
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests
used as include directory in directory /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo/unit_tests

-- Configuring incomplete, errors occurred!
See also "/home/VMadmin/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/VMadmin/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure
cd /home/VMadmin/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/VMadmin/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/VMadmin/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
ninja: build stopped: subcommand failed.
make: *** [Makefile:235: px4_sitl] Error 1

@julianoes
Copy link
Contributor

I'm trying to reproduce this.

What's your output of apt list --installed | grep boost?

@Jeswin17
Copy link
Author

@julianoes
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libboost-all-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed]
libboost-atomic-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-atomic1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-atomic1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-chrono-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-chrono1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-chrono1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-container-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-container1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-container1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-context-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-context1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-context1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-coroutine-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-coroutine1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-coroutine1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-date-time-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-date-time1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-date-time1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-exception-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-exception1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-fiber-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-fiber1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-fiber1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-filesystem-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-filesystem1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-filesystem1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-graph-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-graph-parallel-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-graph-parallel1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-graph-parallel1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-graph1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-graph1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-iostreams-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-iostreams1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-iostreams1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-locale-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-locale1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-locale1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-log-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-log1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-log1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-math-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-math1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-math1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-mpi-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-mpi-python-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-mpi-python1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-mpi-python1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-mpi1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-mpi1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-numpy-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-numpy1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-numpy1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-program-options-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-program-options1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-program-options1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-python-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-python1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-python1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-random-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-random1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-random1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-regex-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-regex1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-regex1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-serialization-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-serialization1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-serialization1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-stacktrace-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-stacktrace1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-stacktrace1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-system-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-system1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-system1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-test-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-test1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-test1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-thread-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-thread1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-thread1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-timer-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-timer1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-timer1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-tools-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-type-erasure-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-type-erasure1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-type-erasure1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-wave-dev/focal,now 1.71.0.0ubuntu2 amd64 [installed,automatic]
libboost-wave1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost-wave1.71.0/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost1.71-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]
libboost1.71-tools-dev/focal,now 1.71.0-6ubuntu6 amd64 [installed,automatic]

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Jan 14, 2022

@Jeswin17 Are you running this inside a VM or docker? I think this was never mentioned in the description

@Jeswin17
Copy link
Author

@Jaeyoung-Lim VM!

@julianoes
Copy link
Contributor

The boos dependencies look fine.

I just freshly ran https://github.com/PX4/PX4-Autopilot/blob/master/Tools/setup/ubuntu.sh on my Ubuntu 20.04 and the build of Gazebo works correctly afterwards.

Can you run the setup script and paste the output here? Something has to go wrong somewhere 🤔 ...

@Jeswin17
Copy link
Author

@julianoes So I freshly d/led the repo again and ran setup.sh

Ubuntu 20.04

Installing PX4 general dependencies
Hit:1 http://sg.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://sg.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://sg.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://packages.osrfoundation.org/gazebo/ubuntu-stable focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
ccache is already the newest version (3.7.7-1).
cmake is already the newest version (3.16.3-1ubuntu1).
file is already the newest version (1:5.38-4).
g++ is already the newest version (4:9.3.0-1ubuntu2).
gcc is already the newest version (4:9.3.0-1ubuntu2).
make is already the newest version (4.2.1-1.2).
python3 is already the newest version (3.8.2-0ubuntu2).
python3-dev is already the newest version (3.8.2-0ubuntu2).
python3-setuptools is already the newest version (45.2.0-1).
unzip is already the newest version (6.0-25ubuntu1).
zip is already the newest version (3.0-11build1).
astyle is already the newest version (3.1-2build1).
cppcheck is already the newest version (1.90-4build1).
lcov is already the newest version (1.14-2).
ninja-build is already the newest version (1.10.0-1build1).
python3-wheel is already the newest version (0.34.2-1).
shellcheck is already the newest version (0.7.0-2build2).
build-essential is already the newest version (12.8ubuntu1.1).
gdb is already the newest version (9.2-0ubuntu1~20.04).
git is already the newest version (1:2.25.1-1ubuntu3.2).
libxml2-dev is already the newest version (2.9.10+dfsg-5ubuntu0.20.04.1).
libxml2-utils is already the newest version (2.9.10+dfsg-5ubuntu0.20.04.1).
rsync is already the newest version (3.1.3-8ubuntu0.1).
python3-pip is already the newest version (20.0.2-5ubuntu1.6).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

Installing PX4 Python3 dependencies
Requirement already satisfied: argcomplete in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 1)) (2.0.0)
Requirement already satisfied: argparse>=1.2 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 2)) (1.4.0)
Requirement already satisfied: cerberus in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 3)) (1.3.4)
Requirement already satisfied: coverage in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 4)) (6.2)
Requirement already satisfied: empy>=3.3 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 5)) (3.3.4)
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 6)) (0.18.2)
Requirement already satisfied: jinja2>=2.8 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 7)) (3.0.3)
Requirement already satisfied: jsonschema in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 8)) (4.4.0)
Requirement already satisfied: kconfiglib in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 9)) (14.1.0)
Requirement already satisfied: lxml in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 10)) (4.7.1)
Requirement already satisfied: matplotlib>=3.0.* in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (3.5.1)
Requirement already satisfied: numpy>=1.13 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 12)) (1.22.0)
Requirement already satisfied: nunavut>=1.1.0 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 13)) (1.6.2)
Requirement already satisfied: packaging in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 14)) (21.3)
Requirement already satisfied: pandas>=0.21 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 15)) (1.3.5)
Requirement already satisfied: pkgconfig in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 16)) (1.5.5)
Requirement already satisfied: psutil in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 17)) (5.9.0)
Requirement already satisfied: pygments in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 18)) (2.3.1)
Requirement already satisfied: wheel>=0.31.1 in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 19)) (0.34.2)
Requirement already satisfied: pymavlink in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 20)) (2.4.19)
Requirement already satisfied: pyros-genmsg in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 21)) (0.5.8)
Requirement already satisfied: pyserial in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 22)) (3.5)
Requirement already satisfied: pyulog>=0.5.0 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 23)) (0.9.0)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 24)) (5.3.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 25)) (2.22.0)
Requirement already satisfied: setuptools>=39.2.0 in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 26)) (45.2.0)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 27)) (1.14.0)
Requirement already satisfied: toml>=0.9 in ./.local/lib/python3.8/site-packages (from -r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 28)) (0.10.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.8/site-packages (from jinja2>=2.8->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 7)) (2.0.1)
Requirement already satisfied: importlib-resources>=1.4.0; python_version < "3.9" in ./.local/lib/python3.8/site-packages (from jsonschema->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 8)) (5.4.0)
Requirement already satisfied: attrs>=17.4.0 in ./.local/lib/python3.8/site-packages (from jsonschema->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 8)) (21.4.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in ./.local/lib/python3.8/site-packages (from jsonschema->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 8)) (0.18.0)
Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib>=3.0.->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (2.4.6)
Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib>=3.0.
->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (7.0.0)
Requirement already satisfied: python-dateutil>=2.7 in /usr/lib/python3/dist-packages (from matplotlib>=3.0.->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (2.7.3)
Requirement already satisfied: fonttools>=4.22.0 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.0.
->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (4.28.5)
Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.0.->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib>=3.0.
->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 11)) (1.3.2)
Requirement already satisfied: pydsdl~=1.12 in ./.local/lib/python3.8/site-packages (from nunavut>=1.1.0->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 13)) (1.12.1)
Requirement already satisfied: pytz>=2017.3 in /usr/lib/python3/dist-packages (from pandas>=0.21->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 15)) (2019.3)
Requirement already satisfied: zipp>=3.1.0; python_version < "3.10" in ./.local/lib/python3.8/site-packages (from importlib-resources>=1.4.0; python_version < "3.9"->jsonschema->-r /home/VMadmin/PX4-Autopilot/Tools/setup/requirements.txt (line 8)) (3.7.0)

Installing NuttX dependencies
Reading package lists...
Building dependency tree...
Reading state information...
automake is already the newest version (1:1.16.1-4ubuntu6).
bison is already the newest version (2:3.5.1+dfsg-1).
flex is already the newest version (2.6.4-6.2).
g++-multilib is already the newest version (4:9.3.0-1ubuntu2).
gcc-multilib is already the newest version (4:9.3.0-1ubuntu2).
gettext is already the newest version (0.19.8.1-10build1).
libelf-dev is already the newest version (0.176-1.1build1).
libexpat1-dev is already the newest version (2.2.9-1build1).
libgmp-dev is already the newest version (2:6.2.0+dfsg-4).
libisl-dev is already the newest version (0.22.1-1).
libmpc-dev is already the newest version (1.1.0-1).
libmpfr-dev is already the newest version (4.0.2-1).
libncurses5-dev is already the newest version (6.2-0ubuntu2).
libncursesw5-dev is already the newest version (6.2-0ubuntu2).
libtool is already the newest version (2.4.6-14).
pkg-config is already the newest version (0.29.1-0ubuntu4).
genromfs is already the newest version (0.5.2-4).
gperf is already the newest version (3.1-1build1).
libncurses5 is already the newest version (6.2-0ubuntu2).
texinfo is already the newest version (6.7.0.dfsg.2-5).
binutils-dev is already the newest version (2.34-6ubuntu1.3).
build-essential is already the newest version (12.8ubuntu1.1).
screen is already the newest version (4.8.0-1ubuntu0.1).
u-boot-tools is already the newest version (2021.01+dfsg-3ubuntu020.04.4).
util-linux is already the newest version (2.34-0.1ubuntu9.1).
vim-common is already the newest version (2:8.1.2269-1ubuntu5.4).
gdb-multiarch is already the newest version (9.2-0ubuntu1
20.04).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
kconfig-frontends is already the newest version (4.11.0.1+dfsg-2build1).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
arm-none-eabi-gcc-9-2020-q2-update found, skipping installation

Installing PX4 simulation dependencies
Reading package lists...
Building dependency tree...
Reading state information...
bc is already the newest version (1.07.1-2build1).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
ant is already the newest version (1.10.7-1).
libvecmath-java is already the newest version (1.5.2-7).
openjdk-13-jdk is already the newest version (13.0.7+5-0ubuntu120.04).
openjdk-13-jre is already the newest version (13.0.7+5-0ubuntu1
20.04).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
--2022-01-14 16:54:01-- http://packages.osrfoundation.org/gazebo.key
Resolving packages.osrfoundation.org (packages.osrfoundation.org)... 52.52.171.73
Connecting to packages.osrfoundation.org (packages.osrfoundation.org)|52.52.171.73|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1772 (1.7K) [application/octet-stream]
Saving to: ‘STDOUT’

  •               100%[=================>]   1.73K  --.-KB/s    in 0s      
    

2022-01-14 16:54:02 (12.8 MB/s) - written to stdout [1772/1772]

OK
Hit:1 http://sg.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://sg.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://sg.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:5 http://packages.osrfoundation.org/gazebo/ubuntu-stable focal InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
dmidecode is already the newest version (3.2-3).
pkg-config is already the newest version (0.29.1-0ubuntu4).
gstreamer1.0-libav is already the newest version (1.16.2-2).
gstreamer1.0-plugins-bad is already the newest version (1.16.2-2.1ubuntu1).
gstreamer1.0-plugins-ugly is already the newest version (1.16.2-2build1).
libeigen3-dev is already the newest version (3.3.7-2).
libopencv-dev is already the newest version (4.2.0+dfsg-5).
protobuf-compiler is already the newest version (3.6.1.3-2ubuntu5).
gstreamer1.0-plugins-base is already the newest version (1.16.2-4ubuntu0.1).
gstreamer1.0-plugins-good is already the newest version (1.16.2-1ubuntu2.1).
libgstreamer-plugins-base1.0-dev is already the newest version (1.16.2-4ubuntu0.1).
libxml2-utils is already the newest version (2.9.10+dfsg-5ubuntu0.20.04.1).
libimage-exiftool-perl is already the newest version (11.88-1ubuntu0.1).
gazebo11 is already the newest version (11.10.0-1focal).
libgazebo11-dev is already the newest version (11.10.0-1
focal).
The following packages were automatically installed and are no longer required:
libmbim-glib4 libmbim-proxy libqmi-glib5 libqmi-proxy usb-modeswitch
usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

Relogin or reboot computer before attempting to build NuttX targets

@julianoes
Copy link
Contributor

Looks all fine. And it still did not work afterwards? After a clean build?

@CharlChc
Copy link

@julianoes when I run "make px4_sitl_default gazebo", I got the error report like this:
INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

INFO [simulator] Waiting for simulator to accept connection on TCP port 4560
[Msg] Waiting for master.
[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

Seems like gazebo cannot be launched. Could you please let me know how to solve it. thanks in advance.

@julianoes
Copy link
Contributor

@CharlChc your issue looks different from this thread. I suggest you open a new issue and add some more information, e.g. which OS and which OS version, etc.

@Jaeyoung-Lim Jaeyoung-Lim added the Sim: gazebo classic Gazebo classic simulator label Feb 20, 2022
@argenos
Copy link

argenos commented Mar 24, 2022

Trying to dig into my issues building PX4-Autopilot I just opened PX4/PX4-SITL_gazebo-classic#858, also in Ubuntu 20.04 with make px4_sitl_default gazebo. Might be the same issue reported here (the grvc-ual I mentioned there should not interfere, but I can't be certain).

For me, some steps in the ./ubuntu.sh --no-nuttx script failed (this is a fresh installation of Ubuntu 20.04 and ros-desktop-full already installed):

Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-pip

E: Package 'python-pip' has no installation candidate

Installing PX4 Python3 dependencies
Collecting pip
  Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 2.9 MB/s 
Collecting setuptools
  Downloading setuptools-60.10.0-py3-none-any.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 48.5 MB/s 
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
Installing collected packages: pip, setuptools, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'pip'. No files were found to uninstall.
  Attempting uninstall: setuptools
    Found existing installation: setuptools 45.2.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'setuptools'. No files were found to uninstall.
  Attempting uninstall: wheel
    Found existing installation: wheel 0.34.2
    Not uninstalling wheel at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'wheel'. No files were found to uninstall.
Successfully installed pip-22.0.4 setuptools-60.10.0 wheel-0.37.1

....

Successfully installed MarkupSafe-2.1.1 argparse-1.4.0 cerberus-1.3.4 jinja2-3.1.0 numpy-1.22.3 pandas-1.4.1 pyserial-3.5 python-dateutil-2.8.2 pytz-2022.1 pyulog-0.9.0 toml-0.10.2 tornado-6.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Installing PX4 Python2 dependencies
/usr/bin/python2: No module named pip
/usr/bin/python2: No module named pip

...

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 gazebo9 : Depends: libgazebo9 (= 9.19.0-2~focal) but it is not going to be installed
           Depends: gazebo9-common (>= 9.15.0) but it is not going to be installed
 libgazebo9-dev : Depends: libgazebo9 (= 9.19.0-2~focal) but it is not going to be installed
                  Depends: gazebo9-common (>= 9.15.0) but it is not going to be installed
                  Depends: gazebo9-plugin-base (= 9.19.0-2~focal) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

ROS noetic comes with Gazebo 11:

gazebo --version                                                                                                ─╯
Gazebo multi-robot simulator, version 11.9.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

@channing-prince
Copy link

Hi, I have the same problem, but now i solved it !!!
Well, not exactly solved, i just used a new Ubuntu 20.04 (ROS noetic installed) , and it passed the compile

I have reason to believe that the cartographer or the dependencies caused this problems , I tried to 'make px4_sitl gazebo' on two Ubuntu system and both failed , both of them are configured with cartographer, and cartographer all works fine (used with rplidar, haven‘t try simulation before)
so today , I try the ubuntu only installed ros and it worked !!! I don't know where is the problem, I would be glad if this can help you to reproduce or solve it

Tips:
all above are on the vm
Ubuntu 20.04
ROS Noetic
Cartographer ROS follow the instruction

@julianoes
Copy link
Contributor

Looks like the apt sources and dependencies were in a bad state. I'm glad a re-install fixed it.

@eastman-bechamo
Copy link

eastman-bechamo commented Jun 16, 2022

@CharlChc Did you ever open a new issue or figure out the solution?

@fbenti
Copy link

fbenti commented Dec 19, 2022

I had the same problem of @Jeswin17 in #18999 (comment), solved with #13759 (comment) changing python to python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sim: gazebo classic Gazebo classic simulator
Projects
None yet
Development

No branches or pull requests

8 participants