Skip to content

Platform Release v0.45.2

Choose a tag to compare

@connorjak connorjak released this 22 Feb 08:50
72106b0

This new Space Teams PRO version has been released and is available for download on spaceteamspro.com.

Space Teams PRO releases that start with 0. are all Beta releases, meaning we have relaxed standards for stability, performance, and backwards compatibility as we quickly introduce new features. Please contact us directly (support@SimDynamX.com) if you are interested in using Space Teams in an environment where software stability is critical.

Most notable changes since v0.44.2:

General

  • Parameters now have a key string limit of 31 characters long
    • param_key_t now uses a static_string object for better performance and to fix some obscure DLL issues.
  • New Visualizer Entity Type for holographic rendering of curves and 3D shapes.
    • Documentation coming soon! For now, you can access these in the Add Entity menu in the sim UI.
  • Additional helper functions available for generating sets of points for curve rendering
    • Documentation coming soon
  • Entity_Camera removed CaptureOnMovement behavior, which means we save on performance.
  • Python API added bindings for UUID class st.UUID
    • Equivalent of C++ spaceteams::uuid::UUID_t
  • Python API fixed many docstrings and default-value-views
  • Work-in-progress planet altimetry raytracing utilities

Dynamics

  • Fixed an issue which caused the SPICE propagator to not set acceleration of moving bodies.
    • Without this fix, the ST_Rigid_Body propagator was appearing to double the gravitational acceleration of bodies by the sun (and other bodies) because it didn't "know" that the resident frame of the entity, such as Earth-Centered Inertial frame, was already accelerating with respect to the sun.
  • New setQuaternion() function for PhysEffect for use for RotationOverride effect type.
    • Not yet working in python code! Use .setVector( ) and .magnitude = instead for now

Publish/Subscribe

  • The SimGlobals DispatchEvent and AddEventListener functions have been renamed to Publish and Subscribe, with similar functionality.
    • The names of the concepts involved have changed too. A Publish sends a "Message" with a "payload" on a particular topic and entityId. A Subscribe subscribes on the same topic and entityId. When Subscribe is called, a Subscriber Delegate function is passed which runs when the Message is received with the payload as the input.
    • Python code using the st.DispatchEvent, etc naming does not need to be updated immediately to match the new name, but these old named functions are deprecated and should eventually be updated.
    • AddTransientEventListener is now SubscribeOnce
  • Publish/Subscribe New Functionality
    • An optional entityId argument is available to make your Publish/Subscribe more specific. If unspecified, the entityId is the SimEntity's entityId. This should be used to make messages on a topic specific to a certain entity in cases where multiple entities in the simulation are doing a similar thing and may otherwise receive each others messages when subscribing.
    • Before this update, the Events (now Messages) executed delegate functions in one of two ways:
      • Immediately, in the same thread as the DispatchEvent call
      • During the Order Executor thread loop, which processes all incoming data to the program, blocking while the delegate function is running
    • After this update, to avoid most issues with deadlocking, all Publishes only enqueue a Message, and all Subscriber delegates are only ran asynchronously in one of two modes:
      • If argument independentThread is true, the delegate is ran in its own thread. This is a suitable default.
      • Else, the delegate is ran in either its own thread or some program-dependent threadpool that has lower overhead. This is a better option if your delegate is expected to be called many times per second, should take less than 10 milliseconds to run, and does NOT wait for other conditions to be met before returning. Without independentThread, there is more risk of a deadlock situation due to the structure of your simulation code.

Request/Response

  • New SimGlobals functions Request and Respond are a new programming feature in Space Teams.
    • Use Request / Respond in situations where you want to get data or request an action that you do not have access to in the current System or thread you are programming in. The behavior can be treated somewhat similarly to HTTP requests.
    • Only one Response is expected for a single Request. Any more responses than one are treated as an error. So, don't set up Respond() on the same topic/entity twice, or include code that takes in more data to decide whether to respond.
  • A Respond call sets up a delegate function that takes a Request's payload as input and returns a "Response" payload as output. A Request call sends a payload along with a unique request ID to the entire STP sim and waits for the first Response that it receives on the same request ID. When the response is received, the Request returns the response payload.
  • Respond is a blocking call, and has a timeout argument
    • timeout defaults to 10 (real-world) seconds
    • The timeout happens if a response isn't received in time, no matter if a responder exists somewhere in the sim.
    • This timeout will end the blocking call and return an invalid object
      • In C++, this is an invalid std::optional value
      • In Python, this is a None object
    • Always check the output of the Request
      • C++:
        auto response = SimGlobals::Request(...);
        if(!response)
        {
            //Do something to handle failure, log an error, or fatal-log and stop the sim.
        }
      • Python:
        response = st.SimGlobals.Request(...)
        if response is None:
            #Do something to handle failure, log an error, or fatal-log and stop the sim.
    • RequestAsync is an alternative function available in C++ where the std::future object is returned for the user to implement their own waiting scheme.
    • RequestAsyncWithDelegate is suitable for situations when you want to wrap some Request/Response code with a delegate function that will be ran with the received response payload to transform it into a more structured form. A good example of this is for CaptureImageAsync, where we have a recv-delegate that rearranges the parameter response into a CapturedImage object which fulfills the future the CaptureImageAsync returns.
  • Respond and RequestAsyncWithDelegate also have optional independentThread, with the same behavior as described above.
  • Request/Respond also allow setting a more specific entityId to filter which Responders will respond.

CaptureImage

  • Making use of Request/Response, we have the CaptureImageAsync and CaptureImageBlocking functions available as an alternative to CaptureImage/OnImageReceived.
  • CaptureImageBlocking allows the user to make much more simple usage of the Camera entity type Unreal rendering. Instead of registering an OnImageReceived delegate function, the C++ or Python code will blocking-wait until the image is captured and received before continuing.
    • A timeout argument is required, and should probably be set to at least 1 second if not 10 to handle lag spikes.

Key Known Issues

  • Python API docs missing named sub-modules #103
  • Planet shadows disappear for single frames when leaving planet surface #179
  • Unreliable download of SpaceTeamsPRO .zip file #171
  • SimGlobals::DoesResponderExist() is unreliable.
  • PhysEffect.setQuaternion not working in Python

NOTE: We have moved the bulk of the Known Issues into the Issues section of the SpaceTeamsPRO repo. Now, we only report issues in this section if they are:

  • A major issue that will be encountered by most users
  • A known regression that is new in this release
  • A known issue with new functionality

Also look at https://github.com/SimDynamX/SpaceTeamsPRO/issues to see all publicly reported issues and their current status.

Automated Git Changelog:

What's Changed

Full Changelog: SimDynamX/SC_Platform@v0.44.2...v0.45.2

Do not download the "Assets" files below; they are just a copy of this repository and are not used for Space Teams PRO. Space Teams PRO can be downloaded after making an account at spaceteamspro.com.