Skip to content

Commit

Permalink
Add test for #342 fkine trajectory
Browse files Browse the repository at this point in the history
  • Loading branch information
jhavl committed Apr 19, 2023
1 parent 083cdc4 commit 0630aba
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tests/test_ETS.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,32 @@ def test_fkine_sym(self):
)
# nt.assert_almost_equal(r2.fkine(q2, tool=tool), ans6) # type: ignore

def test_fkine_traj(self):
robot = rtb.ERobot(
[
rtb.Link(rtb.ET.Rx()),
rtb.Link(rtb.ET.Ry()),
rtb.Link(rtb.ET.Rz()),
rtb.Link(rtb.ET.tx()),
rtb.Link(rtb.ET.ty()),
rtb.Link(rtb.ET.tz()),
]
)

ets = robot.ets()

qt = np.arange(10 * ets.n).reshape(10, ets.n)

T_individual = []

for q in qt:
T_individual.append(ets.eval(q))

T_traj = ets.eval(qt)

for i in range(10):
nt.assert_allclose(T_traj[i, :, :], T_individual[i])

def test_jacob0_panda(self):
deg = np.pi / 180
mm = 1e-3
Expand Down Expand Up @@ -4342,5 +4368,4 @@ def test_manip_fail2(self):


if __name__ == "__main__":

unittest.main()

0 comments on commit 0630aba

Please sign in to comment.