Main function.
()
| 55 | |
| 56 | |
| 57 | def main(): |
| 58 | """Main function.""" |
| 59 | # Load kit helper |
| 60 | sim_cfg = sim_utils.SimulationCfg(device=args_cli.device) |
| 61 | sim_cfg.dt = 1.0 / args_cli.output_fps |
| 62 | sim = SimulationContext(sim_cfg) |
| 63 | # Design scene |
| 64 | scene_cfg = ReplayMotionsSceneCfg(num_envs=1, env_spacing=2.0) |
| 65 | scene = InteractiveScene(scene_cfg) |
| 66 | # Play the simulator |
| 67 | sim.reset() |
| 68 | # Now we are ready! |
| 69 | print("[INFO]: Setup complete...") |
| 70 | # Run the simulator |
| 71 | run_simulator( |
| 72 | sim, |
| 73 | scene, |
| 74 | joint_names=[ |
| 75 | "left_hip_pitch_joint", |
| 76 | "left_hip_roll_joint", |
| 77 | "left_hip_yaw_joint", |
| 78 | "left_knee_joint", |
| 79 | "left_ankle_pitch_joint", |
| 80 | "left_ankle_roll_joint", |
| 81 | "right_hip_pitch_joint", |
| 82 | "right_hip_roll_joint", |
| 83 | "right_hip_yaw_joint", |
| 84 | "right_knee_joint", |
| 85 | "right_ankle_pitch_joint", |
| 86 | "right_ankle_roll_joint", |
| 87 | "waist_yaw_joint", |
| 88 | "waist_roll_joint", |
| 89 | "waist_pitch_joint", |
| 90 | "left_shoulder_pitch_joint", |
| 91 | "left_shoulder_roll_joint", |
| 92 | "left_shoulder_yaw_joint", |
| 93 | "left_elbow_joint", |
| 94 | "left_wrist_roll_joint", |
| 95 | "left_wrist_pitch_joint", |
| 96 | "left_wrist_yaw_joint", |
| 97 | "right_shoulder_pitch_joint", |
| 98 | "right_shoulder_roll_joint", |
| 99 | "right_shoulder_yaw_joint", |
| 100 | "right_elbow_joint", |
| 101 | "right_wrist_roll_joint", |
| 102 | "right_wrist_pitch_joint", |
| 103 | "right_wrist_yaw_joint", |
| 104 | ], |
| 105 | MotionLoaderCls=PKLMotionLoader, |
| 106 | ) |
| 107 | |
| 108 | |
| 109 | if __name__ == "__main__": |
no test coverage detected