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

Error in make posix_sitl_default gazebo #9575

Closed
akshaykulkarni07 opened this issue May 31, 2018 · 7 comments
Closed

Error in make posix_sitl_default gazebo #9575

akshaykulkarni07 opened this issue May 31, 2018 · 7 comments
Assignees
Labels
bug Sim: gazebo classic Gazebo classic simulator

Comments

@akshaykulkarni07
Copy link

akshaykulkarni07 commented May 31, 2018

I am performing simulation of a quadcopter with Pixhawk in offboard mode. I was following this link.

When I do
make posix_sitl_default

I get the following

-- PX4 VERSION: v1.8.0-beta2-16-g6ca0784
-- CONFIG: posix_sitl_default
-- Build Type: RelWithDebInfo
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Found PY_jinja2: /usr/local/lib/python2.7/dist-packages/jinja2  
-- C compiler: cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
-- C++ compiler: c++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
-- PX4 ECL: Very lightweight Estimation & Control Library v0.9.0-521-ga80b3ab
-- Configuring done
-- Generating done
-- Build files have been written to: /home/akshay/src/Firmware/build/posix_sitl_default
[562/632] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- 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 using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.83
-- Found Simbody: /usr/include/simbody  
-- 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.58.0
-- Found the following Boost libraries:
--   thread
--   signals
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Boost version: 1.58.0
-- 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 (Required is at least version "2.3.0") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.1.4
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.27.0
-- Found UUID: TRUE  
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 2.2.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 3.1.101
-- Found SWSCALE: TRUE  
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 56.4.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100") 
-- Checking for module 'libavformat'
--   Found libavformat, version 56.40.101
-- Found AVFORMAT: TRUE  
-- Checking for module 'libavcodec'
--   Found libavcodec, version 56.60.100
-- Found AVCODEC: TRUE  
-- Checking for module 'libavutil'
--   Found libavutil, version 54.31.100
-- Found AVUTIL: TRUE  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0") 
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.2
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.6
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.0.1
-- Found ZIP: TRUE  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   chrono
--   date_time
--   atomic
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Found MAVLink: /home/akshay/src/Firmware/mavlink/include (found version "2.0") 
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
-- Checking for module 'protobuf'
--   Found protobuf, version 2.6.1
Gazebo version: 9.0
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   chrono
--   date_time
--   atomic
-- Configuring done
-- Generating done
-- Build files have been written to: /home/akshay/src/Firmware/build/posix_sitl_default/build_gazebo
[629/632] Performing build step for 'sitl_gazebo'
FAILED: cd /home/akshay/src/Firmware/build/posix_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/akshay/src/Firmware/build/posix_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/72] Running C++ protocol buffer compiler on msgs/Int32.proto
[2/72] Running C++ protocol buffer compiler on msgs/CommandMotorSpeed.proto
[3/72] Running C++ protocol buffer compiler on msgs/opticalFlow.proto
[4/72] Running C++ protocol buffer compiler on msgs/Float.proto
[5/72] Running C++ protocol buffer compiler on msgs/SITLGps.proto
[6/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
[7/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
[8/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
[9/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
[10/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
[11/72] Running C++ protocol buffer compiler on msgs/lidar.proto
[12/72] Running C++ protocol buffer compiler on msgs/SensorImu.proto
[13/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
[14/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
[15/72] Running C++ protocol buffer compiler on msgs/sonarSens.proto
[16/72] Running C++ protocol buffer compiler on msgs/irlock.proto
[17/72] Running C++ protocol buffer compiler on msgs/odom.proto
[18/72] Running C++ protocol buffer compiler on msgs/Groundtruth.proto
[19/72] Running C++ protocol buffer compiler on msgs/MotorSpeed.proto
[20/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
[21/72] Generating /home/akshay/src/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
[22/72] Building CXX object CMakeFiles/mav_msgs.dir/SITLGps.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
[23/72] Building CXX object CMakeFiles/mav_msgs.dir/Groundtruth.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
[24/72] Building CXX object CMakeFiles/mav_msgs.dir/Int32.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/r200/r200.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
[25/72] Building CXX object CMakeFiles/mav_msgs.dir/irlock.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
[26/72] Building CXX object CMakeFiles/mav_msgs.dir/opticalFlow.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/c920/c920.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
[27/72] Building CXX object CMakeFiles/mav_msgs.dir/SensorImu.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
[28/72] Building CXX object CMakeFiles/mav_msgs.dir/MotorSpeed.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
[29/72] Building CXX object CMakeFiles/mav_msgs.dir/Float.pb.cc.o
/home/akshay/src/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja -> /home/akshay/src/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
[30/72] Building CXX object CMakeFiles/mav_msgs.dir/lidar.pb.cc.o

[31/72] Building CXX object CMakeFiles/mav_msgs.dir/sonarSens.pb.cc.o
[32/72] Building CXX object CMakeFiles/mav_msgs.dir/CommandMotorSpeed.pb.cc.o
[33/72] Building CXX object CMakeFiles/mav_msgs.dir/odom.pb.cc.o
[34/72] Building CXX object OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o
[35/72] Linking CXX shared library libmav_msgs.so
[36/72] Linking CXX static library OpticalFlow/klt_feature_tracker/libklt_feature_tracker.a
[37/72] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/optical_flow.cpp.o
[38/72] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_px4.cpp.o
[39/72] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/px4flow.cpp.o
[40/72] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
[41/72] Building CXX object CMakeFiles/rotors_gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
[42/72] Building CXX object CMakeFiles/gazebo_lidar_plugin.dir/src/gazebo_lidar_plugin.cpp.o
[43/72] Building CXX object CMakeFiles/rotors_gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o
[44/72] Building CXX object CMakeFiles/rotors_gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
[45/72] Building CXX object CMakeFiles/rotors_gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o
[46/72] Building CXX object CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
[47/72] Building CXX object CMakeFiles/gazebo_sonar_plugin.dir/src/gazebo_sonar_plugin.cpp.o
[48/72] Building CXX object CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/geo_mag_declination.cpp.o
[49/72] Building CXX object CMakeFiles/gazebo_irlock_plugin.dir/src/gazebo_irlock_plugin.cpp.o
[50/72] Building CXX object CMakeFiles/rotors_gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o
[51/72] Building CXX object CMakeFiles/gazebo_uuv_plugin.dir/src/gazebo_uuv_plugin.cpp.o
[52/72] Linking CXX shared library librotors_gazebo_multirotor_base_plugin.so
FAILED: /usr/bin/c++   -DLIBBULLET_VERSION=2.83 -DLIBBULLET_VERSION_GT_282 -Drotors_gazebo_mavlink_interface_EXPORTS -I/usr/include/opencv -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-6.0 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/akshay/src/Firmware/Tools/sitl_gazebo/include -I/home/akshay/src/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -I/usr/include/gazebo-9/gazebo/msgs -I/usr/include/eigen3 -I. -I/usr/include/eigen3/eigen3 -I/usr/local/include/OGRE -I/usr/local/include/OGRE/Paging -I/home/akshay/src/Firmware/mavlink/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -std=c++11 -std=c++11 -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++14 -MMD -MT CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o -MF CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o.d -o CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o -c /home/akshay/src/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp
/home/akshay/src/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp: In member function ‘virtual void gazebo::GazeboMavlinkInterface::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/akshay/src/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:279:23: error: ‘class gazebo::physics::World’ has no member named ‘GetName’
   model_param(world_->GetName(), model_->GetName(), "mavlink_udp_port", mavlink_udp_port_);
                       ^
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:147: recipe for target 'posix_sitl_default' failed
make: *** [posix_sitl_default] Error 1

I had previously followed the same method and that had worked correctly. However, I tried to start over and encountered this error.

Could you advise on how to proceed? Thanks.

@akshaykulkarni07 akshaykulkarni07 changed the title Error in make posix_sitl_default gazebo Error in make posix_sitl_default gazebo May 31, 2018
@akshaykulkarni07 akshaykulkarni07 changed the title Error in make posix_sitl_default gazebo Error in make posix_sitl_default gazebo May 31, 2018
@TSC21
Copy link
Member

TSC21 commented May 31, 2018

What Gazebo version are you using?

@akshaykulkarni07
Copy link
Author

@TSC21 I am using Gazebo 9.0.0

@TSC21
Copy link
Member

TSC21 commented May 31, 2018

Ok this should need a fix on sitl_gazebo to support Gazebo 9 aswell. This function was introduced in the latest commits for sitl_gazebo so this needs a compatibility fix (current CI builds over version 7). I will push a fix and let you know later today.

@TSC21
Copy link
Member

TSC21 commented May 31, 2018

In the mean time, for it to work, regress the commit tag of sitl_gazebo to a previous commit (4 tags bellow should be enough).

@TSC21
Copy link
Member

TSC21 commented May 31, 2018

The fix should include this: http://answers.gazebosim.org/question/16388/getname-has-not-been-declared-gazebo-9/. So GetName() should become Name() for Gazebo 9. You can also try to change it on the source code, but a fix will be pushed later today.

@TSC21 TSC21 added bug Sim: gazebo classic Gazebo classic simulator labels May 31, 2018
@TSC21 TSC21 self-assigned this May 31, 2018
@akshaykulkarni07
Copy link
Author

Thank you for helping.

@TSC21
Copy link
Member

TSC21 commented Jun 1, 2018

@akshaykvnit fix here: PX4/PX4-SITL_gazebo-classic#210

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

No branches or pull requests

2 participants