Gazebo Drone cannot fly while simulink model can run the model

조회 수: 3 (최근 30일)
Setthivadee
Setthivadee 2024년 2월 1일
편집: Sachin Lodhi 2024년 2월 26일
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.

답변 (1개)

Sachin Lodhi
Sachin Lodhi 2024년 2월 26일
편집: Sachin Lodhi 2024년 2월 26일
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 :

카테고리

Help CenterFile Exchange에서 Gazebo Co-Simulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by