PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
http://dev.px4.io/simulation-gazebo.html
378 stars 798 forks source link

issue with make px4_sitl gazebo on mac 10.15 catalina bullet not found #851

Open zsRDPR opened 2 years ago

zsRDPR commented 2 years ago

Hi All, I have been working on getting SITL with gazebo running and have run against a bit of a wall. I'm fairly sure it's a python looking in the wrong place issue since my installation has 3.7 and 3.9, and initially I had issues with some dependencies being installed in 3.7 but px4 looking in 3.9 for the make command. I created an alias as per instructions to the 3.9 installation of pip3 and that resolved the earlier dependency issue. I'm left with the following error and output. Any help as soon as possible would be great, I know it's a simple thing at this point but could use a little input.

make px4_sitl gazebo
-- PX4 version: v1.13.0-alpha1-4386-gb7e0f17c6a
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9.10", minimum required is "3") 
-- PX4 config file: /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/boards/px4/sitl/default.px4board
-- PLATFORM posix
-- ROMFSROOT px4fmu_common
-- TESTING y
-- ETHERNET y
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- cmake build type: RelWithDebInfo
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building for code coverage
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- ROMFS: ROMFS/px4fmu_common
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/build/px4_sitl_default
[4/853] git submodule src/drivers/gps/devices
[8/853] git submodule Tools/sitl_gazebo
[13/853] git submodule src/modules/mavlink/mavlink
[15/853] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- 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: /usr/local/lib/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.58") found components: system thread filesystem 
CMake Warning (dev) at /usr/local/Cellar/cmake/3.22.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (gazebo).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.22.3/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  /usr/local/lib/cmake/gazebo/gazebo-config.cmake:62 (include)
  CMakeLists.txt:48 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'bullet>=2.82'
--   No package 'bullet' found
-- Checking for module 'bullet2.82>=2.82'
--   No package 'bullet2.82' found
CMake Error at /usr/local/lib/cmake/gazebo/gazebo-config.cmake:134 (message):
  Error: Bullet > 2.82 not found, please install libbullet2.82-dev.
Call Stack (most recent call first):
  CMakeLists.txt:48 (find_package)

-- Configuring incomplete, errors occurred!
See also "/Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
[95/853] Building CXX object msg/CMakeFiles/uorb_msgs.dir/topics_sources/input_rc.cpp.o
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure 
cd /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/local/Cellar/cmake/3.22.3/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/Tools/sitl_gazebo && /usr/local/Cellar/cmake/3.22.3/bin/cmake -E touch /Users/nss/Documents/RIIS/code/v2/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[101/853] Generating git version header
ninja: build stopped: subcommand failed.
make: *** [px4_sitl] Error 1
zsRDPR commented 2 years ago
export PATH=“$PATH:"/usr/local/Cellar/bullet/3.21/lib/""

finds it, however I still suspect it's an issue with my python installations. I tried removing and reinstalling python after removing all the associated PX4 tools so it would be a clean installation but I'm still having issues. So overall protobuf is located and now I get further after addressing a similar issue to above with OGRE. The new message is :

-- Looking for ignition-fuel_tools4 -- found version 4.4.0
-- Searching for dependencies of ignition-fuel_tools4
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.9.4
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.2.5
-- Checking for module 'libzip'
--   Found libzip, version 1.8.0
-- Looking for ignition-common3 -- found version 3.14.0
-- Looking for ignition-math6 -- found version 6.10.0
-- Looking for ignition-msgs5 -- found version 5.8.1
-- Checking for module 'OGRE'
--   No package 'OGRE' found
CMake Deprecation Warning at external/OpticalFlow/CMakeLists.txt:34 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at external/OpticalFlow/external/klt_feature_tracker/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.19.4") 
-- Checking for module 'protobuf'
--   No package 'protobuf' found
CMake Error at CMakeLists.txt:147 (message):
  protobuf version: not compatible, must be >= 2.5.0

-- Configuring incomplete, errors occurred!
See also "/Users/nss/Documents/RIIS/code/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
[1/6] Generating ../../logs
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure /Users/nss/Documents/RIIS/code/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure 
cd /Users/nss/Documents/RIIS/code/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/local/Cellar/cmake/3.22.3/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /Users/nss/Documents/RIIS/code/PX4-Autopilot/Tools/sitl_gazebo && /usr/local/Cellar/cmake/3.22.3/bin/cmake -E touch /Users/nss/Documents/RIIS/code/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
ninja: build stopped: subcommand failed.
make: *** [px4_sitl] Error 1

any help would be appreciated - I haven't been successful adding the associated protobuf or protoc paths to either PATH or PKG_CONFIG_PATH. There is only one installation of protobuf, it appears to be acceptable especially as it's found earlier in the compilation process and a 'which' command only finds one copy.