Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix manipulator names #129

Open
wants to merge 2 commits into
base: jazzy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clearpath_config/common/types/accessory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion clearpath_config/manipulators/types/manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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:
Expand Down