Hello everyone,
I’m currently trying to deploy a trained RL policy in Isaac Sim after training it in Isaac Lab. My goal is to use the policy.pt
file to control a robot inside Isaac Sim, but I’m facing several issues.
Setup Information:
- Simulator: Isaac Sim 2024.1
- RL Framework: Isaac Lab (RSL-RL)
- Training Output Files:
/home/cesiro/IsaacLab/logs/rsl_rl/h1_flat/2025-03-05_12-51-53/exported/policy.pt
agent.yaml
env.yaml
- Scene:
hala.usd
(custom environment) - Hardware: NVIDIA GPU with CUDA support
What I’ve Tried:
- Loading policy in Isaac Sim:
I attempted to load the.pt
file using PyTorch:
policy_model = torch.load(policy_pt_path, map_location="cuda:0")
policy_model.eval()
- Applying actions to the robot:
After loading the model, I retrieve observations and try to apply actions:
joint_positions = torch.tensor(robot.get_joint_positions(), dtype=torch.float32, device="cuda:0").unsqueeze(0)
with torch.no_grad():
actions = policy_model(joint_positions).cpu().numpy()
robot.apply_action(actions)
- Segmentation fault when running inside Isaac Sim:
If I attempt to initializeSimulationApp
inside the script, Isaac Sim crashes:
Fatal Python error: Segmentation fault
Questions:
- What is the correct way to integrate an RL policy trained in Isaac Lab into Isaac Sim?
- Does the
.pt
policy require additional components like an observation normalizer? - Is there a specific way to structure input/output tensors when deploying in Isaac Sim?
- Should I use an ONNX-exported model instead of
.pt
? - How can I debug the segmentation fault when trying to load policies in Isaac Sim?
Any help or guidance would be greatly appreciated! Thanks in advance.