Skip to content

How to deploy trained policys #70

Description

@Jak1283

Hello,
I'm working on training a custom reinforcement learning policy for the Unitree G1 robot's navigation task, where the robot learns to navigate to a specific (x, y) location using UniformPose2dCommand. This is based on the pre-existing Unitree-G1-29dof-Velocity policy as a starting point (PreTrainedPolicyActionCfg).

Training and export work fine—I get a policy.pt file via play.py. However, I'm stuck on deployment:

  • To MuJoCo simulation: I can't get it running with g1_ctrl after modifying main.cpp.
  • To real robot: No clear guide for integrating custom policies beyond the defaults.

A step-by-step guide (or example code/YAML snippets) for deploying self-trained policies would be incredibly helpful, especially for custom tasks like navigation.

Error: Trying to deploy the custom policy via g1_ctrl

terminate called after throwing an instance of 'YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
  what():  bad conversion

I believe a new class (for the custom policy loader or navigation handler) needs to be created and added to the build, but the question is where (in which header/source file) and how (CMake integration, inheritance from existing policy class).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions