Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
robotics
embodied-ai
human-demonstration
egocentric-video
bimanual-manipulation
tactile-sensing
License:
Download player/runtime/python/Lib/site-packages/rerun/encodings/angle_ext.py from alinarus/MultimodalData: direct link, hf CLI and curl.
- Browser
- Download file 834 Bytes
-
https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/encodings/angle_ext.py
- Command line
-
hf download hf://datasets/alinarus/MultimodalData/player/runtime/python/Lib/site-packages/rerun/encodings/angle_ext.py
-
curl -L -o angle_ext.py https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/encodings/angle_ext.py
834 Bytes
| 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, | |
| ) | |