Verified Commit 173460c0 authored by Igor Kalevatykh's avatar Igor Kalevatykh Committed by Justin Carpentier
Browse files

Python binding: remove unnecessary dimension

parent bec127ee
......@@ -18,7 +18,6 @@ from panda3d_viewer import ViewerClosedError
from pinocchio.visualize.panda3d_visualizer import Panda3dVisualizer
talos = loadTalos()
nq = talos.model.nq
talos.setVisualizer(Panda3dVisualizer())
talos.initViewer()
talos.loadViewerModel(group_name='talos', color=(1, 1, 1, 1))
......@@ -28,7 +27,7 @@ talos.loadViewerModel(group_name='talos', color=(1, 1, 1, 1))
def play_sample_trajectory():
update_rate = 60
cycle_time = 3
traj = np.repeat(talos.q0.reshape((nq,1)), cycle_time * update_rate, axis=1)
traj = np.repeat(talos.q0.reshape((-1, 1)), cycle_time * update_rate, axis=1)
beta = np.linspace(0, 1, traj.shape[1])
traj[[2, 9, 10, 11, 22, 15, 16, 17, 30]] = (
0.39 + 0.685 * np.cos(beta),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment