Skip to content

Commit 3512286

Browse files
committed
add a repr for Trajectory object
doco
1 parent 43c8a04 commit 3512286

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roboticstoolbox/tools/trajectory.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ def __str__(self):
5353
s = f"Trajectory created by {self.name}: {len(self)} time steps x {self.naxes} axes"
5454
return s
5555

56+
def __repr__(self):
57+
return str(self)
58+
5659
def __len__(self):
5760
"""
5861
Length of trajectory
@@ -529,7 +532,7 @@ def jtraj(q0, qf, tv, qd0=None, qd1=None):
529532
# n = len(q0)
530533

531534
tt = np.array([t**5, t**4, t**3, t**2, t, np.ones(t.shape)]).T
532-
coeffs = np.array([A, B, C, np.zeros(A.shape), E, F])
535+
coeffs = np.array([A, B, C, np.zeros(A.shape), E, F]) # 6xN
533536

534537
qt = tt @ coeffs
535538

0 commit comments

Comments
 (0)