Rocket#
Model Description#
The rocket describes a 1:10th scale SpaceX Falcon 9 v1.2 first stage and interstage. Mass and geometry properties were extracted from Space Launch Report datasheet.
Control Mode#
Only one control mode is provided. Setpoints correspond to:
finlet x deflection
finlet y deflection
finlet yaw
ignition
throttle
booster gimbal axis 1
booster gimbal axis 2
Class Description#
- class PyFlyt.core.drones.Rocket(p: BulletClient, start_pos: ndarray, start_orn: ndarray, control_hz: int = 120, physics_hz: int = 240, drone_model: str = 'rocket', model_dir: None | str = None, np_random: None | Generator = None, use_camera: bool = False, use_gimbal: bool = False, camera_angle_degrees: int = 30, camera_FOV_degrees: int = 90, camera_resolution: tuple[int, int] = (128, 128), camera_position_offset: ndarray = array([-1., 0., 3.]), camera_fps: None | int = None, starting_fuel_ratio: float = 0.05)#
Rocket instance that handles everything about a thrust vectored rocket with throttleable boosters and controllable finlets.
- The setpoint for this model has 7 values:
finlet x deflection
finlet y deflection
finlet yaw
ignition
throttle
booster gimbal axis 1
booster gimbal axis 2
- reset() None #
Resets the vehicle to the initial state.
- set_mode(mode) None #
Sets the current flight mode of the vehicle.
- flight modes:
0: finlet x deflection, finlet y deflection, finlet yaw, ignition, throttle, booster gimbal axis 1, booster gimbal axis 2
- Parameters:
mode (int) – flight mode
- starting_fuel_ratio#
Reads fixedwing.yaml file and load UAV parameters
- update_control(physics_step: int) None #
Runs through controllers.
- Parameters:
physics_step (int) – the current physics step
- update_last(physics_step: int) None #
Updates things only at the end of Aviary.step().
- Parameters:
physics_step (int) – the current physics step
- update_physics() None #
Updates the physics of the vehicle.
- update_state() None #
Updates the current state of the UAV.
This includes: ang_vel, ang_pos, lin_vel, lin_pos.