Sync Joint State and Robot State Publisher
I understand that the robot_state_publisher
subscribes to the joint states topic and used the urdf to broadcast tf msgs. I recorded the joint state msgs and tf msgs for a particular session of my robot. What I found is that there are considerably less tf msgs than joint state msgs (16 to 39 to be exact). For my purpose (displaying tf frames) I need a tf msg for every joint state msg. However I cannot get this to work. I have already maxed the publish_frequency
of the robot_state_publisher
, but this doesn't change anything. I'm now convinced its because the joint state subscriber in robot_state_publisher
only has a queue of 1 (so some joint state msgs are being discarded). Sadly this queue size cannot be changed through the parameter server. Any thoughts on how I can ensure that there are tf frames for every joint state msg? Maybe subclass robot_state_publisher
?
I'm not convinced, but you could try setting
ignore_timestamp
totrue
(from wiki/robot_state_publisher: Parameters).Have also tried that, but didn't improve anything. There are still some msgs which are just never received by the rbs. I think the only way this would be possible is if msgs on the queue were discarded while rbs was processing another msg. Right?