Skip to content

spaceteams.SC_Compute_Server

Space Teams PRO Python API

Used to write code that either interacts with running simulations, edits config files and runs sims, or just uses utility functions like our math library.

ArtCameraProperties

ArtCameraProperties()

"Non-physical changes to apply to the image"

chrom_abbr_offset property writable

chrom_abbr_offset: float

AssetFileCategory

AssetFileCategory(value: SupportsInt)

Members:

UNDEFINED :

Local :

Core :

Core class-attribute

Core: AssetFileCategory

Local class-attribute

Local: AssetFileCategory

UNDEFINED class-attribute

UNDEFINED: AssetFileCategory

name property

name: str

value property

value: int

AssetType

AssetType(value: SupportsInt)

Members:

UNDEFINED :

Generic :

ParamMap :

SimConfig :

EntityConfig :

SystemSource :

PlanetData :

EntityConfig class-attribute

EntityConfig: AssetType

Generic class-attribute

Generic: AssetType

ParamMap class-attribute

ParamMap: AssetType

PlanetData class-attribute

PlanetData: AssetType

SimConfig class-attribute

SimConfig: AssetType

SystemSource class-attribute

SystemSource: AssetType

UNDEFINED class-attribute

UNDEFINED: AssetType

name property

name: str

value property

value: int

CaptureImageProperties

CaptureImageProperties()

"All properties of an image to capture besides the choice of camera entity."

art instance-attribute

art: ArtCameraProperties

is_physical instance-attribute

is_physical: bool

output_mode instance-attribute

output_mode: OutputMode

phys instance-attribute

phys: PhysicalCameraProperties

uses_custom_projection instance-attribute

uses_custom_projection: bool

CaptureID property writable

CaptureID: int

FOV property writable

FOV: float

ProjectionMatrix property writable

ProjectionMatrix: Annotated[NDArray[float64], '[4, 4]']

ResolutionX property writable

ResolutionX: int

ResolutionY property writable

ResolutionY: int

nonphys_EV property writable

nonphys_EV: float

Entity

Entity()

Bases: ParamMap

Entity class representing an entity in a running simulation.

AddDynamicsParamsIfMissing

AddDynamicsParamsIfMissing() -> None

Adds the remainder of the dynamics params to this Entity_Base if they don't exist.

AddStateParamsIfMissing

AddStateParamsIfMissing() -> None

Adds the Location, Velocity, Rotation, AngVelocity, etc params to this Entity_Base if they don't exist.

AddStaticStateParamsIfMissing

AddStaticStateParamsIfMissing() -> None

Adds the Location and Rotation params to this Entity if they don't exist.

GetBodyCenteredFrame

GetBodyCenteredFrame() -> frames.Frame

Get the frame centered on this entity, with axes aligned to the resident (parent) frame of the entity.

GetBodyFixedFrame

GetBodyFixedFrame() -> frames.Frame

Get the body-fixed frame of this entity.

GetPropagator

GetPropagator() -> PropagatorChoice

Get the Propagator choice for this entity.

SetPropagator

SetPropagator(propagator: PropagatorChoice, transmit: bool = True) -> None

Set the choice of Propagator for this entity. This can be changed mid-sim.

getAcceleration

getAcceleration() -> frames.FramedLocVelAcc

Get time-extrapolated acceleration of this entity (meters/sec ^ 2, right handed coordinates)

getAngAcceleration

getAngAcceleration() -> frames.FramedAngAcc

Get time-extrapolated angular acceleration of this entity (rad/sec^2, right handed coordinates)

getAngVelocity

getAngVelocity() -> frames.FramedAngVel

Get time-extrapolated angular velocity of this entity (rad/sec, right handed coordinates) The vector direction is the axis of rotation, and the magnitude of the vector is the speed of the right-handed rotation around that axis

getId

getId() -> UUID

Returns the id of the Entity_Base

getId_str

getId_str() -> str

Returns the id of the Entity_Base as string type

getInertia

getInertia(inFrame: Frame) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']

Get Entity Inertia Tensor (kilograms * meters^2, 3x3 symmetric matrix, right handed coordinates). Deprecated mismatching name from C++ API.

getInertiaTensor

getInertiaTensor(inFrame: Frame) -> typing.Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']

Get Entity Inertia Tensor (kilograms * meters^2, 3x3 symmetric matrix, right handed coordinates).

getLocVel

getLocVel() -> frames.FramedLocVel

Get time-extrapolated location and velocity of this entity (meters, meters/second, right handed coordinates).

getLocVelAcc

getLocVelAcc() -> frames.FramedLocVelAcc

Get time-extrapolated location, velocity, and acceleration of this entity (meters, meters/second, meters/second^2, right handed coordinates).

getLocation

getLocation() -> frames.FramedLoc

Get time-extrapolated location of this entity (meters, right handed coordinates)

getMass

getMass() -> float

Get the mass of this entity (kilograms)

getName

getName() -> str

Returns the name of the Entity_Base

getParentFrame

getParentFrame() -> frames.Frame

Get the frame in which this entity’s state parameter are defined (new name for ResidentFrame)

getPhysEffects

getPhysEffects() -> dict[str, PhysEffect]

Get copy of the list of all physical effects on this entity.

getResidentFrame

getResidentFrame() -> frames.Frame

Get the frame in which this entity’s state parameter are defined.

getResidentFrameBody

getResidentFrameBody() -> Entity

Get the entity whose body-fixed frame is used as the frame in which this Entity_Base's state parameters are defined.

getRotation

getRotation() -> frames.FramedRot

Get the orientation of this entity's body frame (right handed coordinates).

getType

getType() -> str

Get Entity Type of this Entity.

getVelocity

getVelocity() -> frames.FramedLocVel

Get time-extrapolated velocity of this entity (meters/second, right handed coordinates).

removePhysEffect

removePhysEffect(key: str) -> None

Removes a physical effect associated with the specified key.

setAngAcceleration

setAngAcceleration(angacc: FramedAngAcc) -> None

Set Entity Angular Acceleration.

setAngVelocity

setAngVelocity(angvel: FramedAngVel) -> None

Set Entity Angular Velocity.

setAngVelocityD

setAngVelocityD(angvel: Annotated[ArrayLike, float64, '[3, 1]'], fromFrame: Frame) -> None

(Deprecated) Set time-extrapolated angular velocity of this entity (rad/sec, right handed coordinates) The vector direction is the axis of rotation, and the magnitude of the vector is the speed of the right-handed rotation around that axis

setInertiaTensor

setInertiaTensor(I_fromframe: Annotated[ArrayLike, float64, '[3, 3]'], fromFrame: Frame) -> None

Set Entity Inertia Tensor (kilograms * meters^2, 3x3 symmetric matrix, right handed coordinates).

setLocVelAcc

setLocVelAcc(LocVelAcc: FramedLocVelAcc) -> None

Set Entity Location, Velocity, and Acceleration (meters, meters/second, meters/second^2, right handed coordinates).

setLocation

setLocation(loc: FramedLoc) -> None

Set entity location (meters, right handed coordinates)

setLocationD

setLocationD(loc: Annotated[ArrayLike, float64, '[3, 1]'], fromFrame: Frame) -> None

(Deprecated) Set entity location (meters, right handed coordinates)

setLocation_ZeroVel

setLocation_ZeroVel(loc: FramedLoc) -> None

Set Entity Location (meters, right handed coordinates). Also sets velocity and acceleration to zero.

setPhysEffect

setPhysEffect(key: str, effect: PhysEffect) -> None

Create or revise a physical effect on this entity.

setResidentFrame

setResidentFrame(frame: Frame) -> None

Set the frame in which this Entity_Base's state parameters are defined, and transform state parameters to line up with the existing state.

setResidentFrame_ZeroState

setResidentFrame_ZeroState(frame: Frame) -> None

Set the frame in which this Entity's state parameters are defined, and set all state parameters (position and rotation) to zero in the new frame.

setRotation

setRotation(rot: FramedRot) -> None

Set Entity Rotation.

setRotation_DCM

setRotation_DCM(rot: Annotated[ArrayLike, float64, '[3, 3]'], fromFrame: Frame) -> None

(Deprecated) Set entity rotation (passive DCM, right hand coordinate)

setRotation_ZeroVel

setRotation_ZeroVel(rot: FramedRot) -> None

Set Entity Rotation. Also sets AngVelocity and AngAcceleration to zero.

EntityConfig

EntityConfig()

Bases: ParamMap

system_nametags property writable

system_nametags: list[str]

Systems applied to this Entity_Base

getName

getName() -> str

Get the name of this EntityConfig

EntityRef_Unresolved

EntityRef_Unresolved(entity_name: str)

EphemerisResult

State vector of a body with respect to an observer. Note that we typically do not return a valid acceleration or angular acceleration. See: - https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkezr_c.html - https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sxform_c.html - https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xf2rav_c.html

acc property

acc: Annotated[NDArray[float64], '[3, 1]']

Acceleration, meters/second^2 NOTE: not typically set!

angacc property

angacc: Annotated[NDArray[float64], '[3, 1]']

Angular acceleration, in radians/second^2 NOTE: not typically set!

angvel property

angvel: Annotated[NDArray[float64], '[3, 1]']

Angular velocity, in radians/second

light_time_s property

light_time_s: float

Light time in seconds at observation between body and observer. Definition changes depending on aberration_correction.

loc property

loc: Annotated[NDArray[float64], '[3, 1]']

Location, meters

rot property

rot: Annotated[NDArray[float64], '[3, 3]']

Passive rotation (transformation) DCM representing the attitude of bodyFrame wrt observerFrame

vel property

vel: Annotated[NDArray[float64], '[3, 1]']

Velocity, meters/second

FieldEffectConfig

FieldEffectConfig()

Bases: ParamMap

active property writable

active: bool

If Active: false, this FieldEffect will load but will not be applied.

fieldName property writable

fieldName: str

Name of the field to apply this effect to.

nametag property writable

nametag: str

FieldEffect Nametag.

singleton property writable

singleton: bool

If two Singleton FieldEffects with the same Source are in a sim, they will be combined.

source property writable

source: str

C++ DLL to load for this FieldEffect.

type property writable

type: FieldEffectType

FieldEffect Type, which distinguishes between scalar, vector, matrix, or possibly other outputs.

FieldEffectType

FieldEffectType(value: SupportsInt)

Members:

Scalar : FieldEffect returns Scalar 64-bit float value.

Vector : FieldEffect returns 3D vector 64-bit float value.

Ephemeris : FieldEffect representing an Ephemeris System, which handles NAIF SPICE ephemeris queries.

Ephemeris class-attribute

Ephemeris: FieldEffectType

Scalar class-attribute

Scalar: FieldEffectType

Vector class-attribute

Vector: FieldEffectType

name property

name: str

value property

value: int

Notation

Notation(value: SupportsInt)

Members:

Default : The value is represented with many meaningful digits as needed up to the given precision. Switches to scientific notation if the decimal place is not within the meaningful digits. Corresponds with std::defaultfloat https://cplusplus.com/reference/ios/defaultfloat/.

DigitsAfterDecimal : The value is represented with exactly as many digits in the decimal part as the given precision specifies. Corresponds with std::fixed https://cplusplus.com/reference/ios/fixed/.

Scientific : The value is represented with one digit before the decimal point, followed by the decimal point and as many decimal digits as the given precision. Corresponds with std::scientific https://cplusplus.com/reference/ios/scientific/.

Default class-attribute

Default: Notation

DigitsAfterDecimal class-attribute

DigitsAfterDecimal: Notation

Scientific class-attribute

Scientific: Notation

name property

name: str

value property

value: int

OutputMode

OutputMode(value: SupportsInt)

"Camera output modes, which affect the content and pixel format of a capture's pixels, but not its geometry."

Members:

Default : What people "expect" from a typical image.

RGB_LDR_sRGB : Red-Green-Blue channels in sRGB color space, 8 bits each.

RGB_LDR : Red-Green-Blue channels in linear color space, 8 bits each.

RGB_HDR : (UNIMPLEMENTED) Red-Green-Blue channels in linear color space, 16-bit float each.

Depth_cm : Single channel, 32-bit float, linear depth in cm.

Default class-attribute

Default: OutputMode

Depth_cm class-attribute

Depth_cm: OutputMode

RGB_HDR class-attribute

RGB_HDR: OutputMode

RGB_LDR class-attribute

RGB_LDR: OutputMode

RGB_LDR_sRGB class-attribute

RGB_LDR_sRGB: OutputMode

name property

name: str

value property

value: int

ParamMap

ParamMap()

AddCopiesOfAllParamsFrom

AddCopiesOfAllParamsFrom(other: ParamMap) -> None

Adds a DeepCopy of all the params on another GenParamMap to this one NOTE: If there are name collisions, this will perform a Set on same- type colliding params, or throw for differing type.

AddOrSetParam

AddOrSetParam(type: VarType, key: Any, value: Any) -> bool

Returns whether the parameter previously existed

AddParam

AddParam(type: VarType, key: Any, value: Any) -> None

adds a new parameter at the given key on this entity. The input is in the form of std::vector. There is a static check for if this parameter is actually of a support type.

AddParamArray

AddParamArray(type: VarType, key: Any, value: list) -> None

ClearParams

ClearParams() -> None

Remove from map and free memory for a param

DeleteParam

DeleteParam(key: Any) -> None

Remove from map and free memory for a param

ForEachParam

ForEachParam(operations: Callable[[str, VarType], None]) -> None

For each of the parameters in this ParamMap, supply the key and type and do "operations". Doesn’t allow access to pointer because it's non-const. The operations passed in here are a std::function, which is usually made as a lambda function.

ForEachParamMap

ForEachParamMap(operations: Callable[[str, ParamMap], None]) -> None

For each of the parameters in this ParamMap, supply the key, ParamMap pointer, and type and do "operations". The operations passed in here are a std::function, which is usually made as a lambda function.

GetMap

GetMap(keys: Any) -> ParamMap

Get pointer to the GenParamMap at this key.

GetParam

GetParam(type: VarType, key: Any) -> typing.Any

Get a copy of the value of the Parameter at the given key on this ParamMap. Usage: value = TheParamMap.GetParam(st.VarType.VarTypeOfParameter, "KeyOfParameter") value = TheParamMap.GetParam(st.VarType.VarTypeOfParameter, ["TopMapKey", "MiddleMapKey", "KeyOfParameter"]) Example: messageOnThisEntity = en1.GetParam(st.VarType.string, "Message") There is a runtime check for if this parameter is actually the type you specified it to be.

GetParamArray

GetParamArray(type: VarType, key: Any) -> typing.Any

Get a copy of the values from the Parameter Array at the given key on this GenParamMap. This copy is in the form of a std::vector.

GetParamArraySize

GetParamArraySize(key: Any) -> int

Get the number of elements in the Parameter Array at the given key on this GenParamMap. This has the advantage of not copying the array, and is faster than len(GetParamArray(...)). There is a runtime check for if this parameter is actually an array.

GetParamArrayType

GetParamArrayType(key: Any) -> VarType

Returns the VarType of the parameter array at the given key.

GetParamAsString

GetParamAsString(key: Any) -> str

Get what this parameter value's ToString() function would output, without needing to specify the type of parameter value to get.

GetParamMap

GetParamMap(keys: Any) -> ParamMap

Get pointer to the GenParamMap at this key. Duplicate of GetMap.

GetParamTime

GetParamTime(key: Any) -> timestamp

Returns the timestamp of the edited-time of the parameter at the given key.

GetParamType

GetParamType(key: Any) -> VarType

Returns the VarType of the parameter at the given key.

HasMap

HasMap(keys: Any) -> bool

HasParamWithValue

HasParamWithValue(type: VarType, key: Any, value: Any) -> bool

Checks if this ParamMap has a parameter at the given key with the given type and if the value of that parameter matches the given value.

IfHas_GetParam

IfHas_GetParam(type: VarType, key: Any) -> tuple

If a parameter with this type exists at the key, return [true, value]. Otherwise, return [false, None].

IfHas_GetParamArray

IfHas_GetParamArray(type: VarType, key: Any) -> tuple

If a parameter array with this member type exists at the key, return [true, array value]. Otherwise, return [false, None].

IfHas_GetParamWithTime

IfHas_GetParamWithTime(type: VarType, key: Any) -> tuple

If a parameter with this type exists at the key, return [true, value, timestamp]. Otherwise, return [false, None, None].

RenameParam

RenameParam(key: Any, new_key: Any) -> None

Delete and readd a param with the same value, but a new key.

SetParam

SetParam(type: VarType, key: Any, value: Any) -> None

Set the value of the parameter at the given key on this GenParamMap with the given value. There is a runtime check for if this parameter is actually the type you specified to it be.

SetParamArray

SetParamArray(type: VarType, key: Any, value: list) -> None

Set the value of the parameter at the given key on this GenParamMap with the given value. The input is in the form of std::vector. There is a runtime check for if this parameter is actually the type you specified to it be. The array will resized itself as needed

ToString

ToString(notation: Notation = ..., precision: SupportsInt = 17) -> str

Returns a string of the keys/values of this ParamMap, with a certain notation and precision. Avoids newline characters. - notation: Select decimal notation - precision: Number of significant digits printed

ToStringMultiline

ToStringMultiline(notation: Notation = ..., precision: SupportsInt = 17) -> str

Returns a string of the keys/values of this ParamMap, with a certain notation and precision. Avoids newline characters. - notation: Select decimal notation - precision: Number of significant digits printed

unique_id

unique_id() -> int

PhysEffect

Physical Effect that can be applied to an Entity.

effectType instance-attribute

effectType: PhysEffectType

applicationLoc property writable

applicationLoc: Annotated[NDArray[float64], '[3, 1]']

direction property writable

direction: Annotated[NDArray[float64], '[3, 1]']

Direction portion of the effect. Assumed to be a unit vector.

frame property writable

frame: Frame

Frame the direction of the effect is expressed in. As of v0.47.1, must be an Entity body-fixed frame or Sim Base Frame.

magnitude property writable

magnitude: float

Scalar portion of the effect. Depending on type, may multiply with direction or be used directly.

useEndTime property

useEndTime: bool

Use a defined end time. If this PhysEffect is removed/deleted in another way, that overrides this.

useStartTime property

useStartTime: bool

Use a defined start time instead of assuming this effect has always existed or acts immediately.

setEndTime

setEndTime(endTime: timestamp) -> None

Enable and set end time.

setQuaternion

setQuaternion(quat: Annotated[ArrayLike, float64, '[4, 1]']) -> None

Set quaternion, for Rotation, in xyzw order

setStartTime

setStartTime(startTime: timestamp) -> None

Enable and set start time.

setVector

setVector(vector: Annotated[ArrayLike, float64, '[3, 1]']) -> None

Set magnitude and direction at the same time.

PhysEffectType

PhysEffectType(value: SupportsInt)

Members:

UNDEFINED :

Force :

Torque :

Impulse :

AngImpulse :

Acceleration :

AngAcceleration :

DeltaLocation :

DeltaVelocity :

DeltaRotation :

DeltaAngVelocity :

LocationOverride :

VelocityOverride :

AccelerationOverride :

RotationOverride :

AngVelocityOverride :

AngAccelerationOverride :

Acceleration class-attribute

Acceleration: PhysEffectType

AccelerationOverride class-attribute

AccelerationOverride: PhysEffectType

AngAcceleration class-attribute

AngAcceleration: PhysEffectType

AngAccelerationOverride class-attribute

AngAccelerationOverride: PhysEffectType

AngImpulse class-attribute

AngImpulse: PhysEffectType

AngVelocityOverride class-attribute

AngVelocityOverride: PhysEffectType

DeltaAngVelocity class-attribute

DeltaAngVelocity: PhysEffectType

DeltaLocation class-attribute

DeltaLocation: PhysEffectType

DeltaRotation class-attribute

DeltaRotation: PhysEffectType

DeltaVelocity class-attribute

DeltaVelocity: PhysEffectType

Force class-attribute

Force: PhysEffectType

Impulse class-attribute

Impulse: PhysEffectType

LocationOverride class-attribute

LocationOverride: PhysEffectType

RotationOverride class-attribute

RotationOverride: PhysEffectType

Torque class-attribute

Torque: PhysEffectType

UNDEFINED class-attribute

UNDEFINED: PhysEffectType

VelocityOverride class-attribute

VelocityOverride: PhysEffectType

name property

name: str

value property

value: int

PhysicalCameraProperties

PhysicalCameraProperties()

"Physical properties of the camera that affect the image"

ISO property writable

ISO: float

chrom_abbr_intensity property writable

chrom_abbr_intensity: float

fStop property writable

fStop: float

focus_distance_m property writable

focus_distance_m: float

minfStop property writable

minfStop: float

numApertureBlades property writable

numApertureBlades: int

sensorWidth_mm property writable

sensorWidth_mm: float

shutterSpeed_Hz property writable

shutterSpeed_Hz: float

PropagationType

PropagationType(value: SupportsInt)

Members:

NoPropagation

ComputePosition

ComputeVelocity

ComputeAcceleration

ComputeJerk

Clientside_FreeBody

Clientside_PawnControl

PhysXInteractible

CoordinateFrame_Static

Clientside_FreeBody class-attribute

Clientside_FreeBody: PropagationType

Clientside_PawnControl class-attribute

Clientside_PawnControl: PropagationType

ComputeAcceleration class-attribute

ComputeAcceleration: PropagationType

ComputeJerk class-attribute

ComputeJerk: PropagationType

ComputePosition class-attribute

ComputePosition: PropagationType

ComputeVelocity class-attribute

ComputeVelocity: PropagationType

CoordinateFrame_Static class-attribute

CoordinateFrame_Static: PropagationType

NoPropagation class-attribute

NoPropagation: PropagationType

PhysXInteractible class-attribute

PhysXInteractible: PropagationType

name property

name: str

value property

value: int

PropagatorChoice

PropagatorChoice(value: SupportsInt)

Members:

No_Body

ST_Rigid_Body

SPICE

Unreal_Chaos

Unreal_Pawn

Custom

Static

Custom class-attribute

Custom: PropagatorChoice

No_Body class-attribute

No_Body: PropagatorChoice

SPICE class-attribute

SPICE: PropagatorChoice

ST_Rigid_Body class-attribute

ST_Rigid_Body: PropagatorChoice

Static class-attribute

Static: PropagatorChoice

Unreal_Chaos class-attribute

Unreal_Chaos: PropagatorChoice

Unreal_Pawn class-attribute

Unreal_Pawn: PropagatorChoice

name property

name: str

value property

value: int

ResponderHandle

entityId property

entityId: UUID

Entity ID the responder applies to.

handle_id property

handle_id: UUID

Randomly generated for each responder, and used to find a specific one for RemoveResponder(). Not part of the identity of the responder for key matching purposes.

independentThread property

independentThread: bool

Whether the responder function will run on its own independent thread, or otherwise be run on a threadpool (better performance but less safe from deadlocks).

topic property

topic: str

Topic string

Severity

Severity(value: SupportsInt)

Members:

Info

Warning

Error

Fatal

Chat

Chat class-attribute

Chat: Severity

Error class-attribute

Error: Severity

Fatal class-attribute

Fatal: Severity

Info class-attribute

Info: Severity

Warning class-attribute

Warning: Severity

name property

name: str

value property

value: int

SimConfig

SimConfig()

AddEntity

AddEntity(config: EntityConfig) -> None

Adds a (assumed-properly-initialized) EntityConfig to the sim config

AddFieldEffect

AddFieldEffect(config: FieldEffectConfig) -> None

Adds a (assumed-properly-initialized) FieldEffectConfig to the sim config

AddSystem

AddSystem(config: SystemConfig) -> None

Adds a (assumed-properly-initialized) SystemConfig to the sim config

AddTaskflow

AddTaskflow(config: TaskflowConfig) -> None

Adds a (assumed-properly-initialized) TaskflowConfig to the sim config.

GetEntities

GetEntities() -> list[EntityConfig]

Get the EntityConfigs for all entities on this sim config, besides the SimEntity

GetFieldEffects

GetFieldEffects() -> list[FieldEffectConfig]

Get the FieldEffectConfigs for all FieldEffects on this sim config

GetSimEndTime

GetSimEndTime() -> timestamp

Get the time the sim will automatically end.

GetSimEntity

GetSimEntity() -> EntityConfig

Get the EntityConfig for the (singleton) SimEntity.

GetSimStartTime

GetSimStartTime() -> timestamp

Get the time of the sim clock will read at the beginning of the sim. This value will not be applicable if UsCurrentTime = true

GetSystems

GetSystems() -> list[SystemConfig]

Get the SystemConfigs for all systems on this sim config

GetTaskflows

GetTaskflows() -> list[TaskflowConfig]

Get the TaskflowConfigs for all taskflows on this sim config

HasSimEndTime

HasSimEndTime() -> bool

True if the sim has an end time (EndDateTAI)

RemoveEntity

RemoveEntity(config: EntityConfig) -> None

Removes this referenced Entity_Base from the sim config

RemoveFieldEffect

RemoveFieldEffect(config: FieldEffectConfig) -> None

Removes this referenced FieldEffectConfig from the sim config

RemoveSimEndTime

RemoveSimEndTime() -> None

Removes the timestamped-based sim end condition

RemoveSystem

RemoveSystem(config: SystemConfig) -> None

Removes this referenced SystemConfig from the sim config

RemoveTaskflow

RemoveTaskflow(config: TaskflowConfig) -> None

Removes this referenced Taskflow instance from the sim config.

SetSimEndTime

SetSimEndTime(end_simtime: timestamp) -> None

Set the time the sim will automatically end.

SetSimEntity

SetSimEntity(new_sim_entity: EntityConfig) -> None

Set the EntityConfig for the (singleton) SimEntity.

SetSimStartTime

SetSimStartTime(start_simtime: timestamp) -> None

Set the time the sim clock will read when beginning the sim. This value is not applicable if UseCurrentTime = True.

UsesCurrentTime

UsesCurrentTime() -> bool

True if the sim sets the time to real-world time when starting the sim.

SimState

SimState(value: SupportsInt)

Members:

Loading : Load the sim config as a starting point, independent of any other clients.

Lobby : Wait for other clients to finish connecting/loading, hang out (if applicable).

Sync : With a final client list known, enter a process where we ensure all clients are joined and warmed up before Init/Running Simstate is made available. Additionally, if a certain option is chosen, stay in SimState::Sync to enable a Sim Editing mode that hasn't run system init or update functions.

Init : In this state and future, operations that would result in a SaveSim having many differences are accepted. Without impinging on timing of updates as the Runtime state is hit, we do a final step where everything runs their init() functions, optionally with order dependencies where applicable, and we wait for ALL inits on ALL programs to finish. (TBD) For sims that are resuming from a snapshot, this MIGHT be skipped/modified?

Runtime : Timed updates begin. Physics starts moving.

Paused : (UNUSED, MAY CHANGE) In this state, we stop all network nodes if possible so something big like a host migration can happen.

Playback : (UNUSED, MAY CHANGE) In this state, the state of the Platform is being driven by recorded transactional state changes that are being streamed as PlatformOrders by one (?) of the network nodes.

Stopping : In this state, the platform is treated as undefined because network nodes are expected to disconnect at any moment. Any time a network node is in this state, the network node should work to and/close the local representation of the simulation

Init class-attribute

Init: SimState

Loading class-attribute

Loading: SimState

Lobby class-attribute

Lobby: SimState

Paused class-attribute

Paused: SimState

Playback class-attribute

Playback: SimState

Runtime class-attribute

Runtime: SimState

Stopping class-attribute

Stopping: SimState

Sync class-attribute

Sync: SimState

name property

name: str

value property

value: int

SubscriptionHandle

entityId property

entityId: UUID

Entity ID the subscription applies to.

handle_id property

handle_id: UUID

Randomly generated for each subscription, and used to find a specific one for Unsubscribe() or ending a transient subscription. Not part of the identity of the subscription for key matching purposes.

independentThread property

independentThread: bool

Whether the subscribe delegate will run on its own independent thread, or otherwise be run on a threadpool (better performance but less safe from deadlocks). Not used to identify a match for a publish.

topic property

topic: str

Topic string

SystemConfig

SystemConfig()

Bases: ParamMap

active property writable

active: bool

If Active: false, this System will load but not init or update. Python systems will not load.

freqType property writable

freqType: UpdateTimeDomain

Frequency Type (st.UpdateTimeDomain). If Sim, affected by sim timescale. No effect for Python Systems.

frequency property writable

frequency: float

Update rate in Hz. Python Systems use a value from instance params instead.

nametag property writable

nametag: str

System Nametag, used to apply this System to Entities.

singleton property writable

singleton: bool

If two Singleton Systems with the same Source are in a sim, they will be combined.

source property writable

source: str

C++ DLL or Python file to load for this System.

type property writable

type: SystemType

System Type: Normal (C++), Taskflow/TaskflowTask, or Python.

SystemType

SystemType(value: SupportsInt)

Members:

Normal : Typical C++ System that inits and updates on its own.

Taskflow : Taskflow which contains a set of TaskflowTask Systems.

TaskflowTask : Systems that are initted and updated by a Taskflow.

Internal : System with extra capabilities, reserved for internal use.

Python : System that represents a Python program that joins the sim.

Internal class-attribute

Internal: SystemType

Normal class-attribute

Normal: SystemType

Python class-attribute

Python: SystemType

Taskflow class-attribute

Taskflow: SystemType

TaskflowTask class-attribute

TaskflowTask: SystemType

name property

name: str

value property

value: int

TaskflowConfig

TaskflowConfig()

active property writable

active: bool

If Active: false, this Taskflow will load but not init or update.

freqType property writable

freqType: UpdateTimeDomain

Frequency Type (st.UpdateTimeDomain). If Sim, affected by sim timescale.

frequency property writable

frequency: float

Update rate in Hz.

nametag property writable

nametag: str

Taskflow Nametag.

systems property writable

systems: list[str]

List of TaskflowTask-type Systems on this Taskflow.

type property writable

type: TaskflowType

Taskflow Type (default: DependencyGraph).

TaskflowType

TaskflowType(value: SupportsInt)

Members:

DependencyGraph

DependencyGraph class-attribute

DependencyGraph: TaskflowType

name property

name: str

value property

value: int

UUID

FromString staticmethod

FromString(uuid_str: str, use_hyphens: bool = True) -> UUID

Parse UUID string. Currently assuming all hex alpha chars are lowercase.

Generate staticmethod

Generate() -> UUID

Randomly generate a version 4, variant 1 UUID.

IsValid staticmethod

IsValid(uuid: UUID) -> bool

Validate UUID bytes (true if valid UUID).

IsValidStr staticmethod

IsValidStr(uuid_str: str) -> bool

Validate UUID string (true if valid UUID). This does not check proper version or anything other than proper formatting.

UpdateTimeDomain

UpdateTimeDomain(value: SupportsInt)

Members:

Sim

IRL

NoSleep

IRL class-attribute

IRL: UpdateTimeDomain

NoSleep class-attribute

NoSleep: UpdateTimeDomain

Sim class-attribute

Sim: UpdateTimeDomain

name property

name: str

value property

value: int

VarType

VarType(value: SupportsInt)

Members:

Uninitialized

Unrecognized

bytes

bitset64

bool

uint8

uint16

uint32

uint64

int8

int16

int32

int64

duration

timestamp

uuid

entityID

entityRef

entityRefUnresolved

float : NOTE: python "float" is actually VarType double

double : python type is "float"

char

doubleV2 : python type is numpy array

doubleV3 : python type is numpy array

doubleV4 : python type is numpy array

doubleM2x2 : python type is numpy matrix

doubleM3x3 : python type is numpy matrix

doubleM4x4 : python type is numpy matrix

doubleM5x5 : python type is numpy matrix

doubleM6x6 : python type is numpy matrix

string

paramArray : python type is a list of the member type

paramMap

Uninitialized class-attribute

Uninitialized: VarType

Unrecognized class-attribute

Unrecognized: VarType

bitset64 class-attribute

bitset64: VarType

bool class-attribute

bool: VarType

bytes class-attribute

bytes: VarType

char class-attribute

char: VarType

double class-attribute

double: VarType

doubleM2x2 class-attribute

doubleM2x2: VarType

doubleM3x3 class-attribute

doubleM3x3: VarType

doubleM4x4 class-attribute

doubleM4x4: VarType

doubleM5x5 class-attribute

doubleM5x5: VarType

doubleM6x6 class-attribute

doubleM6x6: VarType

doubleV2 class-attribute

doubleV2: VarType

doubleV3 class-attribute

doubleV3: VarType

doubleV4 class-attribute

doubleV4: VarType

duration class-attribute

duration: VarType

entityID class-attribute

entityID: VarType

entityRef class-attribute

entityRef: VarType

entityRefUnresolved class-attribute

entityRefUnresolved: VarType

float class-attribute

float: VarType

int16 class-attribute

int16: VarType

int32 class-attribute

int32: VarType

int64 class-attribute

int64: VarType

int8 class-attribute

int8: VarType

paramArray class-attribute

paramArray: VarType

paramMap class-attribute

paramMap: VarType

string class-attribute

string: VarType

timestamp class-attribute

timestamp: VarType

uint16 class-attribute

uint16: VarType

uint32 class-attribute

uint32: VarType

uint64 class-attribute

uint64: VarType

uint8 class-attribute

uint8: VarType

uuid class-attribute

uuid: VarType

name property

name: str

value property

value: int

timestamp

timestamp()

from_datetime staticmethod

from_datetime(date_time: Any) -> timestamp

Construct a timestamp object from a Python datetime. This interprets the input as UTC (converting from any timezone if needed) and then converts that UTC time to the simulation's TAI clock.

as_datetime

as_datetime() -> typing.Any

Gets the timestamp as a Python datetime. This converts the time from the TAI clock to UTC.

Raises ValueError if the UTC instant falls during a leap second, because Python datetime cannot represent 23:59:60.

as_tai_string

as_tai_string() -> str

Return a string of the timestamp, keeping it as TAI clock. See this for more clock choice details: https://stackoverflow.com/a/64084510/11502722

as_utc_string

as_utc_string() -> str

Return a string of the timestamp after converting it to UTC. See this for more clock choice details: https://stackoverflow.com/a/64084510/11502722

BeforeInit

BeforeInit(delegateFn: Callable[[], None]) -> None

Set a function to be called before the simulation is allowed to continue to Init state.

BeforeRuntime

BeforeRuntime(delegateFn: Callable[[], None]) -> None

Set a function to be called before the simulation is allowed to continue to Runtime state.

GetThisSystem

GetThisSystem() -> SystemConfig

OnScreenAlert

OnScreenAlert(message: str, topic: str, severity: Severity, transmit: bool = True) -> None

Send alert that is shown on all app screens, is deduplicated by topic name, and is erased after a few seconds. If transmit is false, the alert is only shown inside this app.

OnScreenLogMessage

OnScreenLogMessage(message: str, category: str, severity: Severity, transmit: bool = True) -> None

Send message that is shown on all app screens, and stays in a log. If transmit is false, the message is only shown inside this app.

connect_to_sim

connect_to_sim(sys_argv: Sequence[str]) -> None

Connect to a running simulation as a ServerAsLocalClient. sys_argv - insert python sys.argv here.

get_entities

get_entities() -> list[Entity]

get_nametag

get_nametag() -> str

leave_sim

leave_sim() -> None

Leave the sim without ending it for other users/programs.

logger_error

logger_error(msg: str) -> None

Output logger error

logger_fatal

logger_fatal(msg: str) -> None

Output logger fatal error

logger_info

logger_info(msg: str) -> None

Output logger information

logger_warn

logger_warn(msg: str) -> None

Output logger warnings

standalone_sim

standalone_sim(path: PathLike | str | bytes) -> None

Run a simulation that is self-contained within this Python process. path - Filepath of sim config.

stop_sim

stop_sim() -> None

Stop the sim, which ends it for all users/programs.