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

Dimensions and position of local maps #925

Closed
AndreSchakkal opened this issue May 25, 2023 · 3 comments
Closed

Dimensions and position of local maps #925

AndreSchakkal opened this issue May 25, 2023 · 3 comments

Comments

@AndreSchakkal
Copy link

Hello,

I'm currently working on adapting your dataset to the task of pedestrian trajectory prediction and it's working pretty well. However, I have a small question: Is there a way to get the dimensions and position (in meters) of the locally generated bird's eye view map (shown in the figure).
I'm asking you this because I need these values to be able to transform the pedestrians' coordinates from meters (in the global frame) to pixels (in the local frame). If retrieving these values is not possible, is there a way to find the coordinates of the pedestrians in the local map's reference?

Thank you for your help.
Screenshot 2023-05-25 193902

@whyekit-motional
Copy link
Collaborator

@AndreSchakkal there's a method to_pixel_coords which you could check out to get inspiration from

@AndreSchakkal
Copy link
Author

Thank you for your answer.
I'm now able to get the coordinates (more or less), however I think there's some rotation that's missing in my code. Do you happen to know what's missing?
download (2)

@whyekit-motional
Copy link
Collaborator

You could check if you have performed a rotation of the map (as part of the transformation to the ego frame), like what is done here:

ypr_rad = Quaternion(pose['rotation']).yaw_pitch_roll
yaw_deg = -math.degrees(ypr_rad[0])
rotated_cropped = np.array(Image.fromarray(cropped).rotate(yaw_deg))

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

No branches or pull requests

2 participants