Launch Gazebo from Firmware repository - problem with make

#1

Hi,
I’m trying to run SITL simulation with Gazebo. I’m trying to run it from GitHub master Branch.
Several times I tried reinstalling PX4 toolchain from scripts on dev documentation page.

$ make px4_sitl gazebo_plane

raise with error:

./Imu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::angular_velocity() const’:
./Imu.pb.h:371:24: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./Imu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::linear_acceleration() const’:
./Imu.pb.h:455:24: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/roman/repos/tf/Firmware_upstream/Tools/sitl_gazebo/include/gazebo_mavlink_interface.h:65:0,
                 from /home/roman/repos/tf/Firmware_upstream/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:22:
./Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::position() const’:
./Odometry.pb.h:322:24: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./Odometry.pb.h: In member function ‘const gazebo::msgs::Quaternion& nav_msgs::msgs::Odometry::orientation() const’:
./Odometry.pb.h:376:24: error: ‘_Quaternion_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Quaternion_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::linear_velocity() const’:
./Odometry.pb.h:430:24: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::angular_velocity() const’:
./Odometry.pb.h:484:24: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

And this

#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.

My protc version is:

$ protoc --version 
libprotoc 3.6.1

I’m not sure what and how re-generate that files. I’m trying to google it for the second day without success…
(On intel PC, Ubuntu 18.04.1)

Does anyone know how to fix this?

Thank you!

#2

Quick check: I’m assuming you have tried make clean?

I’m just trying to reproduce this now on my Ubuntu 18.04.1.

#3

Yes, I did make clean more times.

I wondered if it could not be related to that, that I have installed Ros kinetic earlier. But I have tried to purge it from my computer before installation of PX4 toolchain.

Thanks!

#4

So it builds for me in a fresh Ubuntu 18.04.1. I installed Gazebo 9 according to this install script:

That’s the versions I have:

$ protoc --version
libprotoc 3.0.0

$ gazebo --version
Gazebo multi-robot simulator, version 9.0.0

So it looks like you have somehow a newer protoc version from some ppa.

1 Like
#5

Thank you for advice. I tried to get gazebo and protoc to the same version as you wrote but it did not help. So I have decided to reinstall my computer (therefore this late reply).

You wrote, that you installed fresh ubuntu 18.04. You are using some virtualization?

After successful installation of PX4 toolchain and command make px4_sitl gazebo_plane I get this error:

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.220
[Msg] Camera on udp port 14530
[Dbg] [gazebo_mavlink_interface.cpp:131] joint [rotor_puller_joint] found for channel[4] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:131] joint [left_elevon_joint] found for channel[5] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:131] joint [right_elevon_joint] found for channel[6] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:131] joint [elevator_joint] found for channel[7] joint control active for this channel.
[Msg] Conecting to PX4 SITL using TCP
[Msg] Lockstep is enabled
[Msg] Speed factor set to: 1
[Err] [gazebo_mavlink_interface.cpp:228] real_time_update_rate is set to 500 instead of 250, aborting.
10.80
/home/roman/repos/tf/Firmware_upstream/Tools/sitl_run.sh: řádek 108: 15723 Neúspěšně ukončen (SIGABRT)        (core dumped [obraz paměti uložen]) gzserver --verbose "${src_path}/Tools/sitl_gazebo/worlds/${model}.world"
SITL COMMAND: "/home/roman/repos/tf/Firmware_upstream/build/px4_sitl_default/bin/px4" "/home/roman/repos/tf/Firmware_upstream"/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t "/home/roman/repos/tf/Firmware_upstream"/test_data
INFO  [px4] Creating symlink /home/roman/repos/tf/Firmware_upstream/ROMFS/px4fmu_common -> /home/roman/repos/tf/Firmware_upstream/build/px4_sitl_default/tmp/rootfs/etc

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [dataman] Unknown restart, data manager file './dataman' size is 11405132 bytes
INFO  [simulator] Waiting for simulator to connect on TCP port 4560
[Err] [ConnectionManager.cc:119] Failed to connect to master in 30 seconds.
[Err] [gazebo_shared.cc:83] Unable to initialize transport.
[Err] [gazebo_client.cc:62] Unable to setup Gazebo

With make px4_sitl gazebo_solo (or other airframe) it works.

Thank you @JulianOes

Now I have newer version of Gazebo:

$ protoc --version 
libprotoc 3.0.0

$ gazebo --version
Gazebo multi-robot simulator, version 9.6.0
#6

Sorry, this was my fault in the recent lockstep addition. Should be fixed with:


1 Like