Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions embodichain/lab/sim/sensors/contact_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,12 @@ def set_contact_point_visibility(
point_size: float = 3.0,
):
if visible:
contact_position_arena = self._data_buffer["position"]
contact_offsets = self._sim.arena_offsets[self._data_buffer["env_ids"]]
contact_position_arena = self._data_buffer["position"][
: self._curr_contact_num
]
contact_offsets = self._sim.arena_offsets[
self._data_buffer["env_ids"][: self._curr_contact_num]
]
Comment on lines +364 to +369
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The PR checklist states "I have added tests that prove my fix is effective," but no test for set_contact_point_visibility was added in the test suite (e.g., tests/sim/sensors/test_contact.py). The existing test_fetch_contact only exercises get_data() and filter_by_user_ids(). A test calling contact_sensor.set_contact_point_visibility(visible=True) after update() should be added to verify the crash is fixed and does not regress.

Copilot uses AI. Check for mistakes.
contact_position_world = contact_position_arena + contact_offsets
if self._visualizer is None:
# create new visualizer
Expand Down