跳转至

actions

类:

名称 描述
ControlAction

Body torque control action term.

ControlActionCfg

See :class:ControlAction for more details.

ControlAction

ControlAction(cfg: ControlActionCfg, env: ManagerBasedRlEnv)

Bases: ActionTerm

Body torque control action term.

This action term applies a wrench to the drone body frame based on action commands

属性:

名称 类型 描述
cfg ControlActionCfg

The configuration of the action term.

cfg instance-attribute

cfg: ControlActionCfg = cfg

The configuration of the action term.

ControlActionCfg dataclass

ControlActionCfg(*, class_type: type[ActionTerm] = ControlAction, entity_name: str = 'robot', params: VehicleParams = VehicleParams(), gains: dict | None = None, limits: dict | None = None, control_mode: str = 'cmd_motor_speeds', mapping: FlightMappingConfig = FlightMappingConfig())

Bases: ActionTermCfg

See :class:ControlAction for more details.

属性:

名称 类型 描述
class_type type[ActionTerm]

Class of the action term.

entity_name str

Name of the asset in the environment for which the commands are generated.

params VehicleParams

Vehicle parameters.

gains dict | None

Optional gains configuration for the flight controller. See FlightController for details.

limits dict | None

Optional command-limit configuration passed directly to the flight controller.

control_mode str

Control mode, options: cmd_motor_thrusts, cmd_motor_speeds, cmd_ctbm, cmd_ctbr, cmd_ctatt, cmd_vel, cmd_pos.

mapping FlightMappingConfig

Action-mapping range overrides resolved against params.

class_type class-attribute instance-attribute

class_type: type[ActionTerm] = ControlAction

Class of the action term.

entity_name class-attribute instance-attribute

entity_name: str = 'robot'

Name of the asset in the environment for which the commands are generated.

params class-attribute instance-attribute

params: VehicleParams = field(default_factory=VehicleParams)

Vehicle parameters.

gains class-attribute instance-attribute

gains: dict | None = None

Optional gains configuration for the flight controller. See FlightController for details.

limits class-attribute instance-attribute

limits: dict | None = None

Optional command-limit configuration passed directly to the flight controller.

control_mode class-attribute instance-attribute

control_mode: str = 'cmd_motor_speeds'

Control mode, options: cmd_motor_thrusts, cmd_motor_speeds, cmd_ctbm, cmd_ctbr, cmd_ctatt, cmd_vel, cmd_pos.

rotorpy ref: - https://github.com/spencerfolk/rotorpy/blob/main/rotorpy/learning/quadrotor_environments.py#L319C1-L350C12 - https://github.com/spencerfolk/rotorpy/blob/main/rotorpy/vehicles/multirotor.py#L997

TODO: also align control modes with px4, see: https://docs.px4.io/v1.14/en/flight_modes/offboard

mapping class-attribute instance-attribute

mapping: FlightMappingConfig = field(default_factory=FlightMappingConfig)

Action-mapping range overrides resolved against params.

The default mapping is an intentional policy-facing behavior rather than a direct reflection of the parameter-derived controller ranges.