Skip to content

Commit 43b68c1

Browse files
committed
improve docstrings
Signed-off-by: zhx06 <zihaox@nvidia.com>
1 parent 4c722f0 commit 43b68c1

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

isaaclab_arena/environments/arena_env_builder.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@
3636
)
3737
from isaaclab_arena.recording.common_terms import CoreEpisodeRecorderTermCfg, VariationEpisodeRecorderTermCfg
3838
from isaaclab_arena.recording.episode_recorder_manager import EpisodeRecorderTermCfg
39-
<<<<<<< HEAD
4039
from isaaclab_arena.recording.progress_terms import ProgressEpisodeRecorderTermCfg
41-
from isaaclab_arena.relations.collision_mode import CollisionMode
42-
=======
43-
>>>>>>> a690c8f59 (address comments)
4440
from isaaclab_arena.relations.object_placer_params import ObjectPlacerParams
4541
from isaaclab_arena.relations.placement_events import PLACEMENT_RESET_EVENT_NAME
4642
from isaaclab_arena.tasks.no_task import NoTask

isaaclab_arena/relations/relation_solver.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _compute_no_overlap_loss_mesh(
521521
device=device,
522522
)
523523

524-
# AABB broadphase (yaw-aware): skip separated pairs.
524+
# AABB overlap filter (yaw-aware): skip separated pairs.
525525
margins = cache.pair_max_radius + clearance_m
526526
s_bbox_min = cache.pair_subject_bbox_min[:, b, :]
527527
s_bbox_max = cache.pair_subject_bbox_max[:, b, :]
@@ -664,8 +664,6 @@ def solve(
664664
on_pairs.add((id(rel.parent), id(obj)))
665665
self._mesh_orientations = orientations
666666
self._prepare_mesh_collision_cache(state, on_pairs)
667-
668-
if self.params.collision_mode == CollisionMode.MESH:
669667
self._mesh_manager.reset_sentinel_warning()
670668

671669
# Setup optimizer (only for optimizable positions)
@@ -688,7 +686,7 @@ def solve(
688686
loss = self._compute_total_loss(state)
689687
loss_history.append(loss.item())
690688

691-
# Constant-zero loss has no grad_fn — skip backward when broadphase culls all pairs.
689+
# Constant-zero loss has no grad_fn — skip backward when overlap filter culls all pairs.
692690
if loss.grad_fn is not None:
693691
loss.backward()
694692
optimizer.step()

isaaclab_arena/relations/warp_sdf_kernels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def sdf_sentinel_count(sdf_values: torch.Tensor) -> int:
119119

120120

121121
def clamp_sdf_sentinel(sdf_values: torch.Tensor) -> torch.Tensor:
122-
"""Replace sentinel SDF values with 0 (treat as "on surface") so they produce gradient."""
122+
"""Replace sentinel SDF values with 0 so no-face hits contribute zero loss rather than large positive."""
123123
return torch.where(sdf_values >= _SDF_SENTINEL, torch.zeros_like(sdf_values), sdf_values)
124124

125125

0 commit comments

Comments
 (0)