From af2d1c46751d01aebcf8a7a37598d7960e3a79e4 Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 7 Mar 2024 18:37:30 +0100 Subject: [PATCH] Removed useless origin field in Link and added Pose for type hinting --- src/adam/model/abc_factories.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/adam/model/abc_factories.py b/src/adam/model/abc_factories.py index 9e406026..5f2c6fc1 100644 --- a/src/adam/model/abc_factories.py +++ b/src/adam/model/abc_factories.py @@ -7,6 +7,14 @@ from adam.core.spatial_math import SpatialMath +@dataclasses.dataclass +class Pose: + """Pose class""" + + xyz: List + rpy: List + + @dataclasses.dataclass class Joint(abc.ABC): """Base Joint class. You need to fill at least these fields""" @@ -17,7 +25,7 @@ class Joint(abc.ABC): child: str type: str axis: List - origin: List + origin: Pose limit: List idx: int """ @@ -71,7 +79,6 @@ class Link(abc.ABC): visuals: List inertial: Inertial collisions: List - origin: List @abc.abstractmethod def spatial_inertia(self) -> npt.ArrayLike: