Skip to content

Support variable contact sensor for Sorting task. #381

Merged
Nyquist0 merged 2 commits intomainfrom
lance/feature/sorting_origin_follow_up
Feb 5, 2026
Merged

Support variable contact sensor for Sorting task. #381
Nyquist0 merged 2 commits intomainfrom
lance/feature/sorting_origin_follow_up

Conversation

@Nyquist0
Copy link
Collaborator

@Nyquist0 Nyquist0 commented Feb 4, 2026

Summary

Support variable number of objects in sorting task

Detailed description

What was the reason for the change?

The original SortMultiObjectTask used a hardcoded SceneCfg with fixed fields (contact_sensor_0, contact_sensor_1, etc.), limiting support to fewer than 4 objects.

What has been changed?

  • Use make_configclass to dynamically generate SceneCfg, supporting variable number of contact sensors
  • Improve contact sensor naming: from index-based (contact_sensor_0) to object name-based (contact_sensor_{object.name})
  • Rename CLI arguments: --object → --objects, --destination → --destinations
  • Add TODO comments for RedCube/GreenCube documenting a known bug where rigid body attributes must bind to root layer

What is the impact of this change?

SortMultiObjectTask now supports an arbitrary number of objects without hardcoded limitations.

@Nyquist0 Nyquist0 requested a review from alexmillane February 4, 2026 03:55
Copy link
Collaborator

@alexmillane alexmillane left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up! Looks great!

from isaaclab_arena.utils.pose import Pose

assert len(args_cli.destination) == len(args_cli.object)
assert len(args_cli.destinations) == len(args_cli.objects)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code below only works for 2 objects. Let's add an additional assert that len(args_cli.destinations) == 2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure. Do you think is there a way that we could support multiple objects and destinations more than two because I think the current blocker is to automatically arrange the objects position without overlap.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Anyway, let's go ahead and merge this for now. We can explore a better solution in a follow-up MR if needed..

@Nyquist0 Nyquist0 force-pushed the lance/feature/sorting_origin_follow_up branch from b4b3b80 to 7a3b560 Compare February 5, 2026 00:31
@Nyquist0 Nyquist0 enabled auto-merge (squash) February 5, 2026 00:36
@Nyquist0 Nyquist0 merged commit 51eb927 into main Feb 5, 2026
6 of 10 checks passed
@Nyquist0 Nyquist0 deleted the lance/feature/sorting_origin_follow_up branch February 5, 2026 06:22
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.

2 participants