WIP ReID added to person tracker rpublishing detections, added ivan s…#691
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ), | ||
| match_tolerance=0.0, | ||
| buffer_size=2.0, | ||
| ).pipe(ops.map(lambda pair: ImageDetections2D.from_ros_detection2d_array(*pair))) # type: ignore[misc] | ||
| ).pipe( | ||
| ops.map( | ||
| lambda pair: ( | ||
| ImageDetections2D.from_ros_detection2d_array(*pair), # type: ignore[misc] | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Return both streams when aligning detections
The new detections_stream() advertises an Observable[tuple[ImageDetections2D, Detection2DArray]], but the mapper now returns a single-element tuple (ImageDetections2D.from_ros_detection2d_array(*pair),) while ingress unpacks the data into two variables. At runtime the first emission will raise “not enough values to unpack” and unsubscribe the pipeline, so the ReID module will never publish detections or annotations. The lambda should return both the converted ImageDetections2D and the raw Detection2DArray so ingress receives the expected pair.
Useful? React with 👍 / 👎.
| for detection in imageDetections: | ||
| detection.id = self.idsystem.register_detection(detection) | ||
|
|
||
| self.enriched_detections.publish(imageDetections.to_ros_detection2d_array()) |
There was a problem hiding this comment.
Publish enriched detections with ReID IDs
Inside ingress the loop populates enriched_array with long‑term IDs, but the message that is actually published is imageDetections.to_ros_detection2d_array(). This conversion rebuilds messages from the original detections, which never had their track_id updated, so downstream consumers (e.g. the updated PersonTracker that filters on det.track_id) continue to see the short‑term tracker IDs and the new follow‑specific-person API cannot work. Publish enriched_array (or update each detection’s track_id) once per frame instead of re-registering every detection inside the loop.
Useful? React with 👍 / 👎.
43ed37e to
6caebbc
Compare
0057747 to
e40f213
Compare
5de2d8d to
c3b1c77
Compare
…tash changes