Skip to content

Commit

Permalink
fix(planning_debug_tools): disable traffic light msg in perception re…
Browse files Browse the repository at this point in the history
…play (autowarefoundation#4887)

Signed-off-by: Maxime CLEMENT <[email protected]>
  • Loading branch information
maxime-clem authored Sep 6, 2023
1 parent e9aacc3 commit b1e6fcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def on_timer(self):
# extract message by the timestamp
msgs = copy.deepcopy(self.find_topics_by_timestamp(self.bag_timestamp))
objects_msg = msgs[0]
traffic_signals_msg = msgs[1]
# traffic_signals_msg = msgs[1]

# objects
if objects_msg:
Expand All @@ -92,13 +92,13 @@ def on_timer(self):
self.objects_pub.publish(objects_msg)

# traffic signals
if traffic_signals_msg:
traffic_signals_msg.header.stamp = timestamp
self.traffic_signals_pub.publish(traffic_signals_msg)
self.prev_traffic_signals_msg = traffic_signals_msg
elif self.prev_traffic_signals_msg:
self.prev_traffic_signals_msg.header.stamp = timestamp
self.traffic_signals_pub.publish(self.prev_traffic_signals_msg)
# if traffic_signals_msg:
# traffic_signals_msg.header.stamp = timestamp
# self.traffic_signals_pub.publish(traffic_signals_msg)
# self.prev_traffic_signals_msg = traffic_signals_msg
# elif self.prev_traffic_signals_msg:
# self.prev_traffic_signals_msg.header.stamp = timestamp
# self.traffic_signals_pub.publish(self.prev_traffic_signals_msg)

def onPushed(self, event):
if self.widget.button.isChecked():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def on_timer(self):
# extract message by the nearest ego odom timestamp
msgs = copy.deepcopy(self.find_topics_by_timestamp(pose_timestamp))
objects_msg = msgs[0]
traffic_signals_msg = msgs[1]
# traffic_signals_msg = msgs[1]

# objects
if objects_msg:
Expand All @@ -66,13 +66,13 @@ def on_timer(self):
self.objects_pub.publish(objects_msg)

# traffic signals
if traffic_signals_msg:
traffic_signals_msg.header.stamp = timestamp
self.traffic_signals_pub.publish(traffic_signals_msg)
self.prev_traffic_signals_msg = traffic_signals_msg
elif self.prev_traffic_signals_msg:
self.prev_traffic_signals_msg.header.stamp = timestamp
self.traffic_signals_pub.publish(self.prev_traffic_signals_msg)
# if traffic_signals_msg:
# traffic_signals_msg.header.stamp = timestamp
# self.traffic_signals_pub.publish(traffic_signals_msg)
# self.prev_traffic_signals_msg = traffic_signals_msg
# elif self.prev_traffic_signals_msg:
# self.prev_traffic_signals_msg.header.stamp = timestamp
# self.traffic_signals_pub.publish(self.prev_traffic_signals_msg)

def find_nearest_ego_odom_by_observation(self, ego_pose):
if self.ego_pose_idx:
Expand Down

0 comments on commit b1e6fcf

Please sign in to comment.