Source code for sym.ops.atan_camera_cal.lie_group_ops
# -----------------------------------------------------------------------------# This file was autogenerated by symforce from template:# ops/CLASS/lie_group_ops.py.jinja# Do NOT modify by hand.# -----------------------------------------------------------------------------# ruff: noqa: PLR0915, F401, PLW0211, PLR0914importmathimporttypingasTimportnumpyimportsym
[docs]classLieGroupOps(object):""" Python LieGroupOps implementation for :py:class:`symforce.cam.atan_camera_cal.ATANCameraCal`. """
[docs]@staticmethoddeffrom_tangent(vec,epsilon):# type: (numpy.ndarray, float) -> sym.ATANCameraCal# Total ops: 0# Input arraysifvec.shape==(5,):vec=vec.reshape((5,1))elifvec.shape!=(5,1):raiseIndexError("vec is expected to have shape (5, 1) or (5,); instead had shape {}".format(vec.shape))# Intermediate terms (0)# Output terms_res=[0.0]*5_res[0]=vec[0,0]_res[1]=vec[1,0]_res[2]=vec[2,0]_res[3]=vec[3,0]_res[4]=vec[4,0]returnsym.ATANCameraCal.from_storage(_res)
[docs]@staticmethoddefretract(a,vec,epsilon):# type: (sym.ATANCameraCal, numpy.ndarray, float) -> sym.ATANCameraCal# Total ops: 5# Input arrays_a=a.dataifvec.shape==(5,):vec=vec.reshape((5,1))elifvec.shape!=(5,1):raiseIndexError("vec is expected to have shape (5, 1) or (5,); instead had shape {}".format(vec.shape))# Intermediate terms (0)# Output terms_res=[0.0]*5_res[0]=_a[0]+vec[0,0]_res[1]=_a[1]+vec[1,0]_res[2]=_a[2]+vec[2,0]_res[3]=_a[3]+vec[3,0]_res[4]=_a[4]+vec[4,0]returnsym.ATANCameraCal.from_storage(_res)