bdaiinstitute / spatialmath-python

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
MIT License
519 stars 84 forks source link

SE2.norm() seems broken #55

Closed ilmagico closed 11 months ago

ilmagico commented 2 years ago

It seems that SE2.norm tries to call some trnorm2 function which is not defined. Here's how to reproduce, after cloning a fresh copy of this repo and pip install . in a virtualenv:

Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import spatialmath as sm
>>> sm.SE2().norm()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dtamino/oss/spatialmath-python/spatialmath/baseposematrix.py", line 541, in norm
    return self.__class__([base.trnorm2(x) for x in self.data])
  File "/home/dtamino/oss/spatialmath-python/spatialmath/baseposematrix.py", line 541, in <listcomp>
    return self.__class__([base.trnorm2(x) for x in self.data])
AttributeError: module 'spatialmath.base' has no attribute 'trnorm2'. Did you mean: 'trnorm'?
petercorke commented 2 years ago

trnorm2 never got written... It's on the list now.

myeatman-bdai commented 11 months ago

PR merged (https://github.com/bdaiinstitute/spatialmath-python/pull/89)