DJI Mavic Pro 2 Drone in Webots Nosedives at High Speeds

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

Hello,

I am using the webots_ros2_mavic package found [here] (https://github.com/cyberbotics/webots...) 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 mavic_driver.py 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

Thanks!

edit retag flag offensive close merge delete

Comments

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 -0500 )edit

Of course, will do!

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