Skip to content

Commit

Permalink
fix default standing
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Dec 6, 2024
1 parent 0d5700d commit 4a01fc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sim/model_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def get_actor_policy(model_path: str, cfg: ActorCfg) -> Tuple[nn.Module, dict, T
num_actions = a_model.num_actions
num_observations = a_model.num_observations

default_standing = list(a_model.robot.default_standing().values())

return (
a_model,
{
Expand All @@ -250,6 +252,7 @@ def get_actor_policy(model_path: str, cfg: ActorCfg) -> Tuple[nn.Module, dict, T
"robot_damping": robot_damping,
"num_actions": num_actions,
"num_observations": num_observations,
"default_standing": default_standing,
},
input_tensors,
)
Expand Down
4 changes: 2 additions & 2 deletions sim/sim2sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def run_mujoco(

policy_cfg = ActorCfg(embodiment=args.embodiment)
if args.embodiment == "gpr":
policy_cfg.cycle_time = 0.25
policy_cfg.cycle_time = 0.5
cfg = Sim2simCfg(
sim_duration=10.0,
dt=0.001,
Expand All @@ -337,7 +337,7 @@ def run_mujoco(
cycle_time=policy_cfg.cycle_time,
)

if args.load_model.endswith(".kinfer"):
if args.load_model.endswith(".kinfer") or args.load_model.endswith(".onnx"):
policy = ONNXModel(args.load_model)
else:
actor_model, sim2sim_info, input_tensors = get_actor_policy(args.load_model, policy_cfg)
Expand Down

0 comments on commit 4a01fc4

Please sign in to comment.