跳转至

geo

Geometric controllers and helpers for SE(3) tracking.

类:

名称 描述
GeoControl

Python implementation of Geometric Controller.

GeometricAdaptiveController

Python implementation of Geometric Adaptive Controller.

L1_GeoControl

Python implementation of L1 Adaptive Geometric Controller.

GeoControl

GeoControl(params: VehicleParams = VehicleParams(), control_mask: dict | None = None, gains: dict | None = None)

Bases: ControllerBase

Python implementation of Geometric Controller.

Based on: Taeyoung Lee, Melvin Leok, and N.H. McClamroch. "Geometric Tracking Control of a Quadrotor UAV on SE(3)" [DOI: 10.1109/CDC.2010.5717652].

Initialize gains and error buffers.

参数:

名称 类型 描述 默认

params

VehicleParams

Vehicle parameters.

VehicleParams()

control_mask

dict

Control mask dict mapped to target keys.

None

gains

dict | None

Optional geometric gains for keys x/v/R/W.

None

方法:

名称 描述
reset

Reset controller state.

update

Compute thrust and moments from target and state.

属性:

名称 类型 描述
params VehicleParams

Vehicle parameters for the controller.

control_mask dict

Control mask dict mapped to state keys, used in update().

params instance-attribute

params: VehicleParams = params

Vehicle parameters for the controller.

control_mask instance-attribute

control_mask: dict = control_mask if control_mask is not None else {}

Control mask dict mapped to state keys, used in update().

reset

reset()

Reset controller state.

update

update(target: dict, state: dict) -> np.ndarray

Compute thrust and moments from target and state.

参数:

名称 类型 描述 默认

target

dict

Desired state dict.

必需

state

dict

Current state dict with att_rotmat(3,3) / att_quat(4) / att_rotvec(3) / att_euler(3), pos(3), vel(3), ang_vel(3).

必需

返回:

类型 描述
ndarray

np.ndarray: Control output ordered as [thrust, Mx, My, Mz].

GeometricAdaptiveController

GeometricAdaptiveController(params: VehicleParams = VehicleParams(), control_mask: dict | None = None, gains: dict | None = None)

Bases: GeoControl

Python implementation of Geometric Adaptive Controller.

Based on: Farhad A. Goodarzi, Daewon Lee, and Taeyoung Lee. "Geometric Adaptive Tracking Control of a Quadrotor Unmanned Aerial Vehicle on SE(3) for Agile Maneuvers." [DOI: 10.1115/1.4030419].

Initialize adaptive gains and inherited geometry control.

参数:

名称 类型 描述 默认

params

VehicleParams

Vehicle parameters.

VehicleParams()

control_mask

dict

Control mask dict mapped to target keys.

None

gains

dict | None

Optional geometric gains for keys x/v/R/W.

None

方法:

名称 描述
update

Adaptive geometric control using target/state dicts (GeoControl layout).

reset

Reset controller state.

属性:

名称 类型 描述
params VehicleParams

Vehicle parameters for the controller.

control_mask dict

Control mask dict mapped to state keys, used in update().

params instance-attribute

params: VehicleParams = params

Vehicle parameters for the controller.

control_mask instance-attribute

control_mask: dict = control_mask if control_mask is not None else {}

Control mask dict mapped to state keys, used in update().

update

update(target: dict, state: dict) -> np.ndarray

Adaptive geometric control using target/state dicts (GeoControl layout).

返回:

类型 描述
ndarray

np.ndarray: Control output ordered as [thrust, Mx, My, Mz].

reset

reset()

Reset controller state.

L1_GeoControl

L1_GeoControl(params: VehicleParams = VehicleParams(), control_mask: dict | None = None, gains: dict | None = None)

Bases: GeoControl

Python implementation of L1 Adaptive Geometric Controller.

Based on: Zhuohuan Wu, Sheng Cheng, Pan Zhao, Aditya Gahlawat, Kasey A. Ackerman, Arun Lakshmanan, Chengyu Yang, Jiahao Yu, Naira Hovakimyan. "L1Quad: L1 Adaptive Augmentation of Geometric Control for Agile Quadrotors with Performance Guarantees" [arXiv:2302.07208].

Initialize L1 adaptive parameters.

参数:

名称 类型 描述 默认

params

VehicleParams

Vehicle parameters.

VehicleParams()

control_mask

dict

Control mask dict mapped to target keys.

None

gains

dict | None

Optional geometric gains for keys x/v/R/W.

None

方法:

名称 描述
update

L1-augmented geometric control using target/state dicts.

reset

Reset controller state.

属性:

名称 类型 描述
dt_L1

For large uncertainties ...

L1_params

Initialization of L1 inputs

params VehicleParams

Vehicle parameters for the controller.

control_mask dict

Control mask dict mapped to state keys, used in update().

dt_L1 instance-attribute

dt_L1 = sim_dt

For large uncertainties ...

L1_params instance-attribute

L1_params = (As_v, As_omega, dt_L1, ctoffq1Thrust, ctoffq1Moment, ctoffq2Moment, mass, g, inertia)

Initialization of L1 inputs

params instance-attribute

params: VehicleParams = params

Vehicle parameters for the controller.

control_mask instance-attribute

control_mask: dict = control_mask if control_mask is not None else {}

Control mask dict mapped to state keys, used in update().

update

update(target: dict, state: dict) -> np.ndarray

L1-augmented geometric control using target/state dicts.

参数:

名称 类型 描述 默认

target

dict

Desired state dict.

必需

state

dict

Current state dict with att_rotmat, pos, vel, ang_vel.

必需

返回:

类型 描述
ndarray

np.ndarray: Control output ordered as [thrust, Mx, My, Mz].

reset

reset()

Reset controller state.