I want to control a robotic manipulator using co-simulation between Simulink and Gazebo. I created a Gazebo plugin package by running the packageGazeboPlugin command in Matlab and then compiled it in the user/home directory. I copied libGazeboCoSimPlugin.so file in the manipulator package (catkin_ws/devel/lib) then created a plugin file and included this file to the model .xacro file :
plugin file :
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Simulink Gazebo Plugin -->
<xacro:macro name="GazeboPlugin">
<gazebo>
<plugin name="GazeboPlugin" filename="libGazeboCoSimPlugin.so"><portNumber>14581</portNumber>
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<bodyName>base_link</bodyName>
<frameId>$(arg base_link_frame)</frameId>
</plugin>
</gazebo>
</xacro:macro>
</robot> ```
but when I use the Gazebo pacer block to test if Gazebo has synchronized or not, I receive "failed to connect to Gazebo plugin".
Do you have any idea what is the problem?