示例#1
0
def velocity_from_poses(t1: float, q1: SE2v, t2: float, q2: SE2v) -> se2v:
    delta = t2 - t1
    if not delta > 0:
        raise ValueError('invalid sequence')

    x = SE2.multiply(SE2.inverse(q1), q2)
    xt = SE2.algebra_from_group(x)
    v = xt / delta
    return v
示例#2
0
def velocity_from_poses(t1: float, q1: SE2value, t2: float,
                        q2: SE2value) -> SE2value:
    delta = t2 - t1
    if not delta > 0:
        msg = f"invalid delta {delta}"
        raise ValueError(msg)

    x = SE2.multiply(SE2.inverse(q1), q2)
    xt = SE2.algebra_from_group(x)
    v = xt / delta
    return v