Commit 4f8b2b57 authored by David Hoeller's avatar David Hoeller

Adds the teddy bear pick and lift example (#128)

# Description

Adds the teddy bear pick and lift example

## Type of change

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] 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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 0eb83edf
......@@ -52,6 +52,14 @@ gym.register(
disable_env_checker=True,
)
gym.register(
id="Isaac-Lift-Teddy-Bear-Franka-IK-Abs-v0",
entry_point="omni.isaac.lab.envs:ManagerBasedRLEnv",
kwargs={
"env_cfg_entry_point": ik_abs_env_cfg.FrankaTeddyBearLiftEnvCfg,
},
disable_env_checker=True,
)
##
# Inverse Kinematics - Relative Pose Control
......
......@@ -3,9 +3,12 @@
#
# SPDX-License-Identifier: BSD-3-Clause
from omni.isaac.lab.assets import DeformableObjectCfg
from omni.isaac.lab.controllers.differential_ik_cfg import DifferentialIKControllerCfg
from omni.isaac.lab.envs.mdp.actions.actions_cfg import DifferentialInverseKinematicsActionCfg
from omni.isaac.lab.sim.spawners import UsdFileCfg
from omni.isaac.lab.utils import configclass
from omni.isaac.lab.utils.assets import ISAACLAB_NUCLEUS_DIR
from . import joint_pos_env_cfg
......@@ -45,3 +48,33 @@ class FrankaCubeLiftEnvCfg_PLAY(FrankaCubeLiftEnvCfg):
self.scene.env_spacing = 2.5
# disable randomization for play
self.observations.policy.enable_corruption = False
@configclass
class FrankaTeddyBearLiftEnvCfg(FrankaCubeLiftEnvCfg):
def __post_init__(self):
# post init of parent
super().__post_init__()
self.scene.object = DeformableObjectCfg(
prim_path="{ENV_REGEX_NS}/Object",
init_state=DeformableObjectCfg.InitialStateCfg(pos=[0.5, 0, 0.05], rot=[0.707, 0, 0, 0.707]),
spawn=UsdFileCfg(
usd_path=f"{ISAACLAB_NUCLEUS_DIR}/Objects/teddy_bear.usd",
scale=(0.01, 0.01, 0.01),
),
)
# Make the end effector less stiff to not hurt the poor teddy bear
self.scene.robot.actuators["panda_hand"].effort_limit = 50.0
self.scene.robot.actuators["panda_hand"].stiffness = 40.0
self.scene.robot.actuators["panda_hand"].damping = 10.0
# Remove all the terms for the lift_teddy_bear_sm demo
self.terminations.object_dropping = None
self.rewards.reaching_object = None
self.rewards.lifting_object = None
self.rewards.object_goal_tracking = None
self.rewards.object_goal_tracking_fine_grained = None
self.events.reset_object_position = None
self.observations.policy.object_position = None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment