Skip to content

Commit 502f3a8

Browse files
committed
Sending untransformed version to planning team
1 parent a936d3d commit 502f3a8

1 file changed

Lines changed: 26 additions & 15 deletions

File tree

GEMstack/onboard/perception/pedestrian_detection.py

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ def __init__(self, vehicle_interface : GEMInterface) -> None:
115115

116116
# Update function variables
117117
self.t_start = datetime.now() # Estimated start frame time
118-
self.start_pose_abs = None
118+
# self.start_pose_abs = None
119+
# self.start_pose_abs = ObjectPose(
120+
# frame=ObjectFrameEnum.GLOBAL,
121+
# t=0,
122+
# x=0,
123+
# y=0,
124+
# z=0
125+
# )
119126

120127
def init_debug(self,) -> None:
121128
# Debug Publishers
@@ -125,8 +132,10 @@ def init_debug(self,) -> None:
125132
self.pub_image = rospy.Publisher("/camera/image_detection", Image, queue_size=1)
126133

127134
def update(self, vehicle : VehicleState) -> Dict[str,AgentState]:
128-
if self.start_pose_abs is None:
129-
self.start_pose_abs = vehicle.pose
135+
# if self.start_pose_abs is None:
136+
# self.start_pose_abs = vehicle.pose # Store first pose which is start frame
137+
# self.start_pose_abs.to_frame(frame=ObjectFrameEnum.GLOBAL, current_pose=)
138+
# self.current_vehicle_pose_sf = vehicle.pose # Vehicle pose in start frame
130139
return self.current_agents
131140

132141
# TODO: Improve Algo Knn, ransac, etc.
@@ -409,20 +418,22 @@ def create_agent_states_in_start_frame(self, obj_centers: List[np.ndarray], obj_
409418
velocity=None, # Temporary
410419
yaw_rate=0
411420
)
412-
421+
413422
# Convert agent to start frame and add to agents list:
414423
agents.append(
415-
state.to_frame(
416-
frame=ObjectFrameEnum.START,
417-
current_pose=ObjectPose(
418-
frame=ObjectFrameEnum.CURRENT,
419-
t=(self.curr_time - self.t_start).total_seconds(),
420-
x=state.pose.x,
421-
y=state.pose.y,
422-
z=state.pose.z
423-
),
424-
start_pose_abs=self.start_pose_abs
425-
)
424+
state
425+
# state.to_frame(
426+
# frame=ObjectFrameEnum.START,
427+
# current_pose=self.current_vehicle_pose_sf,
428+
# # current_pose=ObjectPose(
429+
# # frame=ObjectFrameEnum.CURRENT,
430+
# # t=(self.curr_time - self.t_start).total_seconds(),
431+
# # x=state.pose.x,
432+
# # y=state.pose.y,
433+
# # z=state.pose.z
434+
# # ),
435+
# start_pose_abs=self.start_pose_abs
436+
# )
426437
)
427438

428439
# Return the agent states converted to start frame:

0 commit comments

Comments
 (0)