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. |
函数:
| 名称 | 描述 |
|---|---|
euler_zyx_to_R |
Convert ZYX Euler angles into a rotation matrix. |
GeoControl
GeoControl(params: VehicleParams = VehicleParams(), control_mask: list[int] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 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.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
VehicleParams
|
Vehicle parameters. |
VehicleParams()
|
|
list[int]
|
Control mask for target/state channels. |
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
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 |
ndarray | Tensor
|
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control. |
params
instance-attribute
params: VehicleParams = params
Vehicle parameters for the controller.
control_mask
instance-attribute
control_mask: ndarray | Tensor = control_mask
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control.
reset
reset()
Reset controller state.
update
update(target: ndarray, state: ndarray) -> np.ndarray
Compute thrust and moments from target and state.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
ndarray
|
Desired state vector. |
必需 |
|
ndarray
|
Current state vector. |
必需 |
返回:
| 类型 | 描述 |
|---|---|
ndarray
|
np.ndarray: Control output ordered as [thrust, Mx, My, Mz]. |
GeometricAdaptiveController
GeometricAdaptiveController(params: VehicleParams = VehicleParams(), control_mask: list[int] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 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.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
VehicleParams
|
Vehicle parameters. |
VehicleParams()
|
|
list[int]
|
Control mask for target/state channels. |
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
dict | None
|
Optional geometric gains for keys x/v/R/W. |
None
|
方法:
| 名称 | 描述 |
|---|---|
update |
Adaptive geometric control using target/state vectors (GeoControl layout). |
reset |
Reset controller state. |
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
params |
VehicleParams
|
Vehicle parameters for the controller. |
control_mask |
ndarray | Tensor
|
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control. |
params
instance-attribute
params: VehicleParams = params
Vehicle parameters for the controller.
control_mask
instance-attribute
control_mask: ndarray | Tensor = control_mask
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control.
update
update(target: ndarray, state: ndarray) -> np.ndarray
Adaptive geometric control using target/state vectors (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: list[int] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 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.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
VehicleParams
|
Vehicle parameters. |
VehicleParams()
|
|
list[int]
|
Control mask for target/state channels. |
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
dict | None
|
Optional geometric gains for keys x/v/R/W. |
None
|
方法:
| 名称 | 描述 |
|---|---|
update |
L1-augmented geometric control using target/state vectors. |
reset |
Reset controller state. |
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
dt_L1 |
For large uncertainties ... |
|
L1_params |
Initialization of L1 inputs |
|
params |
VehicleParams
|
Vehicle parameters for the controller. |
control_mask |
ndarray | Tensor
|
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control. |
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: ndarray | Tensor = control_mask
unified control mask for target/state channels, used in update(). e.g. using 9~11 for attitude yaw control.
update
update(target: ndarray, state: ndarray) -> np.ndarray
L1-augmented geometric control using target/state vectors.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
ndarray
|
12-dim vector [x,y,z,vx,vy,vz,roll,pitch,yaw,wx,wy,wz]. |
必需 |
|
ndarray
|
12-dim vector [x,y,z,vx,vy,vz,roll,pitch,yaw,wx,wy,wz]. |
必需 |
返回:
| 类型 | 描述 |
|---|---|
ndarray
|
np.ndarray: Control output ordered as [thrust, Mx, My, Mz]. |
reset
reset()
Reset controller state.
euler_zyx_to_R
euler_zyx_to_R(yaw: float, pitch: float, roll: float) -> np.ndarray
Convert ZYX Euler angles into a rotation matrix.
返回:
| 类型 | 描述 |
|---|---|
ndarray
|
np.ndarray: 3x3 rotation matrix. |