Gazebo co-simulation plugin forGazebo 11.x version

I get this error during CMake. There is a way to solve? I would to use ROS Noetic and Gazebo to communicate with Simulink.
Make Error at CMakeLists.txt:53 (message):
The installed version of Gazebo is not supported for Gazebo Co-Simulation
Plugin generation.
The Gazebo Co-Simulation Plugin supports,
minimum Gazebo version: gazebo 9.x series
maximum Gazebo version: gazebo 10.x series
-- Configuring incomplete, errors occurred!

Answers (3)

Hi Giulio,
The Gazebo Co-Sim Plugin support earlier to R2022a is limited to Gazebo 9 and 10 version.
We have added Gazebo 11 version support from MATLAB R2022a.
So, if you have pre-release of MATLAB R2022a then you can use Gazebo Co-Sim Plugin with Gazebo 11 version.
Thanks.

2 Comments

HI Gaurav,
I have installed the pre-release version of Matlab R2022a. However, the following error keeps on showing up.
Hi @Jacob Jordan Catania, I had the same issue. As it turned out, the problem was writing the port number as "11311". If you check the last lines of "multiSensorPluginTest.world" file, you should see the correct port number, which is probably "14581".
<plugin name="GazeboPlugin" filename="lib/libGazeboCoSimPlugin.so"><portNumber>14581</portNumber></plugin>

Sign in to comment.

Hi Giulio,
As per error description, you need to re-install Gazebo Plugin.
Basically, we have done changes in plugin for R2022a. So, the older plugin will not work. You need to perform manual Gazebo plugin installation steps as,
You can find same details in example
Thanks.
With Regards,
Gaurav Bhosale

8 Comments

I have installed the recent plugin. However, the error still keeps on showing up and is considering the Matlab R2022a pre-realease as a plugin for Matlab R2021b. (The error as before is still being shown)
So, you created plugin with R2022a and installed ?
Further, you are running .world file from same location and running MATLAB R2022a ?
Can you check, your .world file is launching newer or older version plugin libGazeboCoSimPlugin.so library ?
How do I check which plugin version of libGazeboCoSimPlugin is being launched?
There is no direct way to check plugin version. You can open new ternimal and follow this,
Launch Gazebo Simulation Environment
Open a terminal in the VM or your own Linux operating system, run the following commands to launch the Gazebo simulator.
cd /home/user/src/GazeboPlugin/export
export SVGA_VGPU10=0
gazebo ../world/multiSensorPluginTest.world --verbose
The /home/user/src/GazeboPlugin/export should be your 22a plugin folder.
Further, if you are adding export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/home/user/src/GazeboPlugin/export in bash script or terminal, make sure /home/user/src/GazeboPlugin/export path is of 22a plugin.
I have done the said procedure. However, when running Matlab R2022a (pre-release), the Matlab command window is still indicating that the Matlab version is "MATLAB version R2021b". Why is this occurring and how do I change it?
I am not sure if it makes a difference but note that I am running a different Gazebo file than the one mentioned, which is an ABB robot. The command is given as the following:
export ROS_HOSTNAME=localhost
export ROS_IP=192.168.25.112
export ROS_MASTER_URI=http://localhost:11311
roslaunch abb_irb120_gazebo irb120_3_58_gazebo.launch
Thanks,
Jacob
This error occurs if .world launces older version plugin. The error message contains "MATLAB version R2021b", this is due to we had major update in R2021b.
Now, in your case, you are using MATLAB R2022a and installed latest plugin from R2022a but somehow, your older plugin ( plugin installed for R2021a or before version) is loaded with the .world file. Can you showcase, how you added plugin details in .world file?
Sorry but I am not sure what I need to show and which files I should open or run a command if possible to show exactly what is required to be shown.
Hi,
I have run into exactly the same problem with Matlab R2022a for linux.
I have gone through every step in Perform Co-Simulation between Simulink and Gazebo, but I still got the error saying the plugin is for R2021b.
Also I went through some files in the GazeboPlugin folder, and I found that line 10 in file /GazeboPlugin/msgproto/mw.internal.robotics.gazebotransport.CoSimMsgs.proto says: "required string version = 1 [default = "R2021b"];".
I am not sure whether this is related to the error, but I tried to change "R2021b" to "R2022a" and it still didn't solve the problem.

Sign in to comment.

Hi there,
I have solve the issue. You can first download the plugin by running command packageGazeboPlugin in R2022a. The plugin downloaded by this command is for R2021b but it's compatible with Gazebo 11.xx. Then you can use R2021b to run Gazebo pacer and run the plugin in Gazebo.
Hope it helps you.

Products

Release

R2021a

Asked:

on 11 Feb 2022

Commented:

on 16 Aug 2022

Community Treasure Hunt

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

Start Hunting!