8 from pathlib
import Path
14 path = Path(__file__).parent.parent /
"models" /
"example-robot-data" /
"python"
15 sys.path.append(str(path))
17 from panda3d_viewer
import ViewerClosedError
25 talos.loadViewerModel(group_name=
"talos", color=(1, 1, 1, 1))
32 traj = np.repeat(talos.q0.reshape((-1, 1)), cycle_time * update_rate, axis=1)
33 beta = np.linspace(0, 1, traj.shape[1])
34 traj[[2, 9, 10, 11, 22, 15, 16, 17, 30]] = (
35 0.39 + 0.685 * np.cos(beta),
47 talos.play(traj.T, 1.0 / update_rate)
48 traj = np.flip(traj, 1)
53 except ViewerClosedError: