Skip to content

Commit

Permalink
Addressing change requests
Browse files Browse the repository at this point in the history
 - change function `_create_position_events` description
 - change function `_create_position_events` name to `_create_head_pose_events`
 - use object attribute directly (instead of passing it by function argument)
 - apply black formatter
  • Loading branch information
Simon Maurer committed Jan 7, 2020
1 parent 6855994 commit 631e126
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def _on_recent_events(self, events):
self._calculate_current_markers(events["frame"])
self._calculate_current_pose(events["frame"])
self._save_key_markers()
events["head_pose"] = self._create_position_events(
self._localization_storage.current_pose)
events["head_pose"] = self._create_head_pose_events()

def _calculate_current_markers(self, frame):
self._detection_storage.current_markers = worker.online_detection(frame)
Expand All @@ -62,15 +61,12 @@ def _calculate_current_pose(self, frame):
self._camera_intrinsics,
)

def _create_position_events(self, current_pose):
def _create_head_pose_events(self):
"""
Adds position events to the current list of events.
Args:
current_pose: The current position of the head.
Creates head pose events to be added to the current list of events.
"""
position = {"topic": "head_pose"}
position.update(current_pose)
position.update(self._localization_storage.current_pose)
return [position]

def _save_key_markers(self):
Expand Down

0 comments on commit 631e126

Please sign in to comment.