Skip to content
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

Problems with timestamps #18

Open
zymouse opened this issue Apr 25, 2024 · 4 comments
Open

Problems with timestamps #18

zymouse opened this issue Apr 25, 2024 · 4 comments

Comments

@zymouse
Copy link

zymouse commented Apr 25, 2024

I'm testing on orin, can you tell me why?

cat: /sys/devices/system/clocksource/clocksource0/offset_ns: No such file or directory

Thank you very much 🙏

@knzo25
Copy link

knzo25 commented Apr 25, 2024

@manato
do you have any idea?

@zymouse
Copy link
Author

zymouse commented Apr 26, 2024

I'm very sorry that I didn't describe it well.

Problem Description:

When I use use_v4l2_buffer_timestamps_=true, the fetched buf_stamp time timestamp and the system timestamp (CLOCK_REALTIME) always differ by a fixed value.

image

I suspect it's because I can't find this file(/sys/devices/system/clocksource/clocksource0/offset_ns)
image

My purpose.

I'm doing camera time synchronization and triggering, and I feel like it would make more sense to use use_v4l2_buffer_timestamps_=true for timestamps!

@zymouse
Copy link
Author

zymouse commented Apr 26, 2024

How do the camera and LIDAR collect data at the same time after time synchronization?
The camera can send one frame of PPS signal and acquire one frame of image. Use this to synchronize multiple cameras.
What method do you guys use to make the camera and lidar synchronized for acquisition.

image
What does buf.timestamp have to do with the timestamp when the camera captures a frame?
I'm not sure how the buf.timestamp timestamp relates to the exposure timestamp of the camera.?
image

Very much looking forward to your reply, it will help me a lot. These questions have been bothering me for a long time

@manato
Copy link
Collaborator

manato commented Apr 26, 2024

@knzo25
Thank you for reminding me.

@zymouse
Regarding /sys/devices/system/clocksource/clocksource0/offset_ns, it looks to depend on the jetpack version because some orin-based ECUs of our side have the file but some don't.
The content of the file is used to correct timestamp values based on v4l2-buffer time into the system clock time. This is the first time that we meet the issue, so we don't have concrete solutions so far (we appreciate your sharing the issue). If you have a fixed value of the difference between v4l2 and system timestamp and would like to set v4l2 timestamp to the same scale of the system time, using timestamp_offset parameter would be a temporal solution.

In terms of synchronization, we often use LiDARs which support PTP synchronization. Once LiDARs synchronize to the ECU and are configured properly, we can calculate when the LiDARs scan the camera direction. By sending shutter trigger signals based on the calculation result, LiDARs and cameras scan the same field temporarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants