Skip to content

Commit

Permalink
General updates to use non-cython method as comparable
Browse files Browse the repository at this point in the history
  • Loading branch information
DasGuna committed Nov 30, 2023
1 parent dce28cb commit c4ae0af
Show file tree
Hide file tree
Showing 5 changed files with 861 additions and 5,012 deletions.
6 changes: 3 additions & 3 deletions armer/armer.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def global_collision_check(self, robot: ROSRobot):
debug=True
)
end = timeit.default_timer()
print(f"[KD Setup] full collision check: {1/(end-start)} hz")
# print(f"[KD Setup] full collision check: {1/(end-start)} hz")
# print(f"[Check Links] -> {check_links}")

# Alternative Method
Expand All @@ -323,7 +323,7 @@ def global_collision_check(self, robot: ROSRobot):
check_links = check_links
)
end = timeit.default_timer()
print(f"[Actual Link Check] full collision check: {1/(end-start)} hz")
# print(f"[Actual Link Check] full collision check: {1/(end-start)} hz")

if col_link_id >= 0:
rospy.logwarn(f"Global Collision Check -> Robot [{robot.name}] in collision with link {robot.collision_sliced_links[col_link_id].name}")
Expand Down Expand Up @@ -435,7 +435,7 @@ def update_dynamic_objects(self, robot: ROSRobot) -> None:
else:
# Check if the current robot has any newly added objects to add to the backend
# NOTE: this loop is run everytime at the moment (not an issue with limited shapes but needs better optimisation for scale)
for dynamic_obj in robot.dynamic_collision_dict.values():
for dynamic_obj in robot.dynamic_collision_dict.copy().values():
if dynamic_obj.is_added == False:
rospy.loginfo(f"Adding Dynamic Object: {dynamic_obj}")
dynamic_obj.id = self.backend.add(dynamic_obj.shape)
Expand Down
Loading

0 comments on commit c4ae0af

Please sign in to comment.