Integer to Ros::time
Hi!
I have a txt file with encoderdata and timestamps. I am reading from this file and want to put this timestamps in variables declared as Ros::time, but I cant manage to get this right. Is it possible to do this? The timestamp is coming from a msg like this.
ros::Time current_time_encoder;
current_time_encoder = msg->angle_timestamp1;
The essential question here is: What does the int mean?
What do you mean?
What does a time stamp of "5" mean for you? You'll have to convert this correctly. Check @Martin Günther s answer for reasonable guesses.
Right. I (perhaps incorrectly) assumed that it's seconds/milliseconds/... since 1970-01-01 00:00. If not, you need to add/subtract an offset.