Ardupilot SITL-gazebo integration issue

Hi guys,

I’m trying to run Ardupilot SITL using Gazebo. I am using Ubuntu 22.04 Jammy Jellyfish and did the Ardupilot setup from (Setting up the Build Environment (Linux/Ubuntu) — Dev documentation). I’ve followed the installation instructions for Gazebo Garden from (Using SITL with Gazebo — Dev documentation). My final application is to use QGroundControl, ArduPilot, and Gazebo together as described here ([GSoC 2020] Integration of ArduPilot and Realsense D4xx Depth Camera for simple Obstacle Avoidance).

When I try to run Gazebo alone it runs without issues, but when I attempt to run SITL with ArduPilot and Gazebo by running the command ./Tools/autotest/sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --map --console, I encounter the error below :

Has anyone experienced this issue or have any suggestions on how to resolve it?
Thank you!

arunachalam@arunachalam-Victus-by-HP-Gaming-Laptop-15-fb0xxx:~$ gz sim -v4 -r iris_runway.sdf
[Msg] Gazebo Sim GUI    v8.6.0
[Dbg] [gz.cc:166] Subscribing to [/gazebo/starting_world].
[Dbg] [gz.cc:168] Waiting for a world to be set from the GUI...
[Dbg] [Gui.cc:263] Waiting for subscribers to [/gazebo/starting_world]...
[Msg] Received world [iris_runway.sdf] from the GUI.
[Dbg] [gz.cc:172] Unsubscribing from [/gazebo/starting_world].
[Msg] Gazebo Sim Server v8.6.0
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[Msg] Loading SDF world file[/home/arunachalam/gz_ws/src/ardupilot_gazebo/worlds/iris_runway.sdf].
[Msg] Serving entity system service on [/entity/system/add]
[Dbg] [Physics.cc:870] Loaded [gz::physics::dartsim::Plugin] from library [/usr/lib/x86_64-linux-gnu/gz-physics-7/engine-plugins/libgz-physics-dartsim-plugin.so]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::Physics] for entity [1]
[Dbg] [Sensors.cc:530] Configuring Sensors system
[Dbg] [Sensors.cc:449] SensorsPrivate::Run
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::Sensors] for entity [1]
[Dbg] [Sensors.cc:425] SensorsPrivate::RenderThread started
[Dbg] [Sensors.cc:265] Waiting for init
[Msg] Create service on [/world/iris_runway/create]
[Msg] Remove service on [/world/iris_runway/remove]
[Msg] Pose service on [/world/iris_runway/set_pose]
[Msg] Pose service on [/world/iris_runway/set_pose_vector]
[Msg] Light configuration service on [/world/iris_runway/light_config]
[Msg] Physics service on [/world/iris_runway/set_physics]
[Msg] SphericalCoordinates service on [/world/iris_runway/set_spherical_coordinates]
[Msg] Enable collision service on [/world/iris_runway/enable_collision]
[Msg] Disable collision service on [/world/iris_runway/disable_collision]
[Msg] Material service on [/world/iris_runway/visual_config]
[Msg] Material service on [/world/iris_runway/wheel_slip]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::UserCommands] for entity [1]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::SceneBroadcaster] for entity [1]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::Imu] for entity [1]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::NavSat] for entity [1]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::JointStatePublisher] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::LiftDrag] for entity [15]
[Msg] ApplyJointForce subscribing to Double messages on [/model/iris_with_gimbal/joint/iris_with_standoffs::rotor_0_joint/cmd_force]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::ApplyJointForce] for entity [15]
[Msg] ApplyJointForce subscribing to Double messages on [/model/iris_with_gimbal/joint/iris_with_standoffs::rotor_1_joint/cmd_force]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::ApplyJointForce] for entity [15]
[Msg] ApplyJointForce subscribing to Double messages on [/model/iris_with_gimbal/joint/iris_with_standoffs::rotor_2_joint/cmd_force]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::ApplyJointForce] for entity [15]
[Msg] ApplyJointForce subscribing to Double messages on [/model/iris_with_gimbal/joint/iris_with_standoffs::rotor_3_joint/cmd_force]
[Dbg] [SystemManager.cc:77] Loaded system [gz::sim::systems::ApplyJointForce] for entity [15]
[libprotobuf ERROR google/protobuf/descriptor_database.cc:175] Symbol name "gz.sim.private_msgs.PerformerAffinity" conflicts with the existing symbol "gz.sim.private_msgs.PerformerAffinity".
[libprotobuf FATAL google/protobuf/descriptor.cc:1382] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
Stack trace (most recent call last):
#31   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x743120722d10, in gz::sim::v8::SdfEntityCreator::CreateEntities(sdf::v14::Model const*)
#30   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x7431206f9f05, in 
#29   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x74312074c378, in gz::sim::v8::SimulationRunner::LoadPlugins(unsigned long, std::vector<sdf::v14::Plugin, std::allocator<sdf::v14::Plugin> > const&)
#28   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x74312075f3c3, in gz::sim::v8::SystemManager::LoadPlugin(unsigned long, sdf::v14::Plugin const&)
#27   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x74312075ebe9, in gz::sim::v8::SystemLoader::LoadPlugin(sdf::v14::Plugin const&)
#26   Object "/lib/x86_64-linux-gnu/libgz-sim8.so.8", at 0x74312075dba8, in 
#25   Object "/lib/x86_64-linux-gnu/libgz-plugin2-loader.so.2", at 0x74312308e56f, in gz::plugin::Loader::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
#24   Object "/lib/x86_64-linux-gnu/libgz-plugin2-loader.so.2", at 0x74312308d4dd, in gz::plugin::Loader::Implementation::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
#23   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a906c7, in dlopen
#22   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a9012d, in 
#21   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125b74b62, in _dl_catch_error
#20   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125b74a97, in _dl_catch_exception
#19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a9063b, in 
#18   Object "/lib64/ld-linux-x86-64.so.2", at 0x74312621834d, in 
#17   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125b74a97, in _dl_catch_exception
#16   Object "/lib64/ld-linux-x86-64.so.2", at 0x743126217ff5, in 
#15   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125b74af4, in _dl_catch_exception
#14   Object "/lib64/ld-linux-x86-64.so.2", at 0x743126210567, in 
#13   Object "/lib64/ld-linux-x86-64.so.2", at 0x74312621047d, in 
#12   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x74308c2b826b, in 
#11   Object "/lib/x86_64-linux-gnu/libprotobuf.so.23", at 0x74311fb81951, in google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*)
#10   Object "/lib/x86_64-linux-gnu/libprotobuf.so.23", at 0x74311fb81966, in google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*)
#9    Object "/lib/x86_64-linux-gnu/libprotobuf.so.23", at 0x74311fa92c35, in 
#8    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7431252f62dc, in _Unwind_Resume
#7    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7431252f5883, in 
#6    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7431218ad958, in __gxx_personality_v0
#5    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7431218ad1e8, in 
#4    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7431218ae20b, in 
#3    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7431218a2b9d, in 
#2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a287f2, in abort
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a42475, in raise
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x743125a969fc, in pthread_kill
Aborted (Signal sent by tkill() 3561 1000)
[Dbg] [SignalHandler.cc:142] Received signal[2].
[Dbg] [Application.cc:96] Initializing application.
[Dbg] [Application.cc:170] Qt using OpenGL graphics interface
[GUI] [Dbg] [Application.cc:657] Create main window
[GUI] [Dbg] [PathManager.cc:68] Requesting resource paths through [/gazebo/resource_paths/get]
[GUI] [Dbg] [Application.cc:237] Terminating application.
arunachalam@arunachalam-Victus-by-HP-Gaming-Laptop-15-fb0xxx:~$ 

The protobuf error looks like an issue with your Gazebo installation? Have you installed both ROS 2 and Gazebo, and is the system up to date? (sudo apt update && sudo apt upgrade)

hello,
I have installed ,Update and upgrade up-to date of Gazebo,Ardupilot and ROS 2 but I am still encountering the same issue and could you suggest me,how to resolve it?
Thank you!