ROS - hz rates

Typically: "How do I... ", "How can I... " questions
Post Reply
FieteBotschen

ROS - hz rates

Post by FieteBotschen »

Hi all,

this is my first topic in this forum. I used the search function, however, if I missed a helpful yet existing topic I apologize.

I have a few questions regarding the ROS features of V-REP.

#1 Hz - Rate of published data
What is the default Hz - rate with which published data, e.g. geometry_msgs::poseStamped or sensor_msgs::Image is beiing send?

#2 customization of Hz - rate
Is it possible to change the Hz rate of published data?

#3 Hz rate of received data
When I subscribe in V-REP to a ROS topic being send at 1000hz, will V-REP receive this data at 1000 hz or is there a default receiving rate? Is the maximum receiving rate changeable?

Thanks in advance for your time and a nice weekend,

Best, Fiete

coppelia
Site Admin
Posts: 7936
Joined: 14 Dec 2012, 00:25

Re: ROS - hz rates

Post by coppelia »

Hello FieteBotschen,

What basically happens is that data is processed just before the main script is called, i.e. at each simulation pass. The number of simulation passes per second depend on various factors (e.g. number of skipped rendering frames, real-time or non-real-time simulation, etc.).
In the ROS plugin for V-REP, refer to routine:

"ROS_server::mainScriptAboutToBeCalled()"

in the file "ROS_server.cpp".

You can influence the rate at which data is processed/published/applied by adjusting the "simulation real-time flag", the simulation time step, or the number of simulation passes for a rendering frame. That parameters are adjusted in the simulation settings dialog.

And of course, you could always modify and recompile the source code for the ROS plugin.

Also, when setting up a V-REP subscriber/publisher, you can specify the desired queue sizes, if you don't want to lose any information. At each simulation pass, a queue will be entirely processed

Cheers

Post Reply