Add sim detection publisher for automated training data collection - #518
Open
Br-Charb wants to merge 3 commits into
Open
Add sim detection publisher for automated training data collection#518Br-Charb wants to merge 3 commits into
Br-Charb wants to merge 3 commits into
Conversation
Contributor
Author
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #491
What this does
Adds
sim_detection_publisher.py— a ROS2 node that projects the 3D positions of competition elements into 2D bounding boxes on the front camera image, enabling two things:collect_data:=true): as the sub moves through sim, automatically saves each camera frame as a PNG alongside a YOLO.txtlabel file to~/sim_training_data/publish_detections:=true): publishes ground-truthDetectionArrayon/yolo/detectionsat 30Hz so missions can run in sim without a trained modelHow to run
Step 1 — launch the sim as normal:
Step 2 — in a new terminal, run the node:
Drive the sub around in sim and annotated images will save automatically to
~/sim_training_data/.World configs
Each world file has a matching yaml config with the correct object positions. Make sure the world you launch matches the config you pass:
robosub_2025.worldsim_objects.yaml(default, no need to pass)task1_2026.worldsim_objects_task1_2026.yamltask4_2026_v1.worldsim_objects_task4_2026_v1.yamltask4_2026_v2.worldsim_objects_task4_2026_v2.yamlTo use a non-default config:
Files changed
scripts/sim_detection_publisher.py— main nodeconfig/sim_objects.yaml— object positions forrobosub_2025.worldconfig/sim_objects_task1_2026.yaml— start gate fortask1_2026.worldconfig/sim_objects_task4_2026_v1.yaml— torpedo board fortask4_2026_v1.worldconfig/sim_objects_task4_2026_v2.yaml— torpedo board fortask4_2026_v2.worldCMakeLists.txt/package.xml— install the new script and configssubjugator_bridge.yaml— added camera_info bridge entries for both cameras