forked from petercorke/robotics-toolbox-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_PyPlot.py
More file actions
50 lines (37 loc) · 1.03 KB
/
test_PyPlot.py
File metadata and controls
50 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
"""
@author: Jesse Haviland
"""
# import numpy.testing as nt
# import numpy as np
import roboticstoolbox as rp
# import spatialmath as sm
import unittest
class TestPyPlot(unittest.TestCase):
def test_PyPlot(self):
panda = rp.models.DH.Panda()
from roboticstoolbox.backends.PyPlot import PyPlot
env = PyPlot()
env.launch()
env.add(panda)
env.step()
# env._plot_handler(None, None)
env.close()
def test_PyPlot_invisible(self):
panda = rp.models.DH.Panda()
from roboticstoolbox.backends.PyPlot import PyPlot
env = PyPlot()
env.launch()
env.add(panda, display=False)
env.step()
# env._plot_handler(None, None)
env.close()
def test_unimplemented(self):
# TODO remove these as implemented
from roboticstoolbox.backends.PyPlot import PyPlot
env = PyPlot()
env.reset()
env.restart()
env.remove(0)
if __name__ == "__main__":
unittest.main()