petercorke / spatialmath-matlab

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Converting list of x,y,theta values to SE2 Object

LukasStu opened this issue · comments

commented

Hi,
I'm trying to convert a list of x,y,theta values to a SE2 Objekt. I used this function to do so.

def ar2se2(array):
    """Create se2-object from numpy array"""
    poselist = list(array)
    T = SE2().Empty()
    for p in poselist:
        T.append(SE2(p, unit='deg'))
    return T

Is there a more efficient way?

Thank you,

Lukas