Skip to content

Handle dummy detections outside both camera FOVs when pool simulation is disabled #31

Description

@coderabbitai

Summary

DummyDetectionNode.timerCB can attempt to publish a dummy detection when simulate_pool is disabled even if the object is outside both the forward and downward camera fields of view.

In that state, neither visibility flag is set, so the selected camera frame and ROS message headers become None. This can cause tfBuffer.lookup_transform(...) to fail and violates the required header type for the pose and detection messages.

Required changes

Update the dummy-detection visibility/publish flow so that a valid camera frame and header are always used when pool constraints are ignored. A minimal approach is to select the forward camera when neither camera sees the object and simulate_pool is False; alternatively, normalize the visibility state before selecting frames and headers.

Rationale

Dummy detections should remain publishable outside camera FOV when pool simulation is disabled, without creating invalid transform lookup arguments or ROS messages with None headers.

Affected area

  • riptide_mapping/riptide_mapping2/dummydetections.py
    • DummyDetectionNode.timerCB

Acceptance criteria

  • With simulate_pool=False and an object outside both camera FOVs, the callback does not pass None to lookup_transform.
  • PoseWithCovarianceStamped.header and Detection3D.header are valid headers.
  • The resulting detection is appended and published through a deterministic camera path (for example, the forward camera).
  • Existing behavior when the object is visible to either camera remains unchanged.

Backlinks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions