Skip to content

Commit

Permalink
Merge pull request #4052 from zimmy87/YingkaiFu/master
Browse files Browse the repository at this point in the history
Fix the consistency and order of H and W
  • Loading branch information
zimmy87 authored Oct 1, 2021
2 parents 8865fb0 + 24d3441 commit 2b01754
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions PythonClient/eventcamera_sim/event_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def esim(

current_time = last_time
for i in range(spike_nums):
output_events[count].x = x // n_pix_row
output_events[count].y = x % n_pix_row
output_events[count].x = x % n_pix_row
output_events[count].y = x // n_pix_row
output_events[count].timestamp = np.round(current_time * 1e-6, 6)
output_events[count].polarity = 1 if pol > 0 else -1

Expand All @@ -82,7 +82,7 @@ def esim(


class EventSimulator:
def __init__(self, H, W, first_image=None, first_time=None, config=CONFIG):
def __init__(self, W, H, first_image=None, first_time=None, config=CONFIG):
self.H = H
self.W = W
self.config = config
Expand Down
2 changes: 1 addition & 1 deletion PythonClient/eventcamera_sim/test_event_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
class AirSimEventGen:
def __init__(self, W, H, save=False, debug=False):
self.ev_sim = EventSimulator(W, H)
self.W = W
self.H = H
self.W = W

self.image_request = airsim.ImageRequest(
"0", airsim.ImageType.Scene, False, False
Expand Down

0 comments on commit 2b01754

Please sign in to comment.