Repository navigation
Platform Release v0.45.2
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_tnow uses astatic_stringobject for better performance and to fix some obscure DLL issues.
- New
VisualizerEntity Type for holographic rendering of curves and 3D shapes.- Documentation coming soon! For now, you can access these in the
Add Entitymenu in the sim UI.
- Documentation coming soon! For now, you can access these in the
- Additional helper functions available for generating sets of points for curve rendering
- Documentation coming soon
Entity_Cameraremoved CaptureOnMovement behavior, which means we save on performance.- Python API added bindings for UUID class
st.UUID- Equivalent of C++
spaceteams::uuid::UUID_t
- Equivalent of C++
- 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 forPhysEffectfor use forRotationOverrideeffect type.- Not yet working in python code! Use
.setVector( )and.magnitude =instead for now
- Not yet working in python code! Use
Publish/Subscribe
- The SimGlobals
DispatchEventandAddEventListenerfunctions have been renamed toPublishandSubscribe, with similar functionality.- The names of the concepts involved have changed too. A
Publishsends a "Message" with a "payload" on a particulartopicandentityId. ASubscribesubscribes on the sametopicandentityId. WhenSubscribeis 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.
AddTransientEventListeneris nowSubscribeOnce
- The names of the concepts involved have changed too. A
- Publish/Subscribe New Functionality
- An optional
entityIdargument 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
independentThreadis 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.
- If argument
- An optional
Request/Response
- New SimGlobals functions
RequestandRespondare 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
Respondcall sets up a delegate function that takes a Request's payload as input and returns a "Response" payload as output. ARequestcall 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, theRequestreturns the response payload. Respondis a blocking call, and has atimeoutargumenttimeoutdefaults 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::optionalvalue - In Python, this is a
Noneobject
- In C++, this is an invalid
- 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.
- C++:
RequestAsyncis an alternative function available in C++ where thestd::futureobject is returned for the user to implement their own waiting scheme.RequestAsyncWithDelegateis 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 forCaptureImageAsync, where we have a recv-delegate that rearranges the parameter response into aCapturedImageobject which fulfills the future theCaptureImageAsyncreturns.
RespondandRequestAsyncWithDelegatealso have optionalindependentThread, with the same behavior as described above.- Request/Respond also allow setting a more specific
entityIdto filter which Responders will respond.
CaptureImage
- Making use of Request/Response, we have the
CaptureImageAsyncandCaptureImageBlockingfunctions available as an alternative toCaptureImage/OnImageReceived. CaptureImageBlockingallows the user to make much more simple usage of the Camera entity type Unreal rendering. Instead of registering anOnImageReceiveddelegate function, the C++ or Python code will blocking-wait until the image is captured and received before continuing.- A
timeoutargument is required, and should probably be set to at least 1 second if not 10 to handle lag spikes.
- A
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.setQuaternionnot 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
- Publish/Subscribe instead of Event naming, Request / Response new functionality by @connorjak in SimDynamX/SC_Platform#3113
- More lander sim progress by @connorjak in SimDynamX/SC_Platform#3112
- SPICE Acceleration fix, PhysEffect quaternion rotation helper by @connorjak in SimDynamX/SC_Platform#3115
- Avoid deadlocks from subscriber/blocking-request interaction by @connorjak in SimDynamX/SC_Platform#3117
- Fix Blocking Request from Python Async Thread by @connorjak in SimDynamX/SC_Platform#3114
- Gnc 6 dof convex by @WaylonLee in SimDynamX/SC_Platform#3116
- Visualizer Entity Type and Sim Creation Integration by @jc-luna in SimDynamX/SC_Platform#3106
- Param key error tweak by @connorjak in SimDynamX/SC_Platform#3119
- v0.45.2 final changes by @connorjak in SimDynamX/SC_Platform#3120
Full Changelog: SimDynamX/SC_Platform@v0.44.2...v0.45.2