diff --git a/urdfpy/urdf.py b/urdfpy/urdf.py index 14b0216..2542ce0 100644 --- a/urdfpy/urdf.py +++ b/urdfpy/urdf.py @@ -3472,6 +3472,7 @@ def animate(self, cfg_trajectory=None, loop_time=3.0, use_collision=False): ct = ct.reshape(-1, 1) if ct.ndim != 2 or ct.shape[1] != len(self.actuated_joints): raise ValueError('Cfg trajectory must have entry for each joint') + traj_len=ct.shape[0] ct_np = {j: ct[:,i] for i, j in enumerate(self.actuated_joints)} else: raise TypeError('Invalid type for cfg_trajectory: {}'