Reworked and Stable Sonar Object/Wall Detection#109
Conversation
…data. Docker-build.sh changed because of issues with personal computer.
Added Sonar Denoiser Class which can process sonar sweeps. Added a publisher to allow viewing data and testing if the processing is actually working
…ry code for the test
… with the sonar device to sonar_utils.py (#97) - Skipping checks because this is just to merge two of my branches together so that I can work out of one.
…stances of objects
…ressed_img, code in task_planning is from Pranav Bijith - add rotate_to_normal and rotate_to_angle_from_normal
…onstant_sweep method align with the new sonar pipeline
|
Converting to draft as has not been pool-tested yet. |
Merging main into sonar-processing to prepare for PR.
|
I reopened the PR after thorough testing in the pool. |
nathanaelren
left a comment
There was a problem hiding this comment.
i'll let @ChuChuCodes0414 fully review this (I'm in Greece) but took a quick look since my flight is delayed, two quick comments, thanks for all the great work Anthony! This is awesome
ChuChuCodes0414
left a comment
There was a problem hiding this comment.
In general good PR. Some changes to be made.
I will take a closer look when these are reviewed along with Nathanael's comments. Thank you!
There was a problem hiding this comment.
Pull request overview
This PR refactors the sonar pipeline to provide more stable object/wall detection, adds a new denoising/segmentation module, and exposes additional visualization/telemetry to ROS topics for easier debugging in Foxglove.
Changes:
- Added a new sonar denoising + segmentation pipeline (
sonar_object_detection.py) and updated sonar processing/utilities to support it. - Updated the sonar ROS node to publish both “raw” and processed scans and to return/publish a wall angle.
- Updated task-planning to add rotate-to-normal behaviors driven by sonar results, and updated the Docker image to install scikit-image.
Reviewed changes
Copilot reviewed 12 out of 30 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| onboard/src/task_planning/task_planning/tasks/sonar_tasks.py | Adds sonar-driven rotation tasks and helpers for extracting/normalizing the sonar normal angle. |
| onboard/src/task_planning/task_planning/task.py | Updates Task awaiting behavior to handle rclpy Futures (currently breaks future result propagation). |
| onboard/src/task_planning/task_planning/robot/oogway.py | Adjusts competition task list / parameters and adds a sonar rotation task entry point. |
| onboard/src/task_planning/task_planning/interface/cv.py | Minor whitespace cleanup. |
| onboard/src/sonar/sonar/sonar_utils.py | Moves sonar math/image conversion helpers into utilities (includes a critical negate math bug). |
| onboard/src/sonar/sonar/sonar_object_detection.py | New FFT denoising + segmentation + orthogonal regression utilities. |
| onboard/src/sonar/sonar/sonar_image_processing.py | Updates image building normalization and adds a GMM clustering helper. |
| onboard/src/sonar/sonar/sonar.py | Reworks sonar node processing pipeline, publishes raw image + wall angle, and extends service response fields (currently contains a syntax error and a segmentation instantiation mismatch). |
| onboard/src/sonar/README.md | Documents package structure and new topics (one message type mismatch). |
| onboard/src/sonar/sweep_data/data.jpeg | Adds sample sonar scan data asset. |
| onboard/src/sonar/sweep_data/newdata.jpeg | Adds sample sonar scan data asset. |
| docker/Dockerfile | Installs scikit-image to support the new pipeline. |
| core/src/custom_msgs/srv/SonarSweepRequest.srv | Adds angle_of_wall to service response. |
| core/src/custom_msgs/msg/SonarSweepResponse.msg | Adds angle_of_wall field and normalizes formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Pool tested on 4/18, sonar works (IMU issue?) |
Summary
Testing