Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
robotics
embodied-ai
human-demonstration
egocentric-video
bimanual-manipulation
tactile-sensing
License:
File size: 834 Bytes
9ff4bea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | from __future__ import annotations
import math
from typing import Any
class AngleExt:
"""Extension for [Angle][rerun.encodings.Angle]."""
def __init__(self: Any, rad: float | None = None, deg: float | None = None) -> None:
"""
Create a new instance of the Angle datatype.
Parameters
----------
rad:
Angle in radians, specify either `rad` or `deg`.
deg:
Angle in degrees, specify either `rad` or `deg`.
Converts the angle to radians internally.
"""
if rad is not None:
radians = rad
elif deg is not None:
radians = math.radians(deg)
else:
raise ValueError("Either `rad` or `deg` must be provided.")
self.__attrs_init__(
radians=radians,
)
|