Gazebo Drone cannot fly while simulink model can run the model
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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.
Dashing VM: https://www.mathworks.com/support/product/robotics/ros2-vm-installation-instructions-v5.html
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":
Install Gazebo Plugin: https://www.mathworks.com/help/robotics/ug/perform-co-simulation-between-simulink-and-gazebo.html#PerformCoSimulationBetweenSimulinkAndGazeboExample-1
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 :
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gazebo Co-Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!