Gazebo Drone cannot fly while simulink model can run the model

3 Ansichten (letzte 30 Tage)
Setthivadee
Setthivadee am 1 Feb. 2024
Bearbeitet: Sachin Lodhi am 26 Feb. 2024
Hello all, I downloaded the VM to use the gazebo from this link and I want to try to play Gazebo drone with the simulink from this tutorial: MATLAB and Simulink Robotics Arena: Simulating Quadcopter Missions. However, the problem is exist I cannot control the drone from the simulink model. The simulink model can run but the it seems that drone in gazebo cannot fly. So i checked the rostopic list and i cannot see the cmd_vel or groundtruth/state. I also used the gazebo lauch file fromthis github and get the same result as the drone not fly. I dont understancd if the topic not exist why simulink model can run the model. Could anyone help me please.
Thand you so much in advance.

Antworten (1)

Sachin Lodhi
Sachin Lodhi am 26 Feb. 2024
Bearbeitet: Sachin Lodhi am 26 Feb. 2024
The VM installation link that you used contains a newer version of Gazebo which the plugin for co-simulation is not compatible with. This is why you are able to connect to Gazebo, but the drone never flies.
Fortunately, there is a workaround. Please use the VM found on the "ROS 2 Dashing and Gazebo" documentation page linked below, which contains an older version of Gazebo.
As a note, you will have to manually install the Gazebo Plugin for this VM, and you can find the instructions on the following documentation page under "Install Gazebo Plugin Manually":
Once the plugin is installed, please open the Simulink model again for this example.
Even after using this workaround, the drone is not flying, then please refer to the following MATLAB answer :

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by