Repository navigation
Cherrypick Rename object_moved_rate to object_peak_speed_exceeded_rate and add object_displaced_rate - #1732
Conversation
…1717) Rename the `object_moved_rate` metric, its class `ObjectMovedRateMetric,` and its module `metrics/object_moved.py` to `object_peak_speed_exceeded_rate,` `ObjectPeakSpeedExceededRateMetric` and `metrics/object_peak_speed_exceeded.py.` `object_moved_rate` counts an episode as "moved" only if the object's linear speed goes above 0.5 m/s at some step. The name suggests it measures displacement, and it doesn't. In the deformable pick-and-place workflow, all 16 episodes succeed with the cube on the plate, but the metric reports 0.75. The 4 episodes that carried the object slowly never crossed the speed threshold. VDR reported as a bug as the object_moved_rate < success_rate. - Rename the metric key, class, compute function and module. The metric's behavior is unchanged. - Rewrite the docstrings and the concept doc to say the metric compares peak speed against object_velocity_threshold, and that a slow movement is not counted. *Breaking change*: anything that reads `object_moved_rate` from result files or logs must use the new key. Sequential tasks derive their _subtask_N keys from the base name, so those change too. Before: ``` from isaaclab_arena.metrics.object_moved import ObjectMovedRateMetric def get_metrics(self): return [SuccessRateMetric(), ObjectMovedRateMetric(self.pick_up_object)] metrics = env.unwrapped.compute_metrics() rate = metrics.metric_data_entries["object_moved_rate"].metric_value ``` After: ``` from isaaclab_arena.metrics.object_peak_speed_exceeded import ObjectPeakSpeedExceededRateMetric def get_metrics(self): return [SuccessRateMetric(), ObjectPeakSpeedExceededRateMetric(self.pick_up_object)] metrics = env.unwrapped.compute_metrics() rate = metrics.metric_data_entries["object_peak_speed_exceeded_rate"].metric_value ``` --------- Signed-off-by: Xinjie Yao <xyao@nvidia.com> (cherry picked from commit ee6a9b0)
Signed-off-by: Xinjie Yao <xyao@nvidia.com> (cherry picked from commit b78c9be)
- Say in the compute function docstring that an episode counts once the object is ever past the threshold, and test a lift-and-return episode. - Drop the shape assert that ArenaWorld.get_position_w already makes. - Test a fast case for the peak-speed metric, which four tasks still report. - Walk through ObjectDisplacedRateMetric in the metrics concept page. Signed-off-by: Xinjie Yao <xyao@nvidia.com> (cherry picked from commit b16e0f0)
[Medium impact] The PR changes the names and meaning of object-motion metrics in task evaluation results. The PR appears safe to merge, with a non-blocking correction needed in the workflow examples. Findings
SummaryRenames the speed-based metric to
Reviews (1) · Last reviewed commit: "Address object_displaced_rate review com..." · Reviewed by Greptile |
| droid_pnp_camera_sensitivity_openpi: | ||
| num_episodes 10 | ||
| object_moved_rate 0.9000 | ||
| object_peak_speed_exceeded_rate 0.9000 |
There was a problem hiding this comment.
Examples show the wrong metric
These examples show object_peak_speed_exceeded_rate, but their workflows use PickAndPlaceTask, which now reports object_displaced_rate. The sequential workflow likewise reports object_displaced_rate_subtask_0. This mismatch also appears in the deformable, GR00T, and OpenPI workflow examples.
Update the examples to match current output, or label them as historical speed measurements. Do not reuse the old numbers as displacement results; the two metrics measure different things.
| """ | ||
|
|
||
| name = "object_moved_rate" | ||
| name = "object_peak_speed_exceeded_rate" |
There was a problem hiding this comment.
🟡 v0.4 migration guide still says metric names are unchanged
v0.3 reported object_moved_rate (release/0.3.0:isaaclab_arena/metrics/object_moved.py:72). With this PR, PickAndPlaceTask reports object_displaced_rate and the other four tasks report object_peak_speed_exceeded_rate. On this branch, though, docs/pages/references/migration_guide_v0_4.rst:551 still says "Metric names, such as success_rate, are unchanged." The guide's "Module moves" table (line 368) says no aliases were left, but it doesn't list isaaclab_arena.metrics.object_moved → isaaclab_arena.metrics.object_peak_speed_exceeded. The release notes send parser authors to this guide. Could we update line 551, add the module to the table, and add a line under "Metric values" (line 608) saying pick-and-place now measures displacement rather than peak speed? For example:
Metric names are unchanged except ``object_moved_rate``: ``PickAndPlaceTask`` now reports
``object_displaced_rate``, and ``GoalPoseTask``, ``AssemblyTask``, ``GearInsertionTask`` and
``PlaceUprightTask`` report ``object_peak_speed_exceeded_rate``.| a speed-based metric, a slow carry counts as displaced. | ||
|
|
||
| The first position is recorded after the first environment step, not at reset, so motion before | ||
| that step, such as an object dropping onto its support after spawning, does not count toward the |
There was a problem hiding this comment.
🔵 A drop after spawning can still count
Only motion during the first environment step is excluded. An object that keeps falling after that step counts as displaced. In test_success_rate_metric.py, env 1 starts at z=0.2 (line 73) and is never lifted (lifted_envs starts all True, line 91), yet the test expects every episode to count (line 18). Objects placed with On (1 cm default clearance) stay under the 2 cm threshold, so this mainly affects objects given explicit initial poses. Could the docstring say that? The same wording would also need to change in #1731.
The first position is recorded after the first environment step, not at reset, so only motion
during that step is excluded. An object that is still falling or settling after it can count
as displaced.
🤖 Isaac Lab-Arena Review BotSummaryThis backports two changes to Design, Boundaries & Scope#1731 is still open on Findings🟡 Warning: isaaclab_arena/metrics/object_peak_speed_exceeded.py:73. The v0.4 migration guide ( Greptile has already flagged on this PR that the sample outputs in the OpenPI, GR00T, variations, deformable and sequential pages come from Test Coverage and CI CostWhen this review was written, pre-commit had passed, the image build was still running, and the test jobs hadn't run. I couldn't confirm that the tests pass on VerdictMinor fixes needed |
- Say in the migration guide that object_moved_rate became object_displaced_rate for PickAndPlaceTask and object_peak_speed_exceeded_rate for the other tasks, list the module move, and explain how the values differ. - Say in the ObjectDisplacedRateMetric docstring that only motion during the first environment step is excluded, so a longer drop after spawning partly counts. - Remove the object-motion metric from pick-and-place sample outputs. They were recorded with the peak-speed metric, and these tasks now report object_displaced_rate. Signed-off-by: Xinjie Yao <xyao@nvidia.com> (cherry picked from commit 6663e9c95db221fc8f02f60e9933fe2bc4610de8)
Cherrypick #1717 and #1731.