8000 Merge branch 'master' of https://github.com/petercorke/robotics-toolb… · A905275/robotics-toolbox-python@7cb3abc · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cb3abc

Browse files
committed
2 parents 4a184b4 + bc3f2cc commit 7cb3abc

File tree

4 files changed

+327
-295
lines changed

4 files changed

+327
-295
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
pip install .[dev,collision,vpython]
3030
pip install pytest-timeout
31-
pytest --timeout=30 --timeout_method thread -s
31+
pytest --timeout=50 --timeout_method thread -s
3232
codecov:
3333
# If all tests pass:
3434
# Run coverage and upload to codecov

roboticstoolbox/examples/swift_benchmark.py

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,37 @@
1212
env.launch()
1313

1414

15-
panda = rtb.models.Panda()
16-
panda.q = panda.qr
17-
env.add(panda, show_robot=True)
15+
# panda = rtb.models.Panda()
16+
# panda.q = panda.qr
17+
# env.add(panda, show_robot=True)
1818

1919

20-
ev = [0.01, 0, 0, 0, 0, 0]
21-
panda.qd = np.linalg.pinv(panda.jacobe(panda.q, fast=True)) @ ev
22-
env.step(0.001)
20+
# ev = [0.01, 0, 0, 0, 0, 0]
21+
# panda.qd = np.linalg.pinv(panda.jacobe(panda.q, fast=True)) @ ev
22+
# env.step(0.001)
2323

2424

25-
def stepper():
26-
for i in range(10000):
27-
panda.qd = np.linalg.pinv(panda.jacob0(panda.q, fast=True)) @ ev
28-
# panda.jacob0(panda.q, fast=True)
25+
# def stepper():
26+
# for i in range(10000):
27+
# panda.qd = np.linalg.pinv(panda.jacob0(panda.q, fast=True)) @ ev
28+
# # panda.jacob0(panda.q, fast=True)
29+
30+
# # panda.fkine_all_fast(panda.q)
31+
# env.step(0.001)
32+
2933

30-
# panda.fkine_all_fast(panda.q)
31-
env.step(0.001)
34+
import spatialgeometry as sg
35+
import spatialmath as sm
3236

37+
b1 = sg.Box(scale=[0.2, 0.1, 0.2], base=sm.SE3(1.0, 1, 1))
38+
b2 = sg.Cylinder(radius=0.2, length=0.8, base=sm< 6BE7 /span>.SE3(0.0, 1, 1))
39+
40+
env.add(b1)
41+
env.add(b2)
42+
43+
def stepper():
44+
for i in range(100000):
45+
a, b, c = b1.closest_point(b2, inf_dist=4.0, homogenous=False)
3346

47+
a, b, c = b1.closest_point(b2, inf_dist=4.0, homogenous=False)
3448
cProfile.run("stepper()")

0 commit comments

Comments
 (0)
0