Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
qhdwight committed Oct 14, 2023
1 parent 51039c8 commit 5317848
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/navigation/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
tf_broadcaster: tf2_ros.StaticTransformBroadcaster = tf2_ros.StaticTransformBroadcaster()




@dataclass
class Rover:
ctx: Context
Expand Down Expand Up @@ -106,7 +104,6 @@ def current_fid_pos(self, odom_override: bool = True) -> Optional[np.ndarray]:
return self.get_fid_pos(current_waypoint.fiducial_id, in_odom)



@dataclass
class Course:
ctx: Context
Expand Down Expand Up @@ -141,7 +138,6 @@ def current_waypoint(self) -> Optional[mrover.msg.Waypoint]:
return None
return self.course_data.waypoints[self.waypoint_index]


def look_for_post(self) -> bool:
"""
Returns whether the currently active waypoint (if it exists) indicates
Expand Down
1 change: 1 addition & 0 deletions src/navigation/recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class RecoveryStateTransitions(Enum):
continue_post_backup = "PostBackupState"
recovery_state = "RecoveryState"


class JTurnAction(Enum):
moving_back: Enum = 0
j_turning: Enum = 1
Expand Down
4 changes: 2 additions & 2 deletions src/navigation/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def evaluate(self, ud):
)
self.context.rover.send_drive_command(cmd_vel)

# if we see the fiduicial go to either fiducial
# if we see the fiduicial go to either fiducial
if self.context.env.current_fid_pos() is not None and self.context.course.look_for_post():
return SearchStateTransitions.found_fiducial_post.name # type: ignore

return SearchStateTransitions.continue_search.name # type: ignore

0 comments on commit 5317848

Please sign in to comment.