|
| 1 | +# Copyright (c) 2024-2025, Muammer Bay (LycheeAI), Louis Le Lay |
| 2 | +# All rights reserved. |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: BSD-3-Clause |
| 5 | +# |
| 6 | +# Copyright (c) 2022-2025, The Isaac Lab Project Developers. |
| 7 | +# All rights reserved. |
| 8 | +# |
| 9 | +# SPDX-License-Identifier: BSD-3-Clause |
| 10 | + |
| 11 | +from isaaclab.controllers.differential_ik_cfg import DifferentialIKControllerCfg |
| 12 | +from isaaclab.envs.mdp.actions.actions_cfg import DifferentialInverseKinematicsActionCfg |
| 13 | +from isaaclab.utils import configclass |
| 14 | + |
| 15 | +## |
| 16 | +# Pre-defined configs |
| 17 | +## |
| 18 | +from SO_100.robots import SO_ARM100_CFG, SO_ARM100_ROSCON_CFG # noqa: F401 |
| 19 | + |
| 20 | +from .joint_pos_env_cfg import SoArm100ReachRosConEnvCfg |
| 21 | + |
| 22 | +# ---------------------------------------------------------------- |
| 23 | +# --------------- ROSCON ES 2025 asset --------------------------- |
| 24 | +# ---------------------------------------------------------------- |
| 25 | + |
| 26 | + |
| 27 | +@configclass |
| 28 | +class SoArm100ReachRosCon_IK_EnvCfg(SoArm100ReachRosConEnvCfg): |
| 29 | + def __post_init__(self): |
| 30 | + # post init of parent |
| 31 | + super().__post_init__() |
| 32 | + |
| 33 | + # Set Franka as robot |
| 34 | + # We switch here to a stiffer PD controller for IK tracking to be better. |
| 35 | + self.scene.robot = SO_ARM100_ROSCON_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot") |
| 36 | + |
| 37 | + # Set actions for the specific robot type (franka) |
| 38 | + self.actions.arm_action = DifferentialInverseKinematicsActionCfg( |
| 39 | + asset_name="robot", |
| 40 | + joint_names=[ |
| 41 | + "shoulder_pan_joint", |
| 42 | + "shoulder_lift_joint", |
| 43 | + "elbow_joint", |
| 44 | + "wrist_pitch_joint", |
| 45 | + "wrist_roll_joint", |
| 46 | + ], |
| 47 | + body_name="wrist_2_link", |
| 48 | + controller=DifferentialIKControllerCfg(command_type="pose", use_relative_mode=True, ik_method="dls"), |
| 49 | + scale=0.5, |
| 50 | + body_offset=DifferentialInverseKinematicsActionCfg.OffsetCfg(pos=[-0.005, -0.1, 0.0]), |
| 51 | + ) |
| 52 | + |
| 53 | + |
| 54 | +@configclass |
| 55 | +class SoArm100ReachRosCon_IK_EnvCfg_PLAY(SoArm100ReachRosCon_IK_EnvCfg): |
| 56 | + def __post_init__(self): |
| 57 | + # post init of parent |
| 58 | + super().__post_init__() |
| 59 | + # make a smaller scene for play |
| 60 | + self.scene.num_envs = 50 |
| 61 | + self.scene.env_spacing = 2.5 |
| 62 | + # disable randomization for play |
| 63 | + self.observations.policy.enable_corruption = False |
0 commit comments