New custom drone SITL Gazebo

Hi guys,
i’m trying to simulate a new drone with Px4 and Gazebo (without ROS for now).
I’ve followed this guide

I have created all the files needed: airframe, sdf.jinja, model, etc…
The drone is spawned in gazebo ( with the command “make px4_sitl gazebo_my_drone”) and everything works. But when i try to takeoff with QGroundControl none of the propellers spin.
Checking the gazebo topic of the motors “/gazebo/command/motor_speed” i can see that the messages are published at 250Hz, it means like that something is sent but the drone doesn’t receive it.
With the others airframes i don’t have any problem and i have followed the typhoon .sdf.jinja file as example.

This is the results in the terminal when i try to takeoff:

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=2001
INFO  [param] selected parameter default file eeprom/parameters_2001
INFO  [parameters] BSON document size 350 bytes, decoded 350 bytes (INT32:15, FLOAT:3)
[param] Loaded: eeprom/parameters_2001
INFO  [dataman] data manager file './dataman' size is 7866640 bytes
PX4 SIM HOST: localhost
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
INFO  [simulator] Simulator connected on TCP port 4560.
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.

[Msg] Waiting for master.
INFO  [commander] LED: open /dev/led0 failed (22)
[Msg] Connected to gazebo master @
[Msg] Publicized address:
INFO  [init] Mixer: etc/mixers/octo_cox.main.mix on /dev/pwm_output0
INFO  [init] setting PWM_AUX_OUT none
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  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2022-06-05/10_35_20.ulg	
INFO  [logger] Opened full log file: ./log/2022-06-05/10_35_20.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] notify positive
INFO  [tone_alarm] home set
INFO  [tone_alarm] notify negative
INFO  [mavlink] partner IP:
INFO  [commander] Armed by external command	
INFO  [tone_alarm] arming warning
INFO  [commander] Takeoff detected

And this is my drone sdf:

Do you have any idea or advice on why the rotors don’t spin?


Hey, I just reviewed your SDF file. If you replace all of your arm_joint types from fixed to revolute, you might be able to resolve your issue.
Let me know if it helped.

Hi @Aminyazdanshenas,
thank you for your kind help.
Theese joints that are you are referring to, are the joints between the base_link (the core frame of the drone) and the arms. For now they are fixed but once this drone will be able to fly, i want to make them as revolution joints in order to tilt the rotors.
Anyway when i change them from fixed to revolute, nothing changes.

Do you have any other advice?


sorry for the late response.
did you get any errors while you were making your model such as ```
Invalid argument. Unable to set value [{{ mavlink_udp_port }} ] for key[mavlink_udp_port].