-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMU Timestamps 50 years ahead #1454
Comments
Hi @iamsavva I used a convert seconds to years tool and converted the timestamp value 1602971435 from your image above. It provided a result of 50.8 years, so I can see how you arrived at your figure. I ran thorough tests with a D435i and got similar timestamp results from the metadata. I think that where the confusion may be occurring is that the timestamp is in milliseconds and not seconds. So a timestamp of 1602971435 (milliseconds) converts to 0.05 years or 18 days. In my tests, stopping the IMU stream and restarting it reset the frame number to zero but the timestamp continued incrementing from roughly where it left off when the previous streaming session was closed. This occurred absolutely consistently in every test. For example, the first test resulted in a timestamp that equated to 1 minute. Timestamps returned from subsequent tests incremented this time, so that by the time of the 4th test the timestamp value at the very start of the streaming session converted to 4 minutes. |
My guess is no metadata is available for the IMU frames. Therefor it transmits system time for the IMU where the other frames have hardware timestamps. |
Hi Marty, I think this is wrong and the 1602971435 is in fact in seconds - because if I plug the number into the the epoch converter, I get exactly the date and time that I was running the tests. And the 18 days number doesn't make much sense to me. So I did find the source of the problem and the solution. If I plug the camera and This solution works for me, but it feels like a hack, plus the initial_reset is pretty slow. Would appreciate a fix:) |
Timestamps are expressed in milliseconds when retrieved by get_timestamp(): 18 days would have made sense in the context of a camera that does not reset the timestamp after the stream is closed and continues accumulating during multiple camera sessions over a long period of time. The comment linked below though validates your point about a relationship to epoch: IntelRealSense/librealsense#4525 (comment) I'm pleased that you found a method that works for you! |
Hi, I am having this exact same issue. However, @iamsavva's solution of adding initial_reset:=true does not work for me. Would appreciate any help in resolving this issue. Thanks! EDIT: I added /camera/motion_module/global_time_enabled: false to my launch file and the timestamp is back to normal |
Thanks very much @JNimkar for sharing what worked for you (above) with the RealSense ROS community - great to hear that you found a solution! |
Hi,
I am using d435i camera on a TX2. d435i is runing on firmware 5.12.7.100. I installed
realsense2_camera
viaapt-get install
. I am running the following roslaunch statement:roslaunch realsense2_camera rs_camera.launch enable_infra1:=true enable_infra2:=true infra_fps:=15 enable_gyro:=true enable_accel:=true unite_imu_method:=linear_interpolation enable_sync:=true
i noticed that imu timestamps have a very wrong header. I attached a screenshot. From left to right you can see the outputs when I echo /camera/imu/header, /camera/infra1/image_rect_raw/header, /camera/infra2/image_rect_raw/header.
What is wrong with the timestamps? I tried every combination of launch file settings possible, the timestamps are always off 50 years ahead.
The text was updated successfully, but these errors were encountered: