5 import pinocchio
as pin
9 from os.path import dirname, join, abspath
12 path = join(dirname(dirname(abspath(__file__))),
'models',
'example-robot-data',
'python')
14 from example_robot_data
import loadTalos
17 from panda3d_viewer
import ViewerClosedError
23 talos.loadViewerModel(group_name=
'talos', color=(1, 1, 1, 1))
30 traj = np.repeat(talos.q0.reshape((-1, 1)), cycle_time * update_rate, axis=1)
31 beta = np.linspace(0, 1, traj.shape[1])
32 traj[[2, 9, 10, 11, 22, 15, 16, 17, 30]] = (
33 0.39 + 0.685 * np.cos(beta),
45 talos.play(traj, 1. / update_rate)
46 traj = np.flip(traj, 1)
51 except ViewerClosedError:
def play_sample_trajectory()