uav.modes.NavGPSMode#

Classes#

NavGPSParams

coordinates: The coordinates to navigate to (x/y/z or lon/lat/alt, wait time, GPS/LOCAL).

NavGPSMode

A mode for navigating to a GPS coordinate

Module Contents#

class NavGPSParams#

Bases: vehicle_common.mode_loader.ParamsBase

coordinates: The coordinates to navigate to (x/y/z or lon/lat/alt, wait time, GPS/LOCAL).

Local are NED coordinates, relative to the starting position (https://docs.px4.io/main/en/ros2/user_guide.html#ros-2-px4-frame-conventions).

margin: The margin of error for the GPS coordinate.

coordinates: list[tuple[tuple[float, float, float], float, Literal['GPS', 'LOCAL']]]#
margin: float = 1#
class NavGPSMode#

Bases: vehicle_common.mode.Mode[uav.vehicles.UAV.UAV, NavGPSParams]

A mode for navigating to a GPS coordinate

initialize(node: rclpy.node.Node, vehicle: uav.vehicles.UAV.UAV, params: NavGPSParams) None#
on_update(time_delta: float) None#

Periodic logic for setting gps coord.

get_local_target() tuple[float, float, float]#

Get the local target of the UAV.

Returns:

The local target of the UAV.

Return type:

tuple[float, float, float]

check_status() str#

Check the status of the mode.

Returns:

The status of the mode.

Return type:

str