Skip to content

Commit

Permalink
fix spell
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin committed Oct 30, 2023
1 parent e99b4f0 commit 358d992
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .cspell-partial.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"perception/bytetrack/lib/**"
],
"ignoreRegExpList": [],
"words": ["dltype", "tvmgen"]
"words": ["dltype", "tvmgen", "quantizer", "imageio", "mimsave"]

Check warning on line 8 in .cspell-partial.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (dltype)

Check warning on line 8 in .cspell-partial.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (tvmgen)

Check warning on line 8 in .cspell-partial.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (quantizer)

Check warning on line 8 in .cspell-partial.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (imageio)

Check warning on line 8 in .cspell-partial.json

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (mimsave)
}
20 changes: 10 additions & 10 deletions planning/behavior_velocity_intersection_module/scripts/ttc.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(self, args):
)
self.ego_ttc_data = None
self.object_ttc_data = None
self.npcs = []
self.npc_vehicles = []
self.args = args
self.images = []
self.last_sub = time.time()
Expand All @@ -100,7 +100,7 @@ def __init__(self, args):
self.ttc_vel_ax = self.ttc_ax.twinx()
self.world_ax = self.fig.add_subplot(1, 2, 2)
self.lock = Lock()
self.colorlist = [
self.color_list = [
"#e41a1c",
"#377eb8",
"#4daf4a",
Expand All @@ -127,7 +127,7 @@ def plot_ttc(self):
time_dist_plot = self.ttc_ax.plot(ego_ttc_time, ego_ttc_dist, label="time-dist", c="orange")
self.ttc_ax.set_xlim(min(ego_ttc_time) - 2.0, max(ego_ttc_time) + 3.0)
self.ttc_ax.set_ylim(min(ego_ttc_dist) - 2.0, max(ego_ttc_dist) + 3.0)
for npc, color in zip(self.npcs, cycle(self.colorlist)):
for npc, color in zip(self.npc_vehicles, cycle(self.color_list)):
t0, t1 = npc.collision_start_time, npc.collision_end_time
d0, d1 = npc.collision_start_dist, npc.collision_end_dist
self.ttc_ax.fill(
Expand Down Expand Up @@ -186,7 +186,7 @@ def plot_world(self):
head_length=0.1,
)

for npc, color in zip(self.npcs, cycle(self.colorlist)):
for npc, color in zip(self.npc_vehicles, cycle(self.color_list)):
x, y, th, w, h = npc.x, npc.y, npc.th, npc.width, npc.height
bbox = np.array(
[
Expand Down Expand Up @@ -245,18 +245,18 @@ def on_ego_ttc(self, msg):
self.ego_ttc_data = msg
self.last_sub = time.time()

def parse_npcs(self):
self.npcs = []
n_npcs = int(self.object_ttc_data.layout.dim[0].size)
def parse_npc_vehicles(self):
self.npc_vehicles = []
n_npc_vehicles = int(self.object_ttc_data.layout.dim[0].size)
npc_data_size = int(self.object_ttc_data.layout.dim[1].size)
for i in range(0, n_npcs):
for i in range(0, n_npc_vehicles):
data = self.object_ttc_data.data[i * npc_data_size : (i + 1) * npc_data_size]
self.npcs.append(NPC(data))
self.npc_vehicles.append(NPC(data))

def on_object_ttc(self, msg):
with self.lock:
self.object_ttc_data = msg
self.parse_npcs()
self.parse_npc_vehicles()
self.last_sub = time.time()


Expand Down

0 comments on commit 358d992

Please sign in to comment.