AnishShr / autoware_mini_practice

Practice Sessions and Labs for the Autonomous Vehicles Project (Autoware mini)
MIT License
0 stars 0 forks source link

Practice 7 - camera_traffic_light_detector - code comments #14

Closed geopimik closed 4 months ago

geopimik commented 4 months ago

Comments:

  1. I would try fetching the transform and calculate_roi_images only if there are stoplines on the local path. So, I would add that check, and most of the code in the camera_image_callback could be nested under that.
  2. tfl_status should be published continuously when there is path available. Currently this code publishes it only when it has rois / classes. classes should always be present when there are rois, so there is no point in having extra check: https://github.com/AnishShr/autoware_mini_practice/blob/d925e1e517a6656f8355264a1323ff155cd0e166/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L171
  3. TrafficLightResultArray does not have a timestamp - it should com from the image!
  4. Unnecessary https://github.com/AnishShr/autoware_mini_practice/blob/d925e1e517a6656f8355264a1323ff155cd0e166/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L160
  5. Unnecessary https://github.com/AnishShr/autoware_mini_practice/blob/d925e1e517a6656f8355264a1323ff155cd0e166/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L204-L206
AnishShr commented 4 months ago
  1. Added the check if stoplines are on path, and the rest of the code is nested inside it https://github.com/AnishShr/autoware_mini_practice/blob/a7cbcac5b73433fcb7edba7ccd85c11105b9df85/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L139

  2. removed additional checks for publishing tfl status. If there are no rois or classes, empty tfl status array is published. https://github.com/AnishShr/autoware_mini_practice/blob/a7cbcac5b73433fcb7edba7ccd85c11105b9df85/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L160-L188

  3. Added timestamp from camera img msg from the camera callback https://github.com/AnishShr/autoware_mini_practice/blob/a7cbcac5b73433fcb7edba7ccd85c11105b9df85/practice_7/nodes/detection/tfl_camera/camera_traffic_light_detector.py#L184-L186

  4. and 5. Removed unnecessary lines

git commit: https://github.com/AnishShr/autoware_mini_practice/commit/a7cbcac5b73433fcb7edba7ccd85c11105b9df85

geopimik commented 4 months ago

Mostly OK, but I would still tweak it a bit.

AnishShr commented 4 months ago

git commit: https://github.com/AnishShr/autoware_mini_practice/commit/63c0bd83447cc5c7f9022c7e9c43a01918428d0a

geopimik commented 4 months ago

ok