Open geiliwanghaichao opened 4 years ago
In fact, the system has no way to obtain the time of shooting this frame. Just as you take a picture with a mobile phone, the displayed system time is the time of the current picture. The system obtains the time through the usb driver, and the driver runs on the operating system.
Here are some ways to synchronize the camera
Buy baidu's sensorbox then you can get shooting time.
apollo.sh config
if onmaster
branch:In the apollo5.0 code, when the USB camera gets a frame of data, I see this description (modules/drives/camera/usb_cam.cc): len = buf.bytesused; raw_image->tv_sec = static_cast(buf.timestamp.tv_sec);
raw_image->tv_usec = static_cast(buf.timestamp.tv_usec);
As far as I know, this time is the elapsed time from when the system is started to when the data frame is received. This time is not a unix timestamp. In the apollo architecture, there are many sensors. To ensure that the time of these sensors is synchronized, each sensor must have a unified time stamp. How does the camera do this, or how to get the time stamp of one frame of camera data. Thank you very much!