Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ logs/
.vscode

COLCON_IGNORE

.DS_Store
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

13 changes: 13 additions & 0 deletions riptide_mapping/config/binary_classifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**:
ros__parameters:
binary_classifier:
buffer_size: 500 # max detections held in the rolling buffer used for clustering
buffer_ttl_sec: 8.0 # detections older than this are dropped, so a target we've left behind stops contributing
min_cluster_detections: 6 # how many nearby detections it takes to lock an instance
cluster_radius_m: 0.15 # neighbors within this radius count as the same cluster when finding an instance
assignment_gate_m: 0.20 # once an instance is locked, a new detection farther than this from its centroid is rejected as not belonging to it
exclusion_radius_m: 0.30 # while hunting for the second instance, detections within this radius of the first are thrown out so the first can't bleed into the second
min_instance_separation_m: 0.40 # a candidate second instance must be at least this far from the first to be accepted
max_cluster_variance_m2: 0.02 # reject a cluster whose spread exceeds this. 0 disables the check
centroid_ema_alpha: 0.15 # Exponential Moving Average (EMA) rate for a locked centroid chasing new detections. lower = steadier & slower, higher = faster & noisier
use_3d_distance: false # cluster/measure distance in 3D (x,y,z) vs 2D (x,y). Keep False for top-down flat targets where z is the noisy axis
163 changes: 131 additions & 32 deletions riptide_mapping/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
y: 0.0
z: -0.8
yaw: 0.0
gate_shark:
gate_rescue:
parent: gate_frame
covar:
x: 1.0
Expand All @@ -49,7 +49,7 @@
y: 0.5
z: 0.0
yaw: 180.0
gate_saw:
gate_repair:
parent: gate_frame
covar:
x: 1.0
Expand All @@ -63,6 +63,7 @@
yaw: 180.0
slalom_parent:
parent: map
lock_orientation_to_config: true
covar:
x: 1.0
y: 1.0
Expand All @@ -75,6 +76,7 @@
yaw: 180.0
slalom_front:
parent: slalom_parent_frame
lock_orientation_to_config: true
covar:
x: 1.0
y: 1.0
Expand All @@ -87,6 +89,7 @@
yaw: 0.0
slalom_middle:
parent: slalom_parent_frame
lock_orientation_to_config: true
covar:
x: 1.0
y: 1.0
Expand All @@ -99,6 +102,7 @@
yaw: 0.0
slalom_back:
parent: slalom_parent_frame
lock_orientation_to_config: true
covar:
x: 1.0
y: 1.0
Expand All @@ -121,7 +125,7 @@
y: 4.0
z: -3.0
yaw: 180.0
torpedo_shark_hole:
fire_hole_large:
parent: torpedo_frame
covar:
x: 0.5
Expand All @@ -133,7 +137,7 @@
y: -0.029972
z: 0.217424
yaw: 0.0
torpedo_sawfish_hole:
fire_hole_small:
parent: torpedo_frame
covar:
x: 0.001
Expand All @@ -145,19 +149,66 @@
y: 0.11176
z: -0.0889
yaw: 0.0
bin_target:
blood_hole_large:
parent: torpedo_frame
covar:
x: 0.5
y: 0.5
z: 0.5
yaw: 0.5
pose:
x: 0.0
y: -0.029972
z: 0.217424
yaw: 0.0
blood_hole_small:
parent: torpedo_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.0
y: 0.11176
z: -0.0889
yaw: 0.0
bin:
parent: map
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 11.0
y: -6.0
z: -3.25
x: 1.0
y: 0.0
z: -1.2
yaw: 0.0
bin_target1:
parent: bin_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.0
y: 0.0
z: 0.0
yaw: 0.0
bin_target2:
parent: bin_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.0
y: 0.0
z: 0.0
yaw: 0.0

# table locations
table:
parent: map
Expand All @@ -171,79 +222,127 @@
y: -4.0
z: -3.25
yaw: 180.0
table_reefshark:
pill:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 1.0
y: 0.0
z: 1.0
x: -0.25
y: 0.25
z: 0.0
yaw: 180.0
table_sawfish:
bandage:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: -1.0
y: 0.0
z: 1.0
yaw: 180.0
table_basket_pink:
x: -0.25
y: -0.25
z: 0.0
yaw: 180.0
nut_and_bolt:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.305
y: 0.0
x: 0.25
y: 0.25
z: 0.0
yaw: 0.0
table_basket_yellow:
plug:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: -0.305
y: 0.0
x: 0.25
y: -0.25
z: 0.0
yaw: 0.0
table_spoon_pink:
yaw: 0.0
helmet:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.1
y: -0.036
x: 0.305
y: 0.0
z: 0.0
yaw: 0.0
table_bottle_yellow:
warning:
parent: table_frame
covar:
x: 0.001
y: 0.001
z: 0.001
yaw: 0.001
pose:
x: 0.25
y: 0.25
x: -0.305
y: 0.0
z: 0.0
yaw: 0.0

compass:
parent: table_frame
covar:
x: 1.0
y: 1.0
z: 1.0
yaw: 1.0
pose:
x: 1.2
y: 0.0
z: 1.0
yaw: 180.0
hammer_and_wrench:
parent: table_frame
covar:
x: 1.0
y: 1.0
z: 1.0
yaw: 1.0
pose:
x: -1.2
y: 0.0
z: 1.0
yaw: 0.0
buoy:
parent: table_frame
covar:
x: 1.0
y: 1.0
z: 1.0
yaw: 1.0
pose:
x: 0.0
y: 1.2
z: 1.0
yaw: 270.0
sos:
parent: table_frame
covar:
x: 1.0
y: 1.0
z: 1.0
yaw: 1.0
pose:
x: 0.0
y: -1.2
z: 1.0
yaw: 90.0

prequal_gate:
parent: map
covar:
Expand Down
40 changes: 39 additions & 1 deletion riptide_mapping/config/dummy_detections.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
/**/dummydetections:
ros__parameters:
timer_period: 0.05
objects:
- gate
- gate_shark
- gate_saw
- slalom_front
- slalom_middle
- slalom_back
- torpedo
- torpedo_shark_hole
- torpedo_sawfish_hole
- bin_target
Comment on lines +4 to +14

@coderabbitai coderabbitai Bot Jun 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Dummy detection class IDs are out of sync with mapping target names.

Line 4 onward still uses legacy object IDs, and those entries publish the same class IDs by default. mapping.py now accepts renamed IDs (gate_rescue, gate_repair, fire_hole_large, fire_hole_small, bin_target1/2), so these simulated detections are treated as unknown and skipped.

🔧 Minimal aliasing fix in YAML
       gate_shark:
+        class_id: gate_rescue
         pose: [2.0, 0.5, -0.8, 0.0, 0.0, 3.1415]
@@
       gate_saw:
+        class_id: gate_repair
         pose: [2.0, -0.5, -0.8, 0.0, 0.0, 3.1415]
@@
       torpedo_shark_hole:
+        class_id: fire_hole_large
         pose: [12.0, -3.970028, -2.782576, 0.0, 0.0, 3.1415]
@@
       torpedo_sawfish_hole:
+        class_id: fire_hole_small
         pose: [12.0, 4.11176, -3.0889, 0.0, 0.0, 3.1415]
@@
       bin_target:
+        class_id: bin_target1
         pose: [11.0, -6.0, -3.25, 0.0, 0.0, 0.0]

Also applies to: 33-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@riptide_mapping/config/dummy_detections.yaml` around lines 4 - 14, The
objects list in the YAML file starting at line 4 contains legacy detection class
IDs that no longer match the renamed IDs expected by mapping.py. Update all
object entries in the objects list to use the new naming convention: replace
gate with gate_rescue, gate_shark and gate_saw with gate_repair, replace slalom
entries with fire_hole_large and fire_hole_small as appropriate, replace torpedo
and its variants with the corresponding fire hole names, and update bin_target
to bin_target1 and bin_target2. This same update must be applied to all object
entries throughout the file, including the additional entries mentioned at lines
33-104, so that the dummy detections are recognized by mapping.py and not
skipped as unknown.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdityaGupta0 you can fix this one for tree testing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

- blood_1
- blood_2
- table
- table_reefshark
- table_sawfish
- table_basket_pink
- table_basket_yellow
- table_spoon_pink
- table_bottle_yellow
detection_data:
gate:
pose: [2.0, 0.0, -0.8, 0.0, 0.0, 0.0]
Expand Down Expand Up @@ -31,7 +51,7 @@
noise: 0.1
score: 0.8
downward: false
pub_invalid_orientation: false
pub_invalid_orientation: true
min_dist: 0.5
max_dist: 3.0
slalom_middle:
Expand Down Expand Up @@ -82,6 +102,24 @@
pub_invalid_orientation: false
min_dist: 0.5
max_dist: 3.0
blood_1:
class_id: blood
pose: [4.0, -3.0, -3.25, 0.0, 0.0, 0.0]
noise: 0.05
score: 0.8
downward: true
pub_invalid_orientation: false
min_dist: 0.5
max_dist: 3.0
blood_2:
class_id: blood
pose: [4.7, -3.5, -3.25, 0.0, 0.0, 0.0]
noise: 0.05
score: 0.8
downward: true
pub_invalid_orientation: false
min_dist: 0.5
max_dist: 3.0
table:
pose: [4.0, 8.0, -3.25, 0.0, 0.0, 0.0]
noise: 0.05
Expand Down
Loading