waymo-open-dataset icon indicating copy to clipboard operation
waymo-open-dataset copied to clipboard

Cameras world coordinates computation at middle of exposition time.

Open pierremerriaux-leddartech opened this issue 1 year ago • 1 comments

Hi, it is more a question than an issue. I am quite stuck with velocities and skew matrix to compute cameras poses in world referential at specific timestamp. Camera pose is provided at pose_timestamp. I would like to extrapolate it for a specific timestamps, the middle of exposition/acquisition time: delta_time = (CamComp.rolling_shutter_params.camera_readout_done_time + CamComp.rolling_shutter_params.camera_trigger_time)/2 - CamComp.pose_timestamp

And then I updated pose camera thanks to delta_timeand velocity in world coordinate, thanks to line 76 comment

avx,avy,avz = CamComp.velocity.angular_velocity.x,CamComp.velocity.angular_velocity.y,CamComp.velocity.angular_velocity.z
skm = np.array([[0,-avz,avy],
                [avz,0,-avx],
                [-avy,avx,0]])
r_image = tr_image[:3,:3]
r_updated = (np.eye(3) + delta_time * skm) @ r_image 

t_updated = tr_image[:3,3] + delta_time * np.array([CamComp.velocity.linear_velocity.x, CamComp.velocity.linear_velocity.y, CamComp.velocity.linear_velocity.z]) 
tr_updated = np.eye(4)
tr_updated[:3,3] = t_updated
tr_updated[:3,:3] = r_updated

Of course I need also camera calibration to get camera to world. But is the code above is correct ? Or I missed something with arm level or others ? Because I checked it by replacing delta_time by frame duration, and compare tr_updated(t) with tr_image(t+1) (next frame), and they are not similar. (could be tens meters of errors). Is 100ms extrapolation to long or my code is wrong. thanks

Hi @pierremerriaux-leddartech, did you eventuelly figure that out?

nlgranger avatar Jun 07 '24 12:06 nlgranger