DJI Mavic Pro 2 Drone in Webots Nosedives at High Speeds

asked 2023-07-05 01:43:48 -0600


I am using the webots_ros2_mavic package found [here] ( to simulate a drone in Webots. The drone is controlled by publishing a simple Twist message with linear and angular velocity components.

I noticed that when sending commands that are high speeds (such as a value of 5 or greater) to the linear velocity component of the Twist message, the drone tilts forwards when flying. As a result it starts descending/nosediving as it is also flying forwards. I understand that this also happens in real life with real drones.

Is there a way to eliminate this effect in given the code in this package? There is a file called in this package which implements a PID controller for the drone's movement. But I am not sure what (if anything at all) needs to be changed to achieve this effect.

Ubuntu 22.04, ROS2 Humble, Webots 2023a


edit retag flag offensive close merge delete


ROS answers is moving to stackexchange, could please post your question there with the webots and ros2 tags?

Olivier Michel gravatar image Olivier Michel  ( 2023-07-05 01:56:05 -0600 )edit

Of course, will do!

endoplasmic_reticulum gravatar image endoplasmic_reticulum  ( 2023-07-05 03:30:54 -0600 )edit