mmwave icon indicating copy to clipboard operation
mmwave copied to clipboard

absolute millisecond timestamps

Open StZhang-B opened this issue 11 months ago • 3 comments

Thank you for sharing code.

Can this code get absolute millisecond timestamps? As far as I know, the idx.bin file saved by mmwave studio can only obtain relative timestamps, not absolute timestamps, cause it starts timing when the radar is powered on, but we have no way of knowing the exact time when the radar is powered on and started.

Thank you!

StZhang-B avatar Jan 14 '25 12:01 StZhang-B

Hi @StZhang-B ! The current version cannot get the recording with absolute and exact timestamps. The time of the DSP board can be configured before the recording and used as a reference. But it would be automatically reset after power cycle. I think, some custom solution (new firmware for the DSP for instance) would be needed to support absolute timestamps

azinke avatar Feb 03 '25 18:02 azinke

Thank you for sharing code.

Can this code get absolute millisecond timestamps? As far as I know, the idx.bin file saved by mmwave studio can only obtain relative timestamps, not absolute timestamps, cause it starts timing when the radar is powered on, but we have no way of knowing the exact time when the radar is powered on and started.

Thank you!

Hello, have you solved your problem? I tried to use pyserial to communicate with the onboard Linux to align the time. I think the key question still remains: what are the timestamps in idx.bin based on? I found that the timestamps in cat /proc/uptime and idx.bin were the closest, but they were still off by about 5 seconds.

def check_diff_time(ser=None):
    while True: 
        try: 
            ser.reset_input_buffer()
            ser.write('cat /proc/uptime\n'.encode('utf-8'))
            linux_time = ser.readline().decode('utf-8').split(' ')[0]
            linux_time = float(linux_time) * 1e3 # ms
            sys_time = int(time.time() * 1e3) # ms
            diff_time = sys_time - linux_time
            return diff_time
        except Exception as e:
            pass

luckyyf0517 avatar Mar 06 '25 13:03 luckyyf0517

Thank you for sharing code. Can this code get absolute millisecond timestamps? As far as I know, the idx.bin file saved by mmwave studio can only obtain relative timestamps, not absolute timestamps, cause it starts timing when the radar is powered on, but we have no way of knowing the exact time when the radar is powered on and started. Thank you!

Hello, have you solved your problem? I tried to use pyserial to communicate with the onboard Linux to align the time. I think the key question still remains: what are the timestamps in idx.bin based on? I found that the timestamps in cat /proc/uptime and idx.bin were the closest, but they were still off by about 5 seconds.

def check_diff_time(ser=None): while True: try: ser.reset_input_buffer() ser.write('cat /proc/uptime\n'.encode('utf-8')) linux_time = ser.readline().decode('utf-8').split(' ')[0] linux_time = float(linux_time) * 1e3 # ms sys_time = int(time.time() * 1e3) # ms diff_time = sys_time - linux_time return diff_time except Exception as e: pass

I finally decided to manually align it, and haven't found a solution yet. I'm rather curious how those large publicly available multimodal datasets using TI's millimeter wave radar solved the problem, maybe you can ask them about it.

StZhang-B avatar Mar 06 '25 13:03 StZhang-B