diff --git a/clearpath_config/common/types/accessory.py b/clearpath_config/common/types/accessory.py index 0bd60cb..a5af63c 100644 --- a/clearpath_config/common/types/accessory.py +++ b/clearpath_config/common/types/accessory.py @@ -205,4 +205,4 @@ def get_idx(self) -> str: def set_idx(self, idx: int) -> None: assert isinstance(idx, int), 'Index must be an integer' assert idx >= 0, 'Index must be a positive integer' - self.name = self.get_name_from_idx(idx) + self.idx = idx diff --git a/clearpath_config/manipulators/types/manipulator.py b/clearpath_config/manipulators/types/manipulator.py index 294c517..f748ff6 100644 --- a/clearpath_config/manipulators/types/manipulator.py +++ b/clearpath_config/manipulators/types/manipulator.py @@ -66,7 +66,7 @@ def __init__( super().__init__(idx, name, parent, xyz, rpy) def to_dict(self) -> dict: - d = {} + d = super().to_dict() d['model'] = self.get_manipulator_model() d['parent'] = self.get_parent() d['xyz'] = self.get_xyz() @@ -75,6 +75,7 @@ def to_dict(self) -> dict: return d def from_dict(self, d: dict) -> None: + super().from_dict(d) if 'parent' in d: self.set_parent(d['parent']) if 'xyz' in d: