Skip to content

Commit

Permalink
Merge branch 'main' into mujoco
Browse files Browse the repository at this point in the history
  • Loading branch information
amacati committed Jan 30, 2025
2 parents 4bd48da + 082d951 commit b371579
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lsy_drone_racing/envs/drone_racing_deploy_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,11 @@ def obs(self) -> dict:
gates_pos[self.gates_visited] = real_gates_pos[self.gates_visited]
gates_rpy[self.gates_visited] = real_gates_rpy[self.gates_visited]
obs["gates_visited"] = self.gates_visited
print(f"gates visited: {self.gates_visited}")

in_range = np.linalg.norm(real_obstacles_pos[:, :2] - drone_pos[:2], axis=1) < sensor_range
self.obstacles_visited = np.logical_or(self.obstacles_visited, in_range)
obstacles_pos[self.obstacles_visited] = real_obstacles_pos[self.obstacles_visited]
obs["obstacles_visited"] = self.obstacles_visited
print(f"obs visited: {self.obstacles_visited}")

obs["gates_pos"] = gates_pos.astype(np.float32)
obs["gates_rpy"] = gates_rpy.astype(np.float32)
Expand Down

0 comments on commit b371579

Please sign in to comment.