Agent Controllers

CellularSheaves.ControlSheaves.AgentControllers._default_initial_positionMethod
_default_initial_position(dyn::AbstractAgentDynamics, i::Int) -> Vector{Float64}

Default "airstrip" starting position for agent i when no explicit initial position is supplied: agents are lined up along the first position coordinate at a fixed spacing, at a common hover altitude (the last position coordinate). This is deliberately distinct from the target formation so that convergence into formation is visible in a simulation.

source
CellularSheaves.ControlSheaves.AgentControllers.initial_stateMethod
initial_state(dyn::AbstractAgentDynamics, position::AbstractVector)
initial_state(dyn::AbstractAgentDynamics, position::AbstractVector, velocity::AbstractVector)
initial_state(dyn::AbstractAgentDynamics, position::AbstractVector, velocity::AbstractVector, acceleration::AbstractVector)

Constructs a full state vector for dynamics model dyn starting at world position (length position_indices(dyn)), with velocity (length velocity_indices(dyn), defaults to rest) and acceleration (defaults to steady/zero). When acceleration is supplied, the initial attitude is trimmed using the same flat-output feedforward formula used by step_agent!, so agents seeded with the trajectory's initial acceleration start already banked into the turn instead of level.

source
CellularSheaves.ControlSheaves.AgentControllers.step_agent!Method
step_agent!(w::AgentState, qstar_target::Vector{Float64}, qstar_dot_target::Vector{Float64}, dt::Float64)

Steps feedback agent dynamics using joint reference position AND reference velocity filtering. Reference velocity is mapped into the state velocity components, eliminating tracking lag via standard LQR feedback.

source
CellularSheaves.ControlSheaves.AgentControllers.step_agent!Method
step_agent!(w::AgentState, qstar_target::Vector{Float64}, qstar_dot_target::Vector{Float64}, qstar_ddot_target::Vector{Float64}, dt::Float64)

Steps agent dynamics using position, velocity, and acceleration references. Calculates acceleration-based attitude references (pitch/roll angles) and feedforward thrust, enabling exact differential flatness trajectory tracking without lag.

source