Problem with Gazebo SITL Simulation on MAC

#1

Hi everybody

I followed this tutorial Development Environment on Mac and forked/cloned the Firmware according to Building PX4 Software. Now everything seemed to have worked, I can run jMAVSim with make posix jmavsim (after switching to Java8). But I tried to do a SITL simulation with Gazebo with make posix_sitl_default gazebo and get the following error(s):

[details=Terminal with Error]Last login: Fri Apr 27 12:49:20 on ttys000
public-docking-hg-2580:~ [NAME]$ cd Firmware
public-docking-hg-2580:Firmware [NAME]$ make posix_sitl_default gazebo
[3/7] Performing configure step for ‘sitl_gazebo’
– install-prefix: /usr/local
– Could NOT find Dart (missing: DART_ROOT)
– Boost version: 1.67.0
– Found the following Boost libraries:
– thread
– signals
– system
– filesystem
– program_options
– regex
– iostreams
– date_time
– chrono
– atomic
– Boost version: 1.67.0
– Looking for OGRE…
– Found Ogre Ghadamon (1.9.0)
– Looking for OGRE_Paging…
– Found OGRE_Paging: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgrePaging.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgrePaging.dylib
– Looking for OGRE_Terrain…
– Found OGRE_Terrain: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreTerrain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreTerrain.dylib
– Looking for OGRE_Property…
– Found OGRE_Property: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreProperty.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreProperty.dylib
– Looking for OGRE_RTShaderSystem…
– Found OGRE_RTShaderSystem: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreRTShaderSystem.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreRTShaderSystem.dylib
– Looking for OGRE_Volume…
– Found OGRE_Volume: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreVolume.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreVolume.dylib
– Looking for OGRE_Overlay…
– Found OGRE_Overlay: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreOverlay.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_6/lib/libOgreOverlay.dylib
– Found Protobuf: /usr/local/lib/libprotobuf.dylib (found suitable version “3.5.1”, 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
– Checking for module ‘uuid’
– Found uuid, version 1.6.2
– Checking for module ‘tinyxml2’
– Found tinyxml2, version 6.2.0
– Looking for dlfcn.h - found
– Looking for libdl - found
– FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
– Checking for module ‘gts’
– Found gts, version 0.7.6
– Checking for module ‘libswscale’
– Found libswscale, version 5.1.100
– Checking for module ‘libavdevice >= 56.4.100’
– Found libavdevice , version 58.3.100
– Checking for module ‘libavformat’
– Found libavformat, version 58.12.100
– Checking for module ‘libavcodec’
– Found libavcodec, version 58.18.100
– Checking for module ‘libavutil’
– Found libavutil, version 56.14.100
– Checking for module ‘jsoncpp’
– Found jsoncpp, version 1.8.4
– Checking for module ‘yaml-0.1’
– Found yaml-0.1, version 0.1.7
– Checking for module ‘libzip’
– Found libzip, version 1.4.0
– Boost version: 1.67.0
– Found the following Boost libraries:
– system
– thread
– timer
– chrono
– date_time
– atomic
– Building klt_feature_tracker without catkin
– Building OpticalFlow with OpenCV
– catkin DISABLED
– Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version “3.5.1”)
Gazebo version: 9.0
– Boost version: 1.67.0
– Found the following Boost libraries:
– system
– thread
– timer
– chrono
– date_time
– atomic
– Configuring done
– Generating done
– Build files have been written to: /Users/[NAME]/Firmware/build/posix_sitl_default/build_gazebo
[4/7] Performing build step for ‘sitl_gazebo’
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build
cd /Users/[NAME]/Firmware/build/posix_sitl_default/build_gazebo && /usr/local/Cellar/cmake/3.11.1/bin/cmake --build . && /usr/local/Cellar/cmake/3.11.1/bin/cmake -E touch /Users/[NAME]/Firmware/build/posix_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/24] Linking CXX shared library libmav_msgs.dylib
[2/24] Linking CXX shared library libLiftDragPlugin.dylib
[3/24] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/px4flow.cpp.o
[4/24] Linking CXX shared library librotors_gazebo_controller_interface.dylib
[5/24] Linking CXX shared library libgazebo_uuv_plugin.dylib
[6/24] Linking CXX shared library libgazebo_geotagged_images_plugin.dylib
[7/24] Generating /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
FAILED: /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
cd /Users/[NAME]/Firmware/Tools/sitl_gazebo && rm -f /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && /usr/local/bin/python /Users/[NAME]/Firmware/Tools/sitl_gazebo/scripts/xacro.py -o /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro enable_mavlink_interface:=true enable_ground_truth:=false enable_wind:=false enable_logging:=false rotors_description_dir:=/Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description && gz sdf -p /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf >> /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && rm -f /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf

dyld: Library not loaded: /usr/local/opt/ffmpeg/lib/libavcodec.57.dylib
Referenced from: /usr/local/bin/gz
Reason: image not found
/bin/sh: line 1: 14645 Abort trap: 6 gz sdf -p /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf >> /Users/[NAME]/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
[8/24] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/optical_flow.cpp.o
[9/24] Linking CXX shared library libgazebo_sonar_plugin.dylib
[10/24] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_px4.cpp.o
[11/24] Linking CXX shared library librotors_gazebo_imu_plugin.dylib
[12/24] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
make: *** [posix_sitl_default] Error 1
public-docking-hg-2580:Firmware [NAME]$
[/details]

Does anybody have an idea what the problem is here?

Thank you very much for your efforts and answers.

EdtheFred

#2

I have also followed this same tutorial, forked/cloned repository. I can run jmavsim okay, but I need to get a fixed-wing sim with gazebo. I’m not able to run/build "make pix4_sitl gazebo_plane without errors. I have installed everything I can think of on my macbook pro. Need help please!