Adds Simple Cube Peg In Hole Environment and Task #2264
+556
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit adds a simple peg-in-hole task using repurposed assets from the isaac-sim asset browser. I started from the Isaac-Lift-Cube-Franka-v0 task and modified the Props/Flip_Stack/t_connector_physics.usd asset to have a hole collision that aligns with its visual hole. I sized the hole in the task so that the cube from the previous task just barely fits into the hole. This provides a nice rectangular insertion task, which is a little harder than the existing cylindrical peg-insertion task in Isaac-Factory-PegInsert-Direct-v0. The formulation is simpler, as well, so it can scale to much higher parallel environment numbers: the default is 4096 which works well on my 3090. It's not the peg-in-hole task that was in the Orbit paper, since I wanted to keep it simple and use assets that were readily available to me and NVIDIA already had the license to, but I'm open to expanding the setup to include the peg-in-hole toy from the paper.
I performed some reward shaping while iteratively training the task and I'm happy with the training consistency. The rewards used for the cube lifting were mostly sufficient to modify for the hole insertion task but I have 4 scales of goal distance rewards instead of 2: one to encourage exploration towards the hole, another for approaching the hole object, another for approaching the hole itself, and another for getting inside the hole. I had to add object orientation into the observations because the robot needs to be able understand rotating the object so that it fits into the rectangular hole. I haven't added agents for any other RL library than RSL-RL right now, but before this gets merged I'm planning on adding default agents for the other RL libraries.
Currently I'm hosting the modified instanceable hole asset on my own public s3 bucket, so anyone running the code should have it "just work" for now, and then when this is merged and the modified asset is uploaded onto the Isaac s3 bucket we can change the USD URL prefix to the ISAAC_NUCLEUS_DIR instead of mine: ZOEMCC_BUCKET_DIR . Otherwise it's formatted exactly the same to make testing and merging as painless as possible.
I added the documentation change but the code link in the docs won't work until this is merged to main.
Fixes #748
Type of change
Screenshots
Training montage video: all of the training video outputs concatenated into one video, with the constituent training step in the top left of the video as text. I also have a shell script that does this automatically that I can submit a separate pull request for if desired hehe.
peg_in_hole_training_montage.mp4
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there