Unable to use camera in typhoon_480 model using MAVSDK

Hi,

I’m trying to run the MAVSDK camera.cpp example with the typhoon_480 model (headless mode).

I’m able to see the camera feed in QGroundControl. Also, able to take photos and record video in QGC. But the camera.cpp example is discovering only the gimbal and timing out for the camera.

camera.cpp logs

camera/build   main  ./camera udpin://0.0.0.0:14540
[11:59:35|Info ] MAVSDK version: v2.12.2-60-ga428ee99 (mavsdk_impl.cpp:28)
Waiting to discover system...
[11:59:35|Info ] New system on: 127.0.0.1:14580 (with system ID: 1) (udp_connection.cpp:179)
[11:59:35|Debug] New system ID: 1 Comp ID: 1 (mavsdk_impl.cpp:705)
[11:59:35|Debug] Component Autopilot (1) added. (system_impl.cpp:367)
[11:59:35|Warn ] Vehicle type changed (new type: 13, old type: 0) (system_impl.cpp:218)
[11:59:35|Debug] Discovered 1 component(s) (system_impl.cpp:510)
[11:59:35|Debug] Component Gimbal (154) added. (system_impl.cpp:367)
[11:59:35|Warn ] sending again after 0.00205996 s, retries to do: 3  (520). (mavlink_command_sender.cpp:322)
[11:59:35|Warn ] Received ack for not-existing command: 520! Ignoring... (mavlink_command_sender.cpp:290)
No camera found, exiting.

SITL logs

 Drone-Software/PX4-Autopilot   main  make px4_sitl gazebo-classic_typhoon_h480__baylands                   
[0/4] Performing build step for 'sitl_gazebo-classic'
ninja: no work to do.
[3/4] cd /home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/...ments/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
model: typhoon_h480
world: baylands
src_path: /home/ka/Documents/Projects/Drone-Software/PX4-Autopilot
build_path: /home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default
GAZEBO_PLUGIN_PATH :/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
GAZEBO_MODEL_PATH :/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models:/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models
LD_LIBRARY_PATH /usr/local/cuda/lib64:/usr/local/cuda/lib64::/usr/lib64:/usr/lib64:/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
Using: /home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/typhoon_h480/typhoon_h480.sdf
not running gazebo gui
SITL COMMAND: "/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/ka/Documents/Projects/Drone-Software/PX4-Autopilot/build/px4_sitl_default"/etc

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

px4 starting.

INFO  [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=6011
INFO  [param] selected parameter default file parameters.bson
INFO  [param] importing from 'parameters.bson'
INFO  [parameters] BSON document size 473 bytes, decoded 473 bytes (INT32:14, FLOAT:9)
INFO  [param] selected parameter backup file parameters_backup.bson
INFO  [dataman] data manager file './dataman' size is 7872608 bytes
INFO  [init] PX4_SIM_HOSTNAME: localhost
INFO  [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
12.40
INFO  [simulator_mavlink] Simulator connected on TCP port 4560.
INFO  [lockstep_scheduler] setting initial absolute time to 16000 us
INFO  [commander] LED: open /dev/led0 failed (22)
INFO  [uxrce_dds_client] init UDP agent IP:127.0.0.1, port:8888
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14558 remote port 14530
INFO  [mavlink] partner IP: 127.0.0.1
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2024-08-23/06_25_11.ulg	
INFO  [logger] Opened full log file: ./log/2024-08-23/06_25_11.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [tone_alarm] home set
INFO  [mavlink] partner IP: 127.0.0.1
INFO  [commander] Ready for takeoff!

Also, I noticed that there are Mavlink messages only for gimbal and none for camera. So how does it work in QGC?