Skip to content

Conversation

@KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented May 19, 2025

Enhance sim_with_dds.py to reset to the recorded initial state. If hdf5_path is None, it will reset to the initial state recorded in the recorded data.

Add evaluation pipeline

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the simulation reset functionality by allowing sim_with_dds.py to load and reset to recorded initial states from HDF5 files and adds an evaluation pipeline for trajectory metrics. Key changes include:

  • New unit tests for trajectory overlap and distance computation.
  • Added evaluation utilities and scripts (metrics, evaluate_trajectories) to process, plot, and compare trajectories.
  • Modifications in the simulation environment and replay recording modules to support recorded data reset, along with updated documentation.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
workflows/robotic_ultrasound/tests/test_simulation/test_metrics.py New tests added for computing trajectory overlap and average distance.
workflows/robotic_ultrasound/scripts/simulation/evaluation/utils.py Added functions to load ground truth/predicted data and plot trajectories.
workflows/robotic_ultrasound/scripts/simulation/evaluation/metrics.py Provides metric computation using a KDTree for nearest neighbor queries.
workflows/robotic_ultrasound/scripts/simulation/evaluation/evaluate_trajectories.py Implements a full evaluation pipeline for trajectory comparisons.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/utils.py Updates to support resetting the scene to its recorded initial state via HDF5 data.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/replay_recording.py Cleans up duplicate functions by importing shared utilities.
workflows/robotic_ultrasound/scripts/simulation/environments/sim_with_dds.py Adds CLI arguments and logic for resetting using HDF5 data and saving end‐effector trajectories.
workflows/robotic_ultrasound/scripts/simulation/README.md Updated documentation to explain the new evaluation pipeline and reset capabilities.

KumoLiu added 3 commits May 28, 2025 11:48
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 28, 2025

/build

Signed-off-by: YunLiu <[email protected]>
@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 29, 2025

/build

Copy link
Contributor

@mingxin-zheng mingxin-zheng left a comment

Choose a reason for hiding this comment

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

Thanks @KumoLiu for the fixes!

@mingxin-zheng mingxin-zheng enabled auto-merge (squash) May 29, 2025 06:28
@mingxin-zheng mingxin-zheng disabled auto-merge May 29, 2025 06:29
@KumoLiu KumoLiu changed the title Enhance sim_with_dds.py support resetting to the recorded initial state. Enhances sim_with_dds.py with HDF5 reset support and add a trajectory metrics evaluation pipeline. May 29, 2025
@mingxin-zheng mingxin-zheng enabled auto-merge (squash) May 29, 2025 06:36
@mingxin-zheng
Copy link
Contributor

/build

2 similar comments
@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 29, 2025

/build

@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 29, 2025

/build

@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 30, 2025

/build

@KumoLiu
Copy link
Contributor Author

KumoLiu commented May 30, 2025

/build

@mingxin-zheng mingxin-zheng merged commit c3f6498 into main May 30, 2025
4 checks passed
@KumoLiu KumoLiu deleted the yunl/enhance-sim-with-dds branch May 30, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants