# YARP Gazebo clock plugin

Hello everyone,

I would like to synchronize Simulink and Gazebo, and for that purpose I am trying to use the YARP clock plugin in combination with the WB-Toolbox for Simulink. However it seems that I cannot load it properly (from myrobot.gazebo file, also using a myrobot.xacro description), as the expected outputs do not appear. My setup includes ROS Kinetic and Gazebo 7.

Has anyone ever used this plugin successfully? Also is there any other way I might achieve synchronization ?

EDIT: Sorry for not clarifying these in the first place. This is the YARP clock plugin (https://github.com/robotology/gazebo-...) and this is the WB-Toolbox (https://github.com/robotology/WB-Toolbox), although the problem seems to originate in Gazebo. The myrobot.gazebo part where the plugin is loaded looks like this:

<gazebo>
<plugin name="gazebo_clock" filename="libgazebo_yarp_clock.so" />
</gazebo>


This is a possible source of error as I have not found a similar example so I am not sure this is exactly how the plugin should be loaded.

As for the debug process, I have loaded the plugin both from the .gazebo file and using the command line, as MSI suggests below, however the result is the same. When I use the yarp name list command, the /clock port does not appear in the list. The result is that when I run the Simulink counterpart with the simulation synchronizer block I get an error message, mentioning that the block could not connect to the simulation clock server.

edit retag close merge delete

( 2017-04-04 09:25:24 -0500 )edit

Sort by » oldest newest most voted

You can load the plugin by adding the option -s libgazebo_yarp_clock.so to the gazebo command:

gazebo -s libgazebo_yarp_clock.so myworld.world


Then you can send rpc command on the port /clock (check if the /clock port is open with the command 'yarp name list')

example commands:

getTime
stepSimulation 1000
pauseSimulation
....

more

Thanks for your reply. Unfortunately, this does not seem to work. I tried to load the plugin both from the command line, using the command you mentioned, and the .gazebo file but the result was the same. The clock port does not appear in the list, as I mention on my edited question above.

( 2017-04-05 03:42:33 -0500 )edit

try launching gazebo with the --verbose flag, and check whether it finds the plugin. Maybe you forgot to set the GAZEBO_PLUGIN_PATH environment variable.

( 2017-04-11 03:58:25 -0500 )edit