sdk

package
v1.3.1-0...-aae603d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: GPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFieldNotPresent    = errors.New("field not present, returning default value")
	ErrCannotVerify       = errors.New("couldn't verify expecation but command completed")
	ErrFailedExpectation  = errors.New("command stalled but setpoint was not reached")
	ErrPermissionDenied   = errors.New("command permission denied by the vehicle")
	ErrTimeout            = errors.New("timeout occured before command could complete")
	ErrFailedPrecondition = errors.New("command failed because a pre-condition was not met")
	ErrUnimplemented      = errors.New("command is not implemented by this service")
	ErrInternal           = errors.New("service experienced an internal error")
	ErrCancelled          = errors.New("setpoint changed by new command")
	ErrContextExpired     = errors.New("context has expired")
)

Sentinel errors for the SDK.

Functions

This section is empty.

Types

type AlertInfo

type AlertInfo interface {
	// #exclude-ifndef messages/telemetry/AlertInfo/battery_warning
	GetBatteryWarning() enums.AlertInfo_BatteryWarning
	// #exclude-ifndef messages/telemetry/AlertInfo/gps_warning
	GetGpsWarning() enums.AlertInfo_GpsWarning
	// #exclude-ifndef messages/telemetry/AlertInfo/magnetometer_warning
	GetMagnetometerWarning() enums.AlertInfo_MagnetometerWarning
	// #exclude-ifndef messages/telemetry/AlertInfo/connection_warning
	GetConnectionWarning() enums.AlertInfo_ConnectionWarning
	// #exclude-ifndef messages/telemetry/AlertInfo/compass_warning
	GetCompassWarning() enums.AlertInfo_CompassWarning
}

type BatteryInfo

type BatteryInfo interface {
	// #exclude-ifndef messages/telemetry/BatteryInfo/percentage
	GetPercentage() (uint32, error)
	// contains filtered or unexported methods
}

type BoundingBox

type BoundingBox interface {
	// #exclude-ifndef messages/result/BoundingBox/y_min
	GetYMin() float64
	// #exclude-ifndef messages/result/BoundingBox/x_min
	GetXMin() float64
	// #exclude-ifndef messages/result/BoundingBox/y_max
	GetYMax() float64
	// #exclude-ifndef messages/result/BoundingBox/x_max
	GetXMax() float64
}

type Camera

type Camera struct {
	// Type of the camera ("rgb" e.g.)
	Type string `toml:"type"`
	// Horizontal resolution of the camera
	HRes uint32 `toml:"hres"`
	// Vertical resolution of the camera
	VRes uint32 `toml:"vres"`
	// Horizontal FOV of the camera
	HFov uint32 `toml:"hfov"`
	// Vertical FOV of the camera
	VFov uint32 `toml:"vfov"`
	// Maximum FPS of the camera
	Fps uint32 `toml:"fps"`
	// Average latency of camera frames
	Latency float32 `toml:"latency"`
	// Whether or not the camera is mounted on the primary gimbal
	Gimbal bool `toml:"gimbal"`
}

Camera holds information about a vehicle camera.

type CapFile

type CapFile struct {
	// Device information
	Device Device `toml:"device"`
	// Camera information
	Cameras []Camera `toml:"cameras"`
	// Unsupported type information
	Unsupported Unsupported `toml:"unsupported"`
	// contains filtered or unexported fields
}

CapFile stores data about the static parameters of a vehicle and which methods, fields, and enums from the SDK that it supports. Can be used to scrub the SDK and create a compiler overlay that omits unsupported types.

func ParseCapFromBytes

func ParseCapFromBytes(content []byte) (*CapFile, error)

ParseCapFromBytes parses a cap file from a TOML byte slice.

func ParseCapFromFile

func ParseCapFromFile(filepath string) (*CapFile, error)

ParseCapFromFile parses a cap file from a filepath.

func (*CapFile) Supports

func (c *CapFile) Supports(name string) bool

Supports checks if a cap file supports a type name.

type CompileError

type CompileError struct {
	Err    error  // the underlying error
	File   string // the file the error originates from
	LineNo uint32 // the line number the error originates from (optional)
}

CompileError represents an error generated by any part of the compile stack, from the overlayer to the actual compiler.

func CreateOverlay

func CreateOverlay(capFile *CapFile, sdkTypes, dslTypes map[string][]string, pkgs []*packages.Package) (map[string][]byte, []*CompileError)

CreateOverlay creates a Go compiler overlay that replaces source files with files scrubbed according to pre-processor directives, and rewrites sdk/params/params.go and dsl/swarm/swarm.go to declare the params/swarm constants named by sdkParams and dslSwarm respectively (see preprocess.GenerateConsts).

func (*CompileError) Error

func (e *CompileError) Error() string

Error implements the error interface, so a *CompileError can be used anywhere a plain error is expected.

func (*CompileError) Unwrap

func (e *CompileError) Unwrap() error

Unwrap returns the underlying error, so errors.Is and errors.As can see past a CompileError to whatever it wraps.

type ComputeResult

type ComputeResult interface {
	// #exclude-ifndef messages/result/ComputeResult/timestamp
	GetTimestamp() (*timestamppb.Timestamp, error)

	// #exclude-ifndef messages/result/ComputeResult/detection_result
	GetDetectionResult() (DetectionResult, error)

	// #exclude-ifndef messages/result/ComputeResult/guidance_result
	GetGuidanceResult() (GuidanceResult, error)

	// #exclude-ifndef messages/result/ComputeResult/slam_result
	GetSlamResult() (SlamResult, error)

	// #exclude-ifndef messages/result/ComputeResult/generic_result
	GetGenericResult() []byte
	// contains filtered or unexported methods
}

type Detection

type Detection interface {
	// #exclude-ifndef messages/result/Detection/class_name
	GetClassName() string
	// #exclude-ifndef messages/result/Detection/score
	GetScore() float64
	// #exclude-ifndef messages/result/Detection/bbox
	GetBbox() (BoundingBox, error)
	// contains filtered or unexported methods
}

type DetectionResult

type DetectionResult interface {
	// #exclude-ifndef messages/result/DetectionResult/detections
	GetDetections() []Detection
}

type Device

type Device struct {
	// Model name of the device
	Model string `toml:"model"`
	// Manufacturer name of the device
	Manufacturer string `toml:"manufacturer"`
	// Type of the device ("copter" e.g.)
	Type string `toml:"type"`
}

Device holds information about the vehicle.

type GetVehicleInfoResponse

type GetVehicleInfoResponse interface {
	// #exclude-ifndef services/info/GetVehicleInfoResponse/model
	GetModel() string
}

type GimbalInfo

type GimbalInfo interface {
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_body
	GetPoseBody() (GimbalInfo_PoseBody, error)

	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_neu
	GetPoseNeu() (GimbalInfo_PoseNeu, error)

	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_body
	GetAngularVelocityBody() (GimbalInfo_AngularVelocityBody, error)

	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_neu
	GetAngularVelocityNeu() (GimbalInfo_AngularVelocityNeu, error)

	// #exclude-ifndef messages/telemetry/GimbalInfo/gimbal_setpoint
	GetGimbalSetpoint() (*anypb.Any, error)
	// contains filtered or unexported methods
}

type GimbalInfo_AngularVelocityBody

type GimbalInfo_AngularVelocityBody interface {
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_body/pitch_vel
	GetPitchVel() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_body/roll_vel
	GetRollVel() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_body/yaw_vel
	GetYawVel() (float32, error)
}

type GimbalInfo_AngularVelocityNeu

type GimbalInfo_AngularVelocityNeu interface {
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_neu/pitch_vel
	GetPitchVel() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_neu/roll_vel
	GetRollVel() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/angular_velocity_neu/yaw_vel
	GetYawVel() (float32, error)
}

type GimbalInfo_PoseBody

type GimbalInfo_PoseBody interface {
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_body/pitch
	GetPitch() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_body/roll
	GetRoll() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_body/yaw
	GetYaw() (float32, error)
}

type GimbalInfo_PoseNeu

type GimbalInfo_PoseNeu interface {
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_neu/pitch
	GetPitch() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_neu/roll
	GetRoll() (float32, error)
	// #exclude-ifndef messages/telemetry/GimbalInfo/pose_neu/yaw
	GetYaw() (float32, error)
}

type GpsInfo

type GpsInfo interface {
	// #exclude-ifndef messages/telemetry/GpsInfo/satellites
	GetSatellites() (uint32, error)
	// contains filtered or unexported methods
}

type GuidanceResult

type GuidanceResult interface {
	// #exclude-ifndef messages/result/GuidanceResult/trajectory
	GetTrajectory() (GuidanceResult_Trajectory, error)
	// contains filtered or unexported methods
}

type GuidanceResult_Trajectory

type GuidanceResult_Trajectory interface {
	// #exclude-ifndef messages/result/GuidanceResult/trajectory/x_vel
	GetXVel() (float32, error)
	// #exclude-ifndef messages/result/GuidanceResult/trajectory/y_vel
	GetYVel() (float32, error)
	// #exclude-ifndef messages/result/GuidanceResult/trajectory/z_vel
	GetZVel() (float32, error)
	// #exclude-ifndef messages/result/GuidanceResult/trajectory/angular_vel
	GetAngularVel() (float32, error)
}

type HoldResponse

type HoldResponse interface {
	// #exclude-ifndef services/control/HoldResponse/expected_mode
	GetExpectedMode() enums.Mode
	// #exclude-ifndef services/control/HoldResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
}

type KillResponse

type KillResponse interface {
	// #exclude-ifndef services/control/KillResponse/expected_mode
	GetExpectedMode() enums.Mode
	// #exclude-ifndef services/control/KillResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
}

type LandResponse

type LandResponse interface {
	// #exclude-ifndef services/control/LandResponse/expected_mode
	GetExpectedMode() enums.Mode
	// #exclude-ifndef services/control/LandResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
}

type PositionInfo

type PositionInfo interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/home
	GetHome() (PositionInfo_Home, error)

	// #exclude-ifndef messages/telemetry/PositionInfo/global_position
	GetGlobalPosition() (PositionInfo_GlobalPosition, error)

	// #exclude-ifndef messages/telemetry/PositionInfo/relative_position
	GetRelativePosition() (PositionInfo_RelativePosition, error)

	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_body
	GetVelocityBody() (PositionInfo_VelocityBody, error)

	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_neu
	GetVelocityNeu() (PositionInfo_VelocityNeu, error)

	// #exclude-ifndef messages/telemetry/PositionInfo/setpoint
	GetSetpoint() (*anypb.Any, error)
	// contains filtered or unexported methods
}

type PositionInfo_GlobalPosition

type PositionInfo_GlobalPosition interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/global_position/latitude
	GetLatitude() (float64, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/global_position/longitude
	GetLongitude() (float64, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/global_position/altitude
	GetAltitude() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/global_position/heading
	GetHeading() (float32, error)
}

type PositionInfo_Home

type PositionInfo_Home interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/home/latitude
	GetLatitude() (float64, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/home/longitude
	GetLongitude() (float64, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/home/altitude
	GetAltitude() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/home/heading
	GetHeading() (float32, error)
}

type PositionInfo_RelativePosition

type PositionInfo_RelativePosition interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/relative_position/x
	GetX() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/relative_position/y
	GetY() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/relative_position/z
	GetZ() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/relative_position/angle
	GetAngle() (float32, error)
}

type PositionInfo_VelocityBody

type PositionInfo_VelocityBody interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_body/x_vel
	GetXVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_body/y_vel
	GetYVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_body/z_vel
	GetZVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_body/angular_vel
	GetAngularVel() (float32, error)
}

type PositionInfo_VelocityNeu

type PositionInfo_VelocityNeu interface {
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_neu/x_vel
	GetXVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_neu/y_vel
	GetYVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_neu/z_vel
	GetZVel() (float32, error)
	// #exclude-ifndef messages/telemetry/PositionInfo/velocity_neu/angular_vel
	GetAngularVel() (float32, error)
}

type ReturnToHomeResponse

type ReturnToHomeResponse interface {
	// #exclude-ifndef services/control/ReturnToHomeResponse/expected_mode
	GetExpectedMode() enums.Mode
	// #exclude-ifndef services/control/ReturnToHomeResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
}

type SetGimbalAngleTargetResponse

type SetGimbalAngleTargetResponse interface {
	// #exclude-ifndef services/control/SetGimbalAngleTargetResponse/setpoint
	GetSetpoint() (SetGimbalAngleTargetResponse_Setpoint, error)
	// contains filtered or unexported methods
}

type SetGimbalAngleTargetResponse_Setpoint

type SetGimbalAngleTargetResponse_Setpoint interface {
	// #exclude-ifndef services/control/SetGimbalAngleTargetResponse/setpoint/pitch
	GetPitch() (float32, error)
	// #exclude-ifndef services/control/SetGimbalAngleTargetResponse/setpoint/roll
	GetRoll() (float32, error)
	// #exclude-ifndef services/control/SetGimbalAngleTargetResponse/setpoint/yaw
	GetYaw() (float32, error)
}

type SetGimbalVelocityTargetResponse

type SetGimbalVelocityTargetResponse interface {
	// #exclude-ifndef services/control/SetGimbalVelocityTargetResponse/setpoint
	GetSetpoint() (SetGimbalVelocityTargetResponse_Setpoint, error)
	// contains filtered or unexported methods
}

type SetGimbalVelocityTargetResponse_Setpoint

type SetGimbalVelocityTargetResponse_Setpoint interface {
	// #exclude-ifndef services/control/SetGimbalVelocityTargetResponse/setpoint/pitch_vel
	GetPitchVel() (float32, error)
	// #exclude-ifndef services/control/SetGimbalVelocityTargetResponse/setpoint/roll_vel
	GetRollVel() (float32, error)
	// #exclude-ifndef services/control/SetGimbalVelocityTargetResponse/setpoint/yaw_vel
	GetYawVel() (float32, error)
}

type SetGlobalPositionTargetResponse

type SetGlobalPositionTargetResponse interface {
	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/setpoint
	GetSetpoint() (SetGlobalPositionTargetResponse_Setpoint, error)

	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
	// contains filtered or unexported methods
}

type SetGlobalPositionTargetResponse_Setpoint

type SetGlobalPositionTargetResponse_Setpoint interface {
	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/setpoint/latitude
	GetLatitude() (float64, error)
	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/setpoint/longitude
	GetLongitude() (float64, error)
	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/setpoint/altitude
	GetAltitude() (float32, error)
	// #exclude-ifndef services/control/SetGlobalPositionTargetResponse/setpoint/heading
	GetHeading() (float32, error)
}

type SetRelativePositionTargetResponse

type SetRelativePositionTargetResponse interface {
	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/setpoint
	GetSetpoint() (SetRelativePositionTargetResponse_Setpoint, error)

	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
	// contains filtered or unexported methods
}

type SetRelativePositionTargetResponse_Setpoint

type SetRelativePositionTargetResponse_Setpoint interface {
	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/setpoint/x
	GetX() (float32, error)
	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/setpoint/y
	GetY() (float32, error)
	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/setpoint/z
	GetZ() (float32, error)
	// #exclude-ifndef services/control/SetRelativePositionTargetResponse/setpoint/angle
	GetAngle() (float32, error)
}

type SetVelocityTargetResponse

type SetVelocityTargetResponse interface {
	// #exclude-ifndef services/control/SetVelocityTargetResponse/setpoint
	GetSetpoint() (SetVelocityTargetResponse_Setpoint, error)

	// #exclude-ifndef services/control/SetVelocityTargetResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
	// contains filtered or unexported methods
}

type SetVelocityTargetResponse_Setpoint

type SetVelocityTargetResponse_Setpoint interface {
	// #exclude-ifndef services/control/SetVelocityTargetResponse/setpoint/x_vel
	GetXVel() (float32, error)
	// #exclude-ifndef services/control/SetVelocityTargetResponse/setpoint/y_vel
	GetYVel() (float32, error)
	// #exclude-ifndef services/control/SetVelocityTargetResponse/setpoint/z_vel
	GetZVel() (float32, error)
	// #exclude-ifndef services/control/SetVelocityTargetResponse/setpoint/angular_vel
	GetAngularVel() (float32, error)
}

type SlamResult

type SlamResult interface {
	// #exclude-ifndef messages/result/SlamResult/relative_position
	GetRelativePosition() (SlamResult_RelativePosition, error)

	// #exclude-ifndef messages/result/SlamResult/global_position
	GetGlobalPosition() (SlamResult_GlobalPosition, error)
	// contains filtered or unexported methods
}

type SlamResult_GlobalPosition

type SlamResult_GlobalPosition interface {
	// #exclude-ifndef messages/result/SlamResult/global_position/latitude
	GetLatitude() (float64, error)
	// #exclude-ifndef messages/result/SlamResult/global_position/longitude
	GetLongitude() (float64, error)
	// #exclude-ifndef messages/result/SlamResult/global_position/altitude
	GetAltitude() (float32, error)
	// #exclude-ifndef messages/result/SlamResult/global_position/heading
	GetHeading() (float32, error)
}

type SlamResult_RelativePosition

type SlamResult_RelativePosition interface {
	// #exclude-ifndef messages/result/SlamResult/relative_position/x
	GetX() (float32, error)
	// #exclude-ifndef messages/result/SlamResult/relative_position/y
	GetY() (float32, error)
	// #exclude-ifndef messages/result/SlamResult/relative_position/z
	GetZ() (float32, error)
	// #exclude-ifndef messages/result/SlamResult/relative_position/angle
	GetAngle() (float32, error)
}

type TakeOffResponse

type TakeOffResponse interface {
	// #exclude-ifndef services/control/TakeOffResponse/expected_mode
	GetExpectedMode() enums.Mode
	// #exclude-ifndef services/control/TakeOffResponse/expected_status
	GetExpectedStatus() enums.MotionStatus
}

type Telemetry

type Telemetry interface {
	// #exclude-ifndef messages/telemetry/Telemetry/timestamp
	GetTimestamp() (*timestamppb.Timestamp, error)

	// #exclude-ifndef messages/telemetry/Telemetry/battery_info
	GetBatteryInfo() (BatteryInfo, error)

	// #exclude-ifndef messages/telemetry/Telemetry/gps_info
	GetGpsInfo() (GpsInfo, error)

	// #exclude-ifndef messages/telemetry/Telemetry/position_info
	GetPositionInfo() (PositionInfo, error)

	// #exclude-ifndef messages/telemetry/Telemetry/gimbal_info
	GetGimbalInfo() (GimbalInfo, error)

	// #exclude-ifndef messages/telemetry/Telemetry/alert_info
	GetAlertInfo() (AlertInfo, error)

	// #exclude-ifndef messages/telemetry/Telemetry/mode
	GetMode() (enums.Mode, error)

	// #exclude-ifndef messages/telemetry/Telemetry/motion_status
	GetMotionStatus() (enums.MotionStatus, error)
	// contains filtered or unexported methods
}

type Unsupported

type Unsupported struct {
	// Methods that are unsupported
	Methods []string `toml:"methods"`
	// Fields that are unsupported
	Fields []string `toml:"fields"`
	// Enums that are unsupported
	Enums []string `toml:"enums"`
}

Unsupported holds all the unsupported SDK types for this vehicle.

type Vehicle

type Vehicle interface {
	Ctx() context.Context // retrieves the current context
	// #exclude-ifndef services/driver/ControlService/TakeOff
	TakeOff(options ...opt.Option[opt.TakeOffOption]) *waiter[TakeOffResponse]
	// #exclude-ifndef services/driver/ControlService/Land
	Land() *waiter[LandResponse]
	// #exclude-ifndef services/driver/ControlService/Hold
	Hold() *waiter[HoldResponse]
	// #exclude-ifndef services/driver/ControlService/Kill
	Kill() *waiter[KillResponse]
	// #exclude-ifndef services/driver/ControlService/ReturnToHome
	ReturnToHome(options ...opt.Option[opt.ReturnToHomeOption]) *waiter[ReturnToHomeResponse]
	// #exclude-ifndef services/driver/ControlService/SetGlobalPositionTarget
	SetGlobalPositionTarget(
		latitude, longitude float64, altitude, heading float32,
		options ...opt.Option[opt.SetGlobalPositionTargetOption],
	) *waiter[SetGlobalPositionTargetResponse]
	// #exclude-ifndef services/driver/ControlService/SetRelativePositionTarget
	SetRelativePositionTarget(
		x, y, z, angle float32,
		options ...opt.Option[opt.SetRelativePositionTargetOption],
	) *waiter[SetRelativePositionTargetResponse]
	// #exclude-ifndef services/driver/ControlService/SetVelocityTarget
	SetVelocityTarget(
		xVel, yVel, zVel, angularVel float32,
		options ...opt.Option[opt.SetVelocityTargetOption],
	) *waiter[SetVelocityTargetResponse]
	// #exclude-ifndef services/driver/ControlService/SetGimbalAngleTarget
	SetGimbalAngleTarget(
		pitch, roll, yaw float32,
		options ...opt.Option[opt.SetGimbalAngleTargetOption],
	) *waiter[SetGimbalAngleTargetResponse]
	// #exclude-ifndef services/driver/ControlService/SetGimbalVelocityTarget
	SetGimbalVelocityTarget(
		pitchVel, rollVel, yawVel float32,
	) *waiter[SetGimbalVelocityTargetResponse]
	// #exclude-ifndef services/driver/StreamService/StreamTelemetry
	GetTelemetry() *waiter[Telemetry]
}

Vehicle is the interface that all SDK code interacts with. It provides wrappers over SteelEagle API RPC calls, and provides waiter objects that can wait for the command to complete. This interface can be selectively masked out when drivers do not support certain RPC methods.

func NewVehicleFromContext

func NewVehicleFromContext(ctx context.Context, conn *grpc.ClientConn) Vehicle

NewVehicleFromContext creates a new Vehicle interface given a context and gRPC client connection.

Directories

Path Synopsis
cmd
compiler command
ir.go turns a parsed DSL Ast plus a loaded TypeRegistry into the plain data (irResult) that generate.go feeds into the main.go template: one entry per top-level Data/Actions/Events declaration, only carrying the fields the mission actually set or that have a declared default, plus the action/event wiring and transition table for the Mission stanza.
ir.go turns a parsed DSL Ast plus a loaded TypeRegistry into the plain data (irResult) that generate.go feeds into the main.go template: one entry per top-level Data/Actions/Events declaration, only carrying the fields the mission actually set or that have a declared default, plus the action/event wiring and transition table for the Mission stanza.
dsl
fsm
swarm
Package swarm declares the DSL's swarm coordination types, generated at compile time with the const values a mission's manifest file makes available, to prevent string mismatch errors at runtime.
Package swarm declares the DSL's swarm coordination types, generated at compile time with the const values a mission's manifest file makes available, to prevent string mismatch errors at runtime.
Package params declares the SDK's parameter types, generated at compile time with the const values a mission's manifest file makes available, to prevent string mismatch errors at runtime.
Package params declares the SDK's parameter types, generated at compile time with the const values a mission's manifest file makes available, to prevent string mismatch errors at runtime.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL