Skip to content

Commit

Permalink
fix navigation merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Emerson-Ramey committed Mar 4, 2024
1 parent 1d277cd commit cd678cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 33 deletions.
4 changes: 1 addition & 3 deletions config/navigation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ search:
segments_per_rotation: 8
distance_between_spirals: 3

<<<<<<< HEAD
water_bottle_search:
stop_thresh: 0.5
drive_fwd_thresh: 0.34
coverage_radius: 10
segments_per_rotation: 8
=======

object_search:
coverage_radius: 10
>>>>>>> origin/integration
distance_between_spirals: 3

single_fiducial:
Expand Down
6 changes: 0 additions & 6 deletions src/navigation/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
import rospy
import tf2_ros
from geometry_msgs.msg import Twist
<<<<<<< HEAD

from util.SE3 import SE3

from mrover.msg import Waypoint, GPSWaypoint, WaypointType, GPSPointList, Course as CourseMsg
=======
from mrover.msg import (
Waypoint,
GPSWaypoint,
Expand All @@ -24,7 +19,6 @@
LongRangeTag,
LongRangeTags,
)
>>>>>>> origin/integration
from mrover.srv import EnableAuton, EnableAutonRequest, EnableAutonResponse
from navigation.drive import DriveController
from navigation import approach_post, long_range, approach_object
Expand Down
11 changes: 1 addition & 10 deletions src/navigation/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
from navigation.search import SearchState
from navigation.state import DoneState, OffState, off_check
from navigation.waypoint import WaypointState
<<<<<<< HEAD
from navigation.water_bottle_search import WaterBottleSearchState
=======
from navigation.approach_object import ApproachObjectState
from navigation.long_range import LongRangeState
>>>>>>> origin/integration


class Navigation(threading.Thread):
Expand Down Expand Up @@ -56,18 +53,12 @@ def __init__(self, context: Context):
[
PostBackupState(),
ApproachPostState(),
<<<<<<< HEAD
SearchState(),
RecoveryState(),
DoneState(),
WaterBottleSearchState(),
=======
ApproachObjectState(),
WaterBottleSearchState(),
LongRangeState(),
SearchState(),
RecoveryState(),
DoneState(),
>>>>>>> origin/integration
],
)
self.state_machine.add_transitions(ApproachObjectState(), [DoneState(), SearchState(), RecoveryState()])
Expand Down
16 changes: 2 additions & 14 deletions src/navigation/waypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
from util.ros_utils import get_rosparam
from util.state_lib.state import State

<<<<<<< HEAD
from navigation import search, recovery, approach_post, post_backup, state, water_bottle_search
from navigation import search, recovery, approach_post, post_backup, state, approach_object, long_range, water_bottle_search
from mrover.msg import WaypointType
=======
from navigation import search, recovery, approach_post, post_backup, state, approach_object, long_range
>>>>>>> origin/integration


class WaypointState(State):
Expand Down Expand Up @@ -53,22 +49,14 @@ def on_loop(self, context) -> State:
self.DRIVE_FWD_THRESH,
)
if arrived:
<<<<<<< HEAD
if current_waypoint.type.val == WaypointType.NO_SEARCH:
if not context.course.look_for_post() and not context.course.look_for_object():
# We finished a regular waypoint, go onto the next one
context.course.increment_waypoint()
elif current_waypoint.type.val == WaypointType.WATER_BOTTLE:
# We finished a waypoint associated with the water bottle, but we have not seen it yet
return water_bottle_search.WaterBottleSearchState()
else:
# We finished a waypoint associated with a tag id or the mallet, but we have not seen it yet.
=======
if not context.course.look_for_post() and not context.course.look_for_object():
# We finished a regular waypoint, go onto the next one
context.course.increment_waypoint()
elif context.course.look_for_post() or context.course.look_for_object():
# We finished a waypoint associated with a post or mallet, but we have not seen it yet.
>>>>>>> origin/integration
return search.SearchState()

if context.rover.stuck:
Expand Down

0 comments on commit cd678cf

Please sign in to comment.