-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into 1299-alexj-boat-dro…
…ne-comms
- Loading branch information
Showing
56 changed files
with
14,222 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
NaviGator/mission_control/navigator_launch/config/bounds_sarasota_a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
!!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
id: 0 | ||
name: Default | ||
parameters: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
parent: 0 | ||
state: true | ||
type: '' | ||
x1: 744450.0 | ||
x2: 744336.0 | ||
x3: 744342.0 | ||
x4: 744456.0 | ||
y1: -5618775.0 | ||
y2: -5618790.0 | ||
y3: -5618835.0 | ||
y4: -5618820.0 | ||
z1: 2915236.0 | ||
z2: 2915236.0 | ||
z3: 2915150.0 | ||
z4: 2915150.0 | ||
state: [] | ||
x1: 744450.0 | ||
x2: 744336.0 | ||
x3: 744342.0 | ||
x4: 744456.0 | ||
y1: -5618775.0 | ||
y2: -5618790.0 | ||
y3: -5618835.0 | ||
y4: -5618820.0 | ||
z1: 2915236.0 | ||
z2: 2915236.0 | ||
z3: 2915150.0 | ||
z4: 2915150.0 | ||
state: [] |
42 changes: 42 additions & 0 deletions
42
NaviGator/mission_control/navigator_launch/config/bounds_sarasota_b.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
!!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
id: 0 | ||
name: Default | ||
parameters: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
parent: 0 | ||
state: true | ||
type: '' | ||
x1: 744456.0 | ||
x2: 744342.0 | ||
x3: 744348.0 | ||
x4: 744463.0 | ||
y1: -5618820.0 | ||
y2: -5618835.0 | ||
y3: -5618885.0 | ||
y4: -5618870.0 | ||
z1: 2915149.0 | ||
z2: 2915149.0 | ||
z3: 2915052.0 | ||
z4: 2915052.0 | ||
state: [] | ||
x1: 744456.0 | ||
x2: 744342.0 | ||
x3: 744348.0 | ||
x4: 744463.0 | ||
y1: -5618820.0 | ||
y2: -5618835.0 | ||
y3: -5618885.0 | ||
y4: -5618870.0 | ||
z1: 2915149.0 | ||
z2: 2915149.0 | ||
z3: 2915052.0 | ||
z4: 2915052.0 | ||
state: [] |
42 changes: 42 additions & 0 deletions
42
NaviGator/mission_control/navigator_launch/config/bounds_sarasota_c.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
!!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
dictitems: | ||
frame: ecef | ||
groups: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
id: 0 | ||
name: Default | ||
parameters: !!python/object/new:dynamic_reconfigure.encoding.Config | ||
state: [] | ||
parent: 0 | ||
state: true | ||
type: '' | ||
x1: 744463.0 | ||
x2: 744349.0 | ||
x3: 744354.0 | ||
x4: 744468.0 | ||
y1: -5618871.0 | ||
y2: -5618886.0 | ||
y3: -5618926.0 | ||
y4: -5618911.0 | ||
z1: 2915050.0 | ||
z2: 2915050.0 | ||
z3: 2914972.0 | ||
z4: 2914972.0 | ||
state: [] | ||
x1: 744463.0 | ||
x2: 744349.0 | ||
x3: 744354.0 | ||
x4: 744468.0 | ||
y1: -5618871.0 | ||
y2: -5618886.0 | ||
y3: -5618926.0 | ||
y4: -5618911.0 | ||
z1: 2915050.0 | ||
z2: 2915050.0 | ||
z3: 2914972.0 | ||
z4: 2914972.0 | ||
state: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
global_frame: enu | ||
initial_pois: | ||
start_gate: [0, 0, 0] | ||
entrance_gate: [0, 0, 0] | ||
start_gate: [0, 0, 0, 0.0, 0.0, 0.0, 0.0] | ||
entrance_gate: [0, 0, 0, 0.0, 0.0, 0.0, 0.0] | ||
wildlife: [0, 0, 0, 0.0, 0.0, 0.0, 0.0] |
12 changes: 5 additions & 7 deletions
12
NaviGator/mission_control/navigator_launch/config/poi_sim.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
--- | ||
global_frame: enu | ||
initial_pois: | ||
circle_totems: [26.09821319580078, 59.91523361206055, 0.0] | ||
dock: [108.05, -1.07, 0.0] | ||
entrance_gate: [51.28, -48.69, 0.0] | ||
obstacle_course: [-32.803, -83.41, 0.0] | ||
ring_challenge: [61.271873474121094, 15.894840240478516, 0.0] | ||
start_gate: [12.75, 0.433, 0.0] | ||
stc: [49.49, -82.65, 0.0] | ||
wildlife: [-1.7053, 44.9246, 0.0] | ||
docking: [-3.24, 58.64265, 0.0] | ||
entrance_gate: [22.87, 8.66, 0.0] | ||
navigation: [46.6878, 23.3085, 0.0] | ||
scan_the_code: [29.868, 44.1452, 0.0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 10 additions & 5 deletions
15
NaviGator/mission_control/navigator_launch/launch/shore.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
<launch> | ||
<!-- Run Joystick --> | ||
<include file="$(find navigator_launch)/launch/shore/xbox_controller.launch" /> | ||
<arg name="wireless" default="False" /> | ||
<arg name="device_input" default="/dev/input/js0" unless="$(arg wireless)"/> | ||
|
||
<node name="network_heartbeat" pkg="mil_tools" type="network_broadcaster.py" output="screen" /> | ||
<!-- Run Joystick --> | ||
<include file="$(find navigator_launch)/launch/shore/xbox_controller.launch"> | ||
<arg name="device_input" value="$(arg device_input)"/> | ||
</include> | ||
|
||
<!-- Host Monitoring --> | ||
<node name="host_monitor" pkg="navigator_gui" type="host_monitor.py"/> | ||
<node name="network_heartbeat" pkg="mil_tools" type="network_broadcaster.py" output="screen" /> | ||
|
||
<!-- Host Monitoring --> | ||
<node name="host_monitor" pkg="navigator_gui" type="host_monitor.py"/> | ||
</launch> |
2 changes: 1 addition & 1 deletion
2
NaviGator/mission_control/navigator_launch/launch/shore/xbox_controller.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
NaviGator/mission_control/navigator_missions/navigator_missions/autonomous_2024.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from __future__ import annotations | ||
|
||
import asyncio | ||
import datetime | ||
|
||
from .entrance_gate2 import EntranceGate2 | ||
from .go_to_poi import GoToPOI | ||
from .navigator import NaviGatorMission | ||
from .wildlife import Wildlife | ||
|
||
|
||
class Autonomous2024(NaviGatorMission): | ||
|
||
# timeout (in secs) | ||
TIMEOUT = 180 | ||
|
||
async def run_mission( | ||
self, | ||
mission_cls: type[NaviGatorMission], | ||
name: str, | ||
*args, | ||
str_arg: str = "", | ||
**kwargs, | ||
): | ||
# self.send_feedback(f"beginning {name}...") | ||
try: | ||
await asyncio.wait_for( | ||
mission_cls().run(str_arg, *args, **kwargs), | ||
self.TIMEOUT, | ||
) | ||
except asyncio.TimeoutError: | ||
self.send_feedback(f"!!! ran out of time on {name}!") | ||
|
||
async def go_to_poi(self, name: str): | ||
await self.run_mission(GoToPOI, f"go to {name} poi", str_arg=name) | ||
|
||
def time_elapsed(self) -> str: | ||
last_min, last_sec = divmod( | ||
(datetime.datetime.now() - self._last_checkpoint).total_seconds(), | ||
60, | ||
) | ||
min, sec = divmod( | ||
(datetime.datetime.now() - self.start_time).total_seconds(), | ||
60, | ||
) | ||
self._last_checkpoint = datetime.datetime.now() | ||
return f"{int(min)}m {int(sec)}s (+{int(last_min)}m {int(last_sec)}s)" | ||
|
||
def send_feedback(self, msg: str): | ||
super().send_feedback(f"[autonomous, {self.time_elapsed()}] {msg}") | ||
|
||
async def run(self, args: str): | ||
# Step 1: Entrance gate | ||
self.start_time = datetime.datetime.now() | ||
self._last_checkpoint = self.start_time | ||
self.send_feedback("proceeding to entrance gate...") | ||
await self.go_to_poi("entrance_gate") | ||
self.send_feedback("starting entrance gate task...") | ||
await self.run_mission( | ||
EntranceGate2, | ||
"entrance gate", | ||
scan_code=True, | ||
return_to_start=False, | ||
circle=False, | ||
) | ||
|
||
# Step 2: Scan the Code | ||
# await self.run_mission(ScanTheCodeMission, "scan the code") | ||
|
||
# Step 3: Wildlife Mission | ||
self.send_feedback("going to wildlife poi...") | ||
await self.go_to_poi("wildlife") | ||
self.send_feedback("running wildlife mission...") | ||
await self.run_mission(Wildlife, "wildlife") | ||
|
||
# Step 4: Navigation Mission | ||
# await self.run_mission(Navigation, "navigation") | ||
|
||
# Step 5: Dock Mission | ||
# await self.run_mission(Docking, "docking") | ||
|
||
# Step 6: Exit through the same gate |
Oops, something went wrong.