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.
http://gazebosim.org
[Msg] Waiting for master.
INFO [commander] LED: open /dev/led0 failed (22)
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.117
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: 127.0.0.1
INFO [commander] Armed by external command
INFO [tone_alarm] arming warning
INFO [commander] Takeoff detected
And this is my drone sdf: leonardo_tilting.sdf.jinja - Google Drive
Do you have any idea or advice on why the rotors don’t spin?
Thanks.