Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Factory contact-rich manipulation tasks to IsaacLab #1520

Merged
merged 16 commits into from
Dec 17, 2024

Conversation

noseworm
Copy link
Contributor

@noseworm noseworm commented Dec 10, 2024

Description

This MR adds new tasks for contact-rich manipulation based on the Factory line of work. Tasks include peg insertion, gear meshing, and nut threading.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Screenshots

peg_insertion gear_meshing nut_threading

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@noseworm noseworm marked this pull request as ready for review December 10, 2024 15:44
@@ -155,7 +155,7 @@ def main():
# convert obs to agent format
obs = agent.obs_to_torch(obs)
# agent stepping
actions = agent.get_action(obs, is_deterministic=True)
actions = agent.get_action(obs, is_deterministic=agent.is_deterministic)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For Factory environments, we evaluate policies stochastically.

agent.is_deterministic is specified in the rl_games_ppo_cfg.yaml under params.config.player.deterministic. If this is not specified, the default value will be True -- as such, this change should not affect other environments.

@kbkartik
Copy link

Hi noseworm,

newbie to sim2real world. I am following this PR and had two questions:

  1. For commit b40062f, why have you changed Cfg for rigid bodies from RigidObjectCfg to ArticulationCfg?

  2. Where do I get the usd files for the rigid objects?

Thanks!

@kellyguo11 kellyguo11 changed the title Add Factory contact-rich manipulation tasks to IsaacLab Adds Factory contact-rich manipulation tasks to IsaacLab Dec 12, 2024
Copy link
Contributor

@kellyguo11 kellyguo11 left a comment

Choose a reason for hiding this comment

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

docs/source/overview/environments.rst Outdated Show resolved Hide resolved
* Added ``Factory-Direct-v0`` environment as a direct RL env that
implements contact-rich manipulation tasks including peg insertion,
gear meshing, and nut threading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

return translated_pos


def axis_angle_from_euler(euler):
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if these can become more general utilities? We also have a bunch of rotation utilities in omni/isaac/lab/utils/math.py, there are likely some duplicates here with what's already in math.py. would be good to integrate them together.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are also several methods here that we are not using. I will remove those and use the methods from math.py when available.

kbkartik

This comment was marked as duplicate.

Choose a reason for hiding this comment

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

Supposed to be ISAAC_NUCLEUS_DIR instead of ISAACLAB_NUCLEUS_DIR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ISAACLAB_NUCLEUS_DIR should be correct. This is equivalent to ISAAC_NUCLEUS_DIR/IsaacLab.

bad_envs = bad_envs[any_error.nonzero(as_tuple=False).squeeze(-1)]

if bad_envs.shape[0] == 0:
print("Done IK")
Copy link
Contributor

Choose a reason for hiding this comment

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

may be cleaner to remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed print statement.

self._set_gains(self.default_gains)

physics_sim_view.set_gravity(carb.Float3(*self.cfg.sim.gravity))
print("Done Reset")
Copy link
Contributor

Choose a reason for hiding this comment

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

might be good to remove this as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the print statement.

noseworm and others added 5 commits December 16, 2024 13:08
- Isaac- prefix added to task names
- Documentation updated with jpg images
- Use math.py rotation utilities
- Misc code cleanup
Signed-off-by: Kelly Guo <[email protected]>
@kellyguo11 kellyguo11 merged commit 3c55db4 into isaac-sim:main Dec 17, 2024
4 of 5 checks passed
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.

4 participants