Skip to content

Commit

Permalink
FIX: bugs of GlobalEgoState (#312)
Browse files Browse the repository at this point in the history
* fix: fix bug of random scene selection and allow seed specification

* feat: get each part of obs seperately

* fix: fix bugs of GlobalEgoState
  • Loading branch information
zhengzl18 authored Dec 16, 2024
1 parent 59a2539 commit c353cb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pygpudrive/datatypes/observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, abs_self_obs_tensor: torch.Tensor):
self.pos_x = abs_self_obs_tensor[:, :, 0]
self.pos_y = abs_self_obs_tensor[:, :, 1]
self.pos_z = abs_self_obs_tensor[:, :, 2]
self.rotation_as_quaternion = abs_self_obs_tensor[:, :, 3:6]
self.rotation_as_quaternion = abs_self_obs_tensor[:, :, 3:7]
self.rotation_angle = abs_self_obs_tensor[:, :, 7]
self.goal_x = abs_self_obs_tensor[:, :, 8]
self.goal_y = abs_self_obs_tensor[:, :, 9]
Expand Down
1 change: 1 addition & 0 deletions src/sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ inline void collectAbsoluteObservationsSystem(Engine &ctx,
out.rotation.rotationFromAxis = utils::quatToYaw(rotation);
out.goal = goal;
out.vehicle_size = vehicleSize;
out.id = ctx.get<AgentID>(agent_iface.e).id;
}

void setupRestOfTasks(TaskGraphBuilder &builder, const Sim::Config &cfg,
Expand Down

0 comments on commit c353cb7

Please sign in to comment.