I want to read the joint states of a robot from the `/joint_states` topic, preferably at 1kHz. The problem is that when I increase the publishing rate X of the joint controller above 100Hz, a subscriber to `/joint_states` receives messages at X Hz for 1-2 seconds and then the rate changes. The `joint_states` topic seems to give me packets of messages in a smaller frequency.
For instance, I have 1Khz publish rate. For the first half a second I have 1 msg every 1 ms. After that half a second I receive 20 msgs together every 20ms.
I have visualized this issue with `rosbag` and it seems to be repeatable in multiple machines. Also the timing and the behaviour is exactly the same every time.
I have tried to subscribe to /joint_states topic running the Shadow's robot hand and the KUKA LWR4+ ROS packages from here: https://github.com/CentroEPiaggio/kuka-lwr either in real robots or simulated with gazebo, and the same issue is persistent, so I don't thing is something depended on the robot.
Has anyone else noticed this behaviour? It seems like a buffer is full or something locks a mutex during the real-time publishing of the joint state controller.
↧