Waypoint Missions¶
Waypoint-based missions are the simplest and most common way to program underwater vehicle missions.
What is a Waypoint?¶
A waypoint is a 3D point in space that the vehicle navigates to:
waypoint = {
'position': [x, y, z], # meters in NED frame
'tolerance': 0.5, # acceptance radius (meters)
'heading': 45, # optional heading (degrees)
'speed': 0.5, # optional speed (m/s)
'action': 'survey' # optional action at waypoint
}
Creating Waypoint Missions¶
Method 1: YAML File¶
mission_name: "Pipeline Survey"
waypoints:
- id: 0
position: [0, 0, -2]
heading: 90
action: descend
- id: 1
position: [20, 0, -5]
speed: 0.3
action: photo
- id: 2
position: [40, 0, -5]
action: photo
- id: 3
position: [40, 20, -5]
heading: 0
action: photo
- id: 4
position: [0, 20, 0]
action: surface
Method 2: Python API¶
from aqua import Mission, Waypoint
mission = Mission("Survey Mission")
mission.add_waypoint(Waypoint(0, 0, -2, heading=90))
mission.add_waypoint(Waypoint(20, 0, -5, speed=0.3, action="photo"))
mission.add_waypoint(Waypoint(40, 0, -5, action="photo"))
mission.add_waypoint(Waypoint(0, 20, 0, action="surface"))
mission.save("survey_mission.yaml")
mission.execute()
Method 3: QGroundControl¶
- Open QGroundControl
- Connect to vehicle
- Click "Plan" tab
- Add waypoints by clicking map
- Set altitude for each waypoint
- Upload to vehicle
Waypoint Types¶
Standard Waypoint¶
Vehicle navigates to position:
Loiter Waypoint¶
Hold position for duration:
Survey Waypoint¶
Take sensor readings:
Pass-Through Waypoint¶
Don't stop, just pass through:
Waypoint Actions¶
Actions executed upon reaching waypoint:
actions = {
'photo': take_photo(),
'video_start': start_video(),
'video_stop': stop_video(),
'sample': collect_sample(),
'loiter': hold_position(duration),
'survey': run_survey_pattern(),
'marker': drop_marker(),
'surface': ascend_to_surface(),
}
Advanced Features¶
Conditional Waypoints¶
- position: [20, 0, -5]
condition:
type: battery_level
operator: greater_than
value: 50 # percent
else_waypoint: 0 # return home if condition fails
Repeating Segments¶
Speed Profiles¶
- position: [0, 0, -2]
speed: 0.5 # approach slowly
- position: [50, 0, -5]
speed: 1.0 # transit quickly
- position: [50, 20, -5]
speed: 0.3 # slow for photo
Mission Planning Tools¶
Grid Survey Generator¶
from aqua.mission import GridSurvey
grid = GridSurvey(
origin=[0, 0, -5],
width=40,
height=20,
spacing=5,
heading=0,
altitude=-5
)
waypoints = grid.generate()
Circular Pattern¶
from aqua.mission import CircularPattern
circle = CircularPattern(
center=[10, 10, -5],
radius=5,
num_points=8
)
Spiral Search¶
from aqua.mission import SpiralSearch
spiral = SpiralSearch(
center=[20, 20, -10],
max_radius=15,
spacing=3,
revolutions=5
)
Best Practices¶
✓ DO: - Start missions at surface for safety - Include return-to-home waypoint - Test missions in simulation first - Set reasonable speeds (0.3-0.5 m/s) - Add geofence boundaries - Plan for battery capacity
✗DON'T: - Create vertical ascents/descents >1m/s - Space waypoints <1m apart - Exceed vehicle capabilities - Plan missions without safety margins - Forget to set depth limits
Next Steps¶
- Path Following - Follow continuous paths
- Behavior Trees - Complex mission logic
- First Mission Tutorial - Complete walkthrough