Open warp1337 opened 6 years ago
Okay confirmed. Using rospy.Time.now() fixes the problem. At least for me. @severin-lemaignan @pierriko
Who generate /clock ? Do you use /use_sim_time ? I check the code, and there is maybe some issue, but clock and sensors use the same source of infromation (parent.gettime()), so the information should be consistent (if you use simulated time generated by Morse).
When running MORSE for some time, like 1 hour (or so) I noticed that the time stamp of ROS images (e.g. video camera) differs from what the actual ROS time says.
Add a fakerobot and e.g. this snippet:
This is a little hard to reproduce since I have vision pipeline that copies headers from one message to another and then computes diverse TF transforms. However, the basis time stamp is the one of the source image generated by MORSE --- the one that drifts over time.
I also believe I have found the problem:
https://github.com/morse-simulator/morse/blob/master/src/morse/middleware/ros/abstract_ros.py#L112
If you replace that line with rospy.Time.now() everything seems to be fine again. I am currently running a longer test, but it might be a good idea to reproduce this.
Cheers, Flo