Wait for the plugin initialization#1872
Merged
iakov merged 4 commits intotrikset:masterfrom Dec 28, 2024
Merged
Conversation
345631f to
8ae1d87
Compare
8ae1d87 to
dfd576c
Compare
iakov
reviewed
Dec 28, 2024
AlexandrKudrya
pushed a commit
to AlexandrKudrya/trik-studio
that referenced
this pull request
Jan 20, 2025
* Wait for the plugin initialization --------- Upon initialization of the `EV3` kit plugin, a subscription to the [sensorAdded](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L128()) event in the `Box2DPhysicsEngine` is registered with a delay using [QTimerSingleShot(10)](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L112). While this does not pose an issue when utilizing `TRIK Studio`, it becomes problematic when using the `2D-model` [projectManager->open function](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/checker/twoDModelRunner/runner.cpp#L69), as the subscription is established too late. As a consequence, the sensors are not properly processed by `Box2D`. Co-authored-by: iakov <iakov@users.noreply.github.com>
iakov
added a commit
to iakov/trik-studio
that referenced
this pull request
Jan 29, 2025
* Wait for the plugin initialization --------- Upon initialization of the `EV3` kit plugin, a subscription to the [sensorAdded](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L128()) event in the `Box2DPhysicsEngine` is registered with a delay using [QTimerSingleShot(10)](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L112). While this does not pose an issue when utilizing `TRIK Studio`, it becomes problematic when using the `2D-model` [projectManager->open function](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/checker/twoDModelRunner/runner.cpp#L69), as the subscription is established too late. As a consequence, the sensors are not properly processed by `Box2D`. Co-authored-by: iakov <iakov@users.noreply.github.com>
iakov
added a commit
to iakov/trik-studio
that referenced
this pull request
Jan 29, 2025
* Wait for the plugin initialization --------- Upon initialization of the `EV3` kit plugin, a subscription to the [sensorAdded](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L128()) event in the `Box2DPhysicsEngine` is registered with a delay using [QTimerSingleShot(10)](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/common/twoDModel/src/engine/model/physics/box2DPhysicsEngine.cpp#L112). While this does not pose an issue when utilizing `TRIK Studio`, it becomes problematic when using the `2D-model` [projectManager->open function](https://github.com/trikset/trik-studio/blob/1281f48c8d1e50c7c16b4f164bd7cffa55d4d001/plugins/robots/checker/twoDModelRunner/runner.cpp#L69), as the subscription is established too late. As a consequence, the sensors are not properly processed by `Box2D`. Co-authored-by: iakov <iakov@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upon initialization of the
EV3kit plugin, a subscription to the sensorAdded event in theBox2DPhysicsEngineis registered with a delay using QTimerSingleShot(10). While this does not pose an issue when utilizingTRIK Studio, it becomes problematic when using the2D-modelprojectManager->open function, as the subscription is established too late. As a consequence, the sensors are not properly processed byBox2D.