Publish at the time of a vector
Dears, I have a vector containing double type numbers representing the ros time that I recorded from a previous simulation. I need to publish data of a node at this given time. I try to explain better: I have the x,y,z coordinates of a point and the respective time at which this point were recorded. I need to publish these x,y,z coordinates at the exact time that I recorded to use it in other subscribers nodes. What can I use? I'm able to visualize a marker in rviz using these 3 coordinates at the time using the marker.header.timestamp but I'm not able to publish at the exact time the msg.position.x y and z, also because I normally use the sleep with ros::Rate. I don't understand if I can use a ros::Timer, or ros::Time, or using a node that publish in the /clock topic.
Thank you for yours answers.