MATLAB Answers

Gazebo Pacer setup issue

3 views (last 30 days)
Minseok Jeon
Minseok Jeon on 29 Mar 2021
Commented: Minseok Jeon on 26 Apr 2021
I am asking my questions aftering trying this example for multiple times: https://it.mathworks.com/help/robotics/ug/perform-co-simulation-between-simulink-and-gazebo.html
I am planning to connect my Simulink model to Gazebo robot, and I have found that building a world setup is required to perform co-simulation between Gazebo and Simulink. If there is a way to do so without building a world setup or with launch file, I would like to know more about it. But, if we have to use a world file, do we need to put this in every file that the world file will be dependent on or just one world file? : <plugin name="GazeboPlugin" filename="lib/libGazeboCoSimPlugin.so"><portNumber>14581</portNumber></plugin>
Also, where exactly are we supposed to put this? : export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/home/user/src/GazeboPlugin/export
If there is any more explanations regarding those syntax problems, I will greatly appreciate the help.
Thank you
Sam J.

Answers (1)

Amrtanshu Raj
Amrtanshu Raj on 19 Apr 2021
Hi,
Based on what I understand from your question here is my answer in points.
  1. libGazeboCoSimPlugin enables the Gazebo size of the function required for Gazebo Cosim to work.
  2. You need to add this plugin to all the worlds you want to interact with via Gazebo Cosim.
  3. You need to add it by editing the world file and adding it.
  4. export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/home/user/src/GazeboPlugin/export You need to enter this into the terminal of the Linux machine/VM. (you might have to edit the path as per your need)
Hope this helps !!
  1 Comment
Minseok Jeon
Minseok Jeon on 26 Apr 2021
Hi,
I have tried using the plugin, but it looks as though there are a lot of problems with latency for co-simulating using both Gazebo and Simulink. Would the only solution be generating C++ codes from the simulink and then run them in Gazebo separately?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by