Skip to content

Commit 6294dc0

Browse files
committed
Merge branch 'master' of github.com:petercorke/spatialmath-python
# Conflicts: # spatialmath/pose3d.py fix axis length
2 parents d089776 + feeaa36 commit 6294dc0

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
max-parallel: 2
17+
matrix:
18+
os: [ubuntu-latest]
19+
python-version: [3.8]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -U setuptools wheel twine
31+
- name: Build and publish
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
ls ./dist/*.whl
38+
twine upload dist/*.gz
39+
twine upload dist/*.whl

spatialmath/base/transforms2d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,8 @@ def trplot2(
10591059

10601060
# create unit vectors in homogeneous form
10611061
o = T @ np.array([0, 0, 1])
1062-
x = T @ np.array([1, 0, 1]) * length
1063-
y = T @ np.array([0, 1, 1]) * length
1062+
x = T @ np.array([length, 0, 1])
1063+
y = T @ np.array([0, length, 1])
10641064

10651065
# draw the axes
10661066

spatialmath/pose3d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,9 +1570,13 @@ def Rt(cls, R, t=None, check=True):
15701570
else:
15711571
raise ValueError('expecting SO3 or rotation matrix')
15721572

1573+
<<<<<<< HEAD
15731574
if t is None:
15741575
t = np.zeros((3,))
15751576
return cls(base.rt2tr(R, t))
1577+
=======
1578+
return cls(base.rt2tr(R, t, check=check), check=check)
1579+
>>>>>>> feeaa3639699359e3af0c2b29949edde096af8f2
15761580

15771581
def angdist(self, other, metric=6):
15781582
r"""

0 commit comments

Comments
 (0)