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

Are the heading values of tracks in waymo motion dataset already normalized? #854

Open
yanggao0118 opened this issue Jun 28, 2024 · 1 comment

Comments

@yanggao0118
Copy link

When using the waymo motion dataset, i noticed that some tracks have heading values even greater than 2pi. In the string docs it has mentioned heading should be normalized to [-pi, pi].

Below is the code snippet i used to read the data. I would greatly appreciate it if you could help me identify where the issue might be.

        scenario = scenario_pb2.Scenario()
        scenario.ParseFromString(bytearray(data.numpy()))

        scenario_id = scenario.scenario_id
        ego_id = scenario.sdc_track_index
        
        ego_track = scenario.tracks[ego_id]

        for step in range(len(scenario.timestamps_seconds)):
            ego_state = ego_track.states[step]
            if not ego_state.valid:
                continue

            ego_position = [ego_state.center_x, ego_state.center_y, ego_state.center_z]
            ego_heading = ego_state.heading
            ego_velocity = [ego_state.velocity_x, ego_state.velocity_y, 0]

            for track in scenario.tracks:
                if track.id == ego_track.id:
                    continue 

                object_state = track.states[step]
                heading = object_state.heading
@scott-ettinger
Copy link
Collaborator

Thanks for bringing this up. The comment is incorrect in the code. The headings are not necessarily normalized. We will fix the comment.

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

No branches or pull requests

2 participants