Skip to content

Commit

Permalink
fix ci err.
Browse files Browse the repository at this point in the history
Signed-off-by: temkei.kem <[email protected]>
  • Loading branch information
xtk8532704 committed Jun 11, 2024
1 parent 0f006c6 commit c58d4c3
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@


class PerceptionReproducer(PerceptionReplayerCommon):
"""
PerceptionReproducer is used reproduces perception topic data from rosbag, specifically optimized for use with simulators.
"""

def __init__(self, args):
self.rosbag_ego_odom_search_radius = (
args.search_radius
Expand All @@ -49,7 +45,7 @@ def __init__(self, args):

self.reproduce_sequence_indices = deque() # contains ego_odom_idx
self.cool_down_indices = deque() # contains ego_odom_idx
self.ego_odom_id2last_published_timestamp = dict() # for checking last published timestamp.
self.ego_odom_id2last_published_timestamp = {} # for checking last published timestamp.

self.prev_ego_pos = None
self.prev_ego_odom_msg = None
Expand Down Expand Up @@ -234,13 +230,7 @@ def find_nearest_ego_odom_index(self, ego_pose):
nearest_idx = np.argmin(dists_squared)
return nearest_idx

def find_nearby_ego_odom_indies(self, ego_poses, search_radius: float):
"""
Find the indices of the ego odom that are within a certain distance of any ego_pose in the list.
Inputs:
ego_poses: the list of ego poses to search around.
search_radius: the radius to search around the ego_poses.
"""
def find_nearby_ego_odom_indies(self, ego_poses: list, search_radius: float):
ego_poses_np = np.array([[pose.position.x, pose.position.y] for pose in ego_poses])
dists_squared = np.sum(
(self.rosbag_ego_odom_data_numpy[:, None] - ego_poses_np) ** 2, axis=2
Expand Down

0 comments on commit c58d4c3

Please sign in to comment.