Servo#

class Servo#

Represents a servo. Obtained using ServoGroup.servos, ServoGroup.servo_with_name() or servo_with_name().

name#

The name of the servo.

Attribute:

Can be read or written

Return type:

str

Game Scenes:

Flight

uid#

The unique identifier of the servo.

Attribute:

Read-only, cannot be set

Return type:

int

Game Scenes:

Flight

part#

The part containing the servo.

Attribute:

Read-only, cannot be set

Return type:

SpaceCenter.Part

Game Scenes:

Flight

mode#

Whether the part acts as a servo or a rotor.

Attribute:

Read-only, cannot be set

Return type:

ServoMode

Game Scenes:

Flight

highlight#

Whether the servo should be highlighted in-game.

Attribute:

Write-only, cannot be read

Return type:

bool

Game Scenes:

Flight

position#

The position of the servo.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

min_config_position#

The minimum position of the servo, specified by the part configuration.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

max_config_position#

The maximum position of the servo, specified by the part configuration.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

min_position#

The minimum position of the servo, specified by the in-game tweak menu.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

max_position#

The maximum position of the servo, specified by the in-game tweak menu.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

config_speed#

The speed multiplier of the servo, specified by the part configuration.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

speed#

The speed multiplier of the servo, specified by the in-game tweak menu.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

current_speed#

The current speed at which the servo is moving.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

acceleration#

The current speed multiplier set in the UI.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

is_moving#

Whether the servo is moving.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

is_free_moving#

Whether the servo is freely moving.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

is_locked#

Whether the servo is locked.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

is_axis_inverted#

Whether the servos axis is inverted.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

target_position#

The target position the servo is moving towards.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

target_speed#

The target speed the servo is moving at.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

commanded_position#

The position the servo is currently being commanded to move to.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

default_position#

The default (built) position of the servo.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

force_limit#

The force limit of the servo, as a percentage of the maximum force.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

max_force#

The maximum force the servo can generate.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

max_acceleration#

The maximum acceleration the servo can achieve.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

max_speed#

The maximum speed the servo can achieve.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

electric_charge_required#

The rate at which the servo consumes electric charge, in units per second, when moving.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

spring_power#

The strength of the servo’s spring, when it has one.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

damping_power#

The strength of the servo’s damping.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

rotor_acceleration#

The acceleration of the servo when operating as a rotor.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

is_limited#

Whether the servo’s range of movement is limited to the configured minimum and maximum positions.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

is_rotational#

Whether the servo moves rotationally (as opposed to linearly).

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

is_servo#

Whether the part is operating as a servo (rather than a rotor).

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

can_have_limits#

Whether the servo can have its range of movement limited.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

has_spring#

Whether the servo has a spring.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

is_running#

Whether the servo is running, when operating as a rotor.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

preset_positions#

The list of preset positions configured for the servo.

Attribute:

Read-only, cannot be set

Return type:

list(float)

Game Scenes:

Flight

move_right()#

Moves the servo to the right.

Game Scenes:

Flight

move_left()#

Moves the servo to the left.

Game Scenes:

Flight

move_center()#

Moves the servo to the center.

Game Scenes:

Flight

move_to(position, speed)#

Moves the servo to position and sets the speed multiplier to speed.

Parameters:
  • position (float) – The position to move the servo to.

  • speed (float) – Speed multiplier for the movement.

Game Scenes:

Flight

stop()#

Stops the servo.

Game Scenes:

Flight

add_preset(position)#

Adds a preset position to the servo.

Parameters:

position (float) – The position of the preset.

Game Scenes:

Flight

remove_preset_at(index)#

Removes the preset position at the given index.

Parameters:

index (int) – The index of the preset to remove.

Game Scenes:

Flight

sort_presets()#

Sorts the preset positions of the servo into ascending order.

Game Scenes:

Flight

class ServoMode#

The mode a servo is operating in. See Servo.mode.

servo#

The part acts as a servo, driving towards a target position.

rotor#

The part acts as a rotor, spinning continuously.