Skip to content

Commit

Permalink
improve waypoints render
Browse files Browse the repository at this point in the history
  • Loading branch information
cjy1992 committed Dec 25, 2019
1 parent 1311ac9 commit f0db54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gym_carla/envs/carla_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def _get_obs(self):
lidar[:,:,0] = np.array(lidar[:,:,0]>0, dtype=np.uint8)
lidar[:,:,1] = np.array(lidar[:,:,1]>0, dtype=np.uint8)
# Add the waypoints to lidar image
wayptimg = (birdeye[:,:,0] == 0) * (birdeye[:,:,1] == 0) * (birdeye[:,:,2] == 255)
wayptimg = (birdeye[:,:,0] <= 10) * (birdeye[:,:,1] <= 10) * (birdeye[:,:,2] >= 240)
wayptimg = np.expand_dims(wayptimg, axis=2)
wayptimg = np.fliplr(np.rot90(wayptimg, 3))
wayptimg.astype(np.uint8)
Expand Down

0 comments on commit f0db54f

Please sign in to comment.