GR1T2抓取试管环境
This commit is contained in:
@@ -83,14 +83,15 @@ from isaaclab.devices.teleop_device_factory import create_teleop_device
|
||||
from isaaclab.envs import ManagerBasedRLEnvCfg
|
||||
from isaaclab.managers import TerminationTermCfg as DoneTerm
|
||||
|
||||
import isaaclab_tasks # noqa: F401
|
||||
# import isaaclab_tasks # noqa: F401
|
||||
import mindbot.tasks # noqa: F401
|
||||
from isaaclab_tasks.manager_based.manipulation.lift import mdp
|
||||
from isaaclab_tasks.utils import parse_env_cfg
|
||||
|
||||
if args_cli.enable_pinocchio:
|
||||
import isaaclab_tasks.manager_based.locomanipulation.pick_place # noqa: F401
|
||||
import isaaclab_tasks.manager_based.manipulation.pick_place # noqa: F401
|
||||
# import isaaclab_tasks.manager_based.locomanipulation.pick_place # noqa: F401
|
||||
# import isaaclab_tasks.manager_based.manipulation.pick_place # noqa: F401
|
||||
import mindbot.tasks.manager_based.il.pick_place
|
||||
|
||||
# import logger
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -288,6 +289,11 @@ def main() -> None:
|
||||
if teleoperation_active:
|
||||
# process actions
|
||||
actions = action.repeat(env.num_envs, 1)
|
||||
# 自动补齐 action 维度(如有 scale=0 的 hold 关节)
|
||||
expected_dim = env.single_action_space.shape[0]
|
||||
if actions.shape[1] < expected_dim:
|
||||
pad = torch.zeros(env.num_envs, expected_dim - actions.shape[1], device=actions.device)
|
||||
actions = torch.cat([actions, pad], dim=1)
|
||||
# apply actions
|
||||
env.step(actions)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user