@@ -334,11 +334,11 @@ def initialize(self):
334334 [0. , 0. , 0. , 1. ]])
335335 if self .camera_front :
336336 self .T_l2c = np .array ([
337- [ 0.001090 , - 0.999489 , - 0.031941 , 0.149698 ],
338- [ - 0.007664 , 0.031932 , - 0.999461 , - 0.397813 ],
339- [ 0.999970 , 0.001334 , - 0.007625 , - 0.691405 ],
340- [ 0. , 0. , 0. , 1.000000 ]
341- ])
337+ [ 2.89748006e-02 , - 9.99580136e-01 , 3.68439439e-05 , - 3.07300513e-02 ],
338+ [ - 9.49930618e-03 , - 3.12215512e-04 , - 9.99954834e-01 , - 3.86689354e-01 ],
339+ [ 9.99534999e-01 , 2.89731321e-02 , - 9.50437214e-03 , - 6.71425124e-01 ],
340+ [ 0.00000000e+00 , 0.00000000e+00 , 0.00000000e+00 , 1.00000000e+00 ]
341+ ])
342342 else :
343343 self .T_l2c = np .array ([[- 0.71836368 , - 0.69527204 , - 0.02346088 , 0.05718003 ],
344344 [- 0.09720448 , 0.13371206 , - 0.98624154 , - 0.1598301 ],
@@ -421,6 +421,8 @@ def update(self, vehicle: VehicleState) -> Dict[str, AgentState]:
421421 img_normal = undistorted_img
422422 results_normal = self .detector (img_normal , conf = 0.3 , classes = [0 ])
423423 combined_boxes = []
424+ if not self .enable_tracking :
425+ self .cone_counter = 0
424426 if self .orientation :
425427 img_left = cv2 .rotate (undistorted_img .copy (), cv2 .ROTATE_90_COUNTERCLOCKWISE )
426428 img_right = cv2 .rotate (undistorted_img .copy (), cv2 .ROTATE_90_CLOCKWISE )
@@ -625,7 +627,6 @@ def update(self, vehicle: VehicleState) -> Dict[str, AgentState]:
625627 f"Velocity: (vx: { agent .velocity [0 ]:.3f} , vy: { agent .velocity [1 ]:.3f} , vz: { agent .velocity [2 ]:.3f} )\n "
626628 f"type:{ agent .activity } "
627629 )
628-
629630 return self .current_agents
630631
631632 stale_ids = [agent_id for agent_id , agent in self .tracked_agents .items ()
@@ -643,8 +644,6 @@ def update(self, vehicle: VehicleState) -> Dict[str, AgentState]:
643644 f"Velocity: (vx: { agent .velocity [0 ]:.3f} , vy: { agent .velocity [1 ]:.3f} , vz: { agent .velocity [2 ]:.3f} )\n "
644645 f"type:{ agent .activity } "
645646 )
646-
647-
648647 return self .tracked_agents
649648
650649 # ----- Fake Cone Detector 2D (for Testing Purposes) -----
0 commit comments