Skip to content

Commit

Permalink
[MultiverseDev] changed how multiverse is searched for, and changed t…
Browse files Browse the repository at this point in the history
…he way contact points list is printed.
  • Loading branch information
AbdelrhmanBassiouny committed Oct 8, 2024
1 parent 4b5f262 commit efe3b58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pycram/datastructures/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def get_objects_that_have_points(self) -> List[Object]:
return list({point.link_b.object for point in self})

def __str__(self):
return f"ContactPointsList: {', '.join(self.get_names_of_objects_that_have_points())}"
return f"ContactPointsList: {', '.join([point.__str__() for point in self])}"

def __repr__(self):
return self.__str__()
Expand Down
7 changes: 4 additions & 3 deletions src/pycram/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def find_multiverse_path() -> Optional[str]:
"""
# Get the value of PYTHONPATH environment variable
pythonpath = os.getenv('PYTHONPATH')
multiverse_relative_path = "Multiverse/multiverse"

# Check if PYTHONPATH is set
if pythonpath:
Expand All @@ -108,8 +109,8 @@ def find_multiverse_path() -> Optional[str]:

# Iterate through each path and check if 'Multiverse' is in it
for path in paths:
if 'multiverse' in path:
multiverse_path = path.split('multiverse')[0]
return multiverse_path + 'multiverse'
if multiverse_relative_path in path:
multiverse_path = path.split(multiverse_relative_path)[0]
return multiverse_path + multiverse_relative_path


0 comments on commit efe3b58

Please sign in to comment.