Fix collision Loss Scaling for Large-Object Placement - #974
Conversation
Greptile SummaryNormalizes collision penetration losses by object size and aligns optimization-time and validation-time mesh dispatch.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security defects identified. The normalized AABB and mesh losses retain collision gradients, optimization and validation use the same mesh-coverage predicate, and background exclusions are keyed and tested without leaving an unsupported dispatch path. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Scene assets and relation anchors] --> B[Discover passive collision objects]
B --> C[Exclude anchored ObjectReference subtrees]
C --> D[Aggregate remaining background meshes]
A --> E[Build candidate bounding boxes]
D --> F{Pair covered by mesh collision?}
E --> F
F -->|Yes| G[Normalized sphere-to-SDF penetration]
F -->|No| H[Normalized AABB penetration]
G --> I[Relation solver optimization]
H --> I
I --> J[Validation using matching pair dispatch]
J --> K[Rank and apply placement]
Reviews (1): Last reviewed commit: "introduce normalization in bbox/mesh" | Re-trigger Greptile |
| self.params = params or RelationSolverParams() | ||
| # High slope (vs 10-100 for relation strategies) so overlap avoidance dominates. | ||
| self._no_collision_strategy = NoCollisionLossStrategy(slope=10000.0) | ||
| self._no_collision_strategy = NoCollisionLossStrategy() |
There was a problem hiding this comment.
🟡 Collision loss no longer dominates relation losses
The old slope (10000.0 on overlap-volume) was deliberately high so overlap avoidance would dominate the 10–100 relation-strategy slopes — the comment you removed said as much. The new size-normalized penetration loss with the default slope=10 is roughly the same order of magnitude as the relation losses, so a strong relation term (e.g. a tight NextTo) can now outweigh collision avoidance for all scenes, not just large objects. Did you confirm dense existing scenes still resolve without overlaps under the new balance, or should the no-collision slope stay somewhat higher than the relation slopes?
🤖 Isaac Lab-Arena Review BotSummaryThis normalizes the no-collision loss by object size (AABB penetration depth ÷ subject scale, and per-pair Findings🟡 relation_solver.py:51 — The no-collision slope drops from No correctness issues found in the normalization math, the anchor-swap / tie-break heuristics, the exclusion plumbing, or the new Test CoverageThorough. New/updated tests cover the normalized-depth formula, scale invariance, containment gradient, batched-bbox mesh dispatch, meshless-anchor AABB fallback, exclusion cache-keying, all-meshes-excluded, and unsupported-geometry preservation. Sim-dependent tests ( VerdictShip it — pending a sanity check that the global loss-reweighting does not regress collision avoidance on existing dense scenes. |
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
97dbd58 to
49097c7
Compare
Signed-off-by: zhx06 <zihaox@nvidia.com>
qianl-nv
left a comment
There was a problem hiding this comment.
This is a relative large change to the relation solver loss compute and carry a lot of risk this late in the stage. Let's take a more systematic approach to understand the perf gain of each optimization and if they introduces any regressions
I see several changes in this MR that should be separately measured
-
AABB loss: Volume overlap (slope=10000) → shortest-axis penetration / subject size (slope=10)
this carries the highest risk for regressing existing scenes. Let's benchmark this change alone, over all the existing robolab scenes (in isaaclab_arena_environments/robolab), and check how (1) layout success rate and interation count changes (2) physics stability rate on the layouts using isaaclab_arena/scripts/run_placement_pool_validation.py -
Mean sphere penetration → max normalized penetration per pair
-
Excludes anchor ObjectReference subtrees from aggregated background meshes
-
Droid stand collison_mode=BBOX
For 2-4, let's use the scenes in isaaclab_arena_environment/kitchen_bench with mesh mode enable for the kitchen, and check the impact on build/solver time, layout success rate, interations ect. Let's only merge the changes that has significant impact on perf.
It also seems 4 makes 2 unnecessary at least for kitchen_bench scenes?
Summary
Normalize collision loss for large objects
Detailed description
NextToplacement reliability without increasing retries.