argoverse / argoverse-api

Official GitHub repository for Argoverse dataset
https://www.argoverse.org
Other
833 stars 239 forks source link

getting yaw, pitch and roll per frame #281

Open zeina-abuaisheh opened 2 years ago

zeina-abuaisheh commented 2 years ago

I used the following code to get yaw, pitch and roll of the camera (which is the same for all of the frames):

rotation_coefficients = vehicle_SE3camera['rotation']['coefficients'] egovehicle_R_camera = quat2rotmat(rotation_coefficients) yaw, roll, pitch = Rotation.from_matrix(egovehicle_R_camera).as_euler('zyx', degrees=True)

How do I get yaw, pitch and roll per frame?

Thanks

johnwlambert commented 2 years ago

image

Please note that in the egovehicle frame, roll is about the x-axis, not y-axis. And pitch is about the y-axis, not the x-axis.

Which coordinate frame are you hoping to obtain the yaw, pitch, and roll of the camera? In the city coordinate frame? It would have to be in a global frame to be dynamic (since otherwise it is fixed to the body, and would be fixed as you mentioned).

johnwlambert commented 2 years ago

If you'd like to get the pose of a camera in the city coordinate frame, then you would want to compute

city_SE3_camera = city_SE3_egovehicle.compose(egovehicle_SE3_camera)

then you could pull out the pitch, yaw, and roll from the pose city_SE3_camera.