Problem with gazebo subscribe block in simulink

1 回表示 (過去 30 日間)
Aleksey Kolosov
Aleksey Kolosov 2021 年 7 月 27 日
コメント済み: Gaurav Bhosale 2021 年 8 月 5 日
Hello! I use gazebo and simulink in VM (ubuntu 20, matlab 2020b, gazebo 11). When I start gazebo, I can see custom gazebo topic (use gazebo topic -l), but in gazebo subscribe block I can't find any custom gazebo topic. (note: gazebo and simulink both in VM)
Plealse help me to solve this problem, thanks!

回答 (1 件)

Gaurav Bhosale
Gaurav Bhosale 2021 年 8 月 2 日
Hi Aleksey,
To enable custom message support, you need to use 'gazebogenmsg' in MATLAB. The .proto files or Gazebo msgs, you select while building custom message dependencies, only those topics you can see in Subscribe or Publish block.
There are few steps you should follow to see cutsom topics in Subscribe or Publish block.
1] You need to create custom .proto file or select Gazebo .proto message with 'GazeboMessageList'
2] Call 'gazebogenmsg' which generate required dependencies.
3] You need to follow steps mentioned at the end of 'gazebogenmsg' call
i.e. addpath(fullfile(folderPath,'install'))
savepath
4] You need to package plugin including path of custom message dependencies with 'packageGazeboPlugin'
5] You need to copy and build GazeboPlugin.zip on VM
6] You can launch Gazebo .world
7] Further, on Simulink side, you can add Subscribe or Publish block to see those topics.
Thanks.
With Regards,
Gaurav Bhosale
  2 件のコメント
Aleksey Kolosov
Aleksey Kolosov 2021 年 8 月 5 日
編集済み: Aleksey Kolosov 2021 年 8 月 5 日
Thanks! I am trying code from https://www.mathworks.com/help/robotics/ref/gazebogenmsg.html, but in 5-th your step gazebo can't build GazeboPlugin. I use gazebo 11, but in Cmakefile max version of gazebo is 10. How solve this problem?
Gaurav Bhosale
Gaurav Bhosale 2021 年 8 月 5 日
Hi Aleksey,
Currently, Gazebo CoSIm is providing support for Gazebo 9 and 10 version. Thats's why, you are unable to build Gazeboplugin.
For Gazebo 11, you can edit CMakeLists.txt and add following line.
SET(GAZEBO_MAX_SUPPORTED_VERSION "11")
Basically, you need to change 'GAZEBO_MAX_SUPPORTED_VERSION' to 11 from 10.
Thanks.
With Regards,
Gaurav Bhosale

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGazebo Co-Simulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by