Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Sep 4, 2023
1 parent a108286 commit c206bfb
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DBHelper:
Attributes:
found (bool): checks whether the object is what the user has been looking for.
nh (object): processes database requests.
nh (axros.NodeHandle): processes database requests.
position (int): the current position of the object.
rot (): one of the dimensional values.
new_object_subscriber (): an object that is being called from the database.
Expand All @@ -34,7 +34,7 @@ def __init__(self, nh):
Initialize the DB helper class.
Args:
nh(): database object
nh(NodeHandle): NodeHandle object
"""
self.found = set()
self.nh = nh
Expand All @@ -52,10 +52,7 @@ async def init_(self, navigator=None):
Initialize the axros parts of the DBHelper.
Args:
navigator (object): a navigator object is passed in.
Returns:
An object with set values is being returned.
navigator (NaviGator | None): Base NaviGator object
"""
# self._sub_database = yield self.nh.subscribe('/database/objects', PerceptionObjectArray, self.object_cb)
self._database = self.nh.get_service_client("/database/requests", ObjectDBQuery)
Expand All @@ -73,7 +70,7 @@ def _odom_cb(self, odom):
Sets the position and the rot values.
Args:
odom (object): odom, dimensional values, is being returned.
odom (object): Odom
"""
self.position, self.rot = nt.odometry_to_numpy(odom)[0]

Expand Down Expand Up @@ -147,7 +144,7 @@ def set_looking_for(self, name):
"""
self.looking_for = name

def is_found_func(self):
def is_found_func(self) -> bool:
"""
Determines whether the object is being found or not.
Expand Down Expand Up @@ -214,15 +211,15 @@ def stop_ensuring_object_permanence(self):
"""
self.ensuring_objects = False

def _wait_for_position(self, timeout=10):
def _wait_for_position(self, timeout=10) -> bool:
"""
A possible position is being stored in a variable.
Args:
timeout (int): time limit to retrieve something.
Returns:
Determines whether the position is found within the time limit.
bool: Determines whether the position is found within the time limit.
"""
count = 0
while self.position is None:
Expand Down

0 comments on commit c206bfb

Please sign in to comment.