base
cosmic_warp.actuators.base
Base types and utilities for actuator models.
All actuator modules share common command and state structures for unified interface across the simulation pipeline.
ActuatorCommand
Unified command input for all actuators.
This struct provides a standardized interface for control inputs, supporting both thruster and reaction wheel commands simultaneously.
ActuatorState
Dynamic state of actuators (momentum storage, etc.).
Reaction wheels have internal momentum that must be tracked. Thrusters have no actuator state here; propellant use is tracked as the body's mass (State.mass).
ActuatorManager
Centralized command/state interface for spacecraft actuators.
Source code in cosmic_warp/actuators/base.py
set_thrust_commands
Set thruster commands for all entities (broadcast).
Source code in cosmic_warp/actuators/base.py
set_thrust_commands_per_entity
Set per-entity thruster commands (float64 array [num_entities, 8]).
Source code in cosmic_warp/actuators/base.py
set_rw_torque_commands
Set reaction wheel torque commands for all entities (broadcast).
Source code in cosmic_warp/actuators/base.py
set_rw_torque_commands_per_entity
Set per-entity reaction wheel torque commands (float64 array [num_entities, 4]).
Source code in cosmic_warp/actuators/base.py
set_rw_state
Set reaction wheel angular momentum state for all entities (broadcast).
Source code in cosmic_warp/actuators/base.py
set_rw_state_per_entity
Set per-entity reaction wheel angular momentum state (float64 array [num_entities, 4]).
Source code in cosmic_warp/actuators/base.py
reset
Reset actuator commands and states for all entities.
Source code in cosmic_warp/actuators/base.py
reset_masked
Reset actuator commands and states where mask is True.
Source code in cosmic_warp/actuators/base.py
command_is_finite
command_is_finite(cmd: ActuatorCommand) -> bool
True when every thrust and wheel torque command is finite (no NaN or Inf, which the actuator clamps would turn into a finite actuation).
Source code in cosmic_warp/actuators/base.py
reset_actuator_commands_kernel
reset_actuator_commands_kernel(
commands: array(dtype=ActuatorCommand),
)
Zero all actuator commands.
Source code in cosmic_warp/actuators/base.py
reset_actuator_states_kernel
reset_actuator_states_kernel(
states: array(dtype=ActuatorState),
)
set_thrust_commands_kernel
set_thrust_commands_kernel(
commands: array(dtype=ActuatorCommand),
thrust_cmd: vec4d,
thrust_cmd_ext: vec4d,
)
Set thrust commands for all environments.
Source code in cosmic_warp/actuators/base.py
set_rw_commands_kernel
set_rw_commands_kernel(
commands: array(dtype=ActuatorCommand), rw_torque: vec4d
)
Set RW torque commands for all environments.
set_thrust_commands_per_entity_kernel
set_thrust_commands_per_entity_kernel(
commands: array(dtype=ActuatorCommand),
thrust_cmds: array(dtype=float64, ndim=2),
)
Set thrust commands per entity: columns 0-3 and 4-7 of thrust_cmds.
Source code in cosmic_warp/actuators/base.py
set_rw_commands_per_entity_kernel
set_rw_commands_per_entity_kernel(
commands: array(dtype=ActuatorCommand),
rw_torques: array(dtype=float64, ndim=2),
)
Set RW torque commands per entity.
Source code in cosmic_warp/actuators/base.py
set_rw_state_kernel
set_rw_state_kernel(
states: array(dtype=ActuatorState), rw_ang_mom: vec4d
)
Set RW angular momentum state for all environments.
set_rw_state_per_entity_kernel
set_rw_state_per_entity_kernel(
states: array(dtype=ActuatorState),
rw_ang_mom_values: array(dtype=float64, ndim=2),
)
Set RW angular momentum state per entity.