Issue Deploying Trained RL Policies in Isaac Sim (policy.pt from Isaac Lab)

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:

  1. 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()
  1. 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)
  1. Segmentation fault when running inside Isaac Sim:
    If I attempt to initialize SimulationApp inside the script, Isaac Sim crashes:
Fatal Python error: Segmentation fault

Questions:

  1. What is the correct way to integrate an RL policy trained in Isaac Lab into Isaac Sim?
  2. Does the .pt policy require additional components like an observation normalizer?
  3. Is there a specific way to structure input/output tensors when deploying in Isaac Sim?
  4. Should I use an ONNX-exported model instead of .pt?
  5. 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.

Thank you for your interest in Isaac Lab. To ensure efficient support and collaboration, please submit your topic to its GitHub repo following the instructions provided on Isaac Lab’s Contributing Guidelines regarding discussions, submitting issues, feature requests, and contributing to the project.

We appreciate your understanding and look forward to assisting you.

Hello, you can also checkout our Isaac Sim documentation on running locomotion policies from Isaac Lab.

We will also be adding more examples with manipulation in our future release.