Page 1 of 1

Publishing rate of ros topic using new ros interface

Posted: 04 Jul 2016, 23:22
by hypnosfeel
Hello,

I wonder if there is any way to control the publishing rate of the ros topic via the new ros interface?

Cheers

Re: Publishing rate of ros topic using new ros interface

Posted: 05 Jul 2016, 16:20
by coppelia
Hello,

with the new RosInterface you are fully in control of publishing a specific topic. Each time you call simExtRosInterface_publish, a new message will be sent to ROS.

Cheers

Re: Publishing rate of ros topic using new ros interface

Posted: 03 Aug 2017, 11:55
by akhil27
Hi,

I wanted to know how to increase the publishing rate. I see with 'rostopic hz' that the /image published by rosInterfaceTopicPublisherAndSubscriber.ttt is at a rate around 170 and the /sensorTrigger.... of controlTypeExamples.ttt publishes at around 55.
The reason I ask is because I want to publish the joint states of the baxter model as a sensor_msgs/JointState message and I am only getting a rate of around 16.

Thanks

Re: Publishing rate of ros topic using new ros interface

Posted: 04 Aug 2017, 15:48
by coppelia
Hello,

you are in full control of how many messages you are publishing with simExtRosInterface_publish (also make sure to increase the queue size when advertising the topic with simExtRosInterface_advertise). But it does not make sense to publish a messages more than once per simulation step, if the message content hasn't changed (which is the case almost all the time).

Cheers