Skip to content

Commit

Permalink
small fix on raster map querying for scene-centric data batch
Browse files Browse the repository at this point in the history
  • Loading branch information
AIasd committed Mar 15, 2023
1 parent 21b9ac2 commit 4eafe21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/trajdata/data_structures/batch_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ def get_agents_map_patch(
offset_xy,
heading[i],
return_rgb,
rot_pad_factor=sqrt(2),
no_map_val=no_map_fill_val,
)
map_patches.append(
Expand Down
2 changes: 1 addition & 1 deletion src/trajdata/utils/state_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def transform_from_frame(
attributes = state._format_dict.keys()

frame_heading = frame_state.heading[..., 0]
if rot_mat is not None:
if rot_mat is None:
rot_mat = rotation_matrix(frame_heading)

if "x" in attributes and "y" in attributes:
Expand Down

0 comments on commit 4eafe21

Please sign in to comment.