Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing model with JointPositionController plugin leads to 'entity does not exist' error messages. #2165

Closed
jrutgeer opened this issue Sep 22, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jrutgeer
Copy link
Contributor

When a model that uses the JointPositionController plugin is removed from the simulation through the UserCommands service, repeating error messages appear:

[Err] [EntityComponentManager.cc:1083] Trying to create a component of type [8319580315957903596] attached to entity [12], but this entity does not exist. This create component request will be ignored.

See the attached example files:

Run gz sim -r world.sdf
Spawn a model with the spawn script: ./spawn_boxes
Remove the boxes with the remove script: ./remove_boxes

--> The error messages start.

Edit the boxes.sdf file and remove the JointPositionController plugin.
Repeat the test.

--> No error messages after removal.

example.tar.gz

@jrutgeer jrutgeer added the bug Something isn't working label Sep 22, 2023
@arjo129
Copy link
Contributor

arjo129 commented Nov 6, 2023

I think if we solve #2217 this will no longer be an issue.

@jrutgeer
Copy link
Contributor Author

jrutgeer commented Nov 6, 2023

Closing as duplicate of #2217.

@jrutgeer jrutgeer closed this as completed Nov 6, 2023
arjo129 added a commit that referenced this issue Nov 7, 2023
This commit tries to address #2217.

In particular if a user despawns an entity, the associated plugin gets
removed. This should prevent issues like #2165. TBH I'm not sure if this
is the right way forward as a system should technically be able to
access any entity in a traditional ECS. I also recognize that there may
be some performance impact. I will need to quantify this.

Signed-off-by: Arjo Chakravarty <[email protected]>
jrutgeer added a commit to jrutgeer/gz-sim that referenced this issue Nov 21, 2023
arjo129 pushed a commit that referenced this issue Nov 22, 2023
)

* Temporary fix for #2165 until #2217 is resolved.

Signed-off-by: Johan Rutgeerts <[email protected]>

* Added comment to clarify the added code.

Signed-off-by: Johan Rutgeerts <[email protected]>

---------

Signed-off-by: Johan Rutgeerts <[email protected]>
arjo129 added a commit that referenced this issue Jul 9, 2024
This commit tries to address #2217.

In particular if a user despawns an entity, the associated plugin gets
removed. This should prevent issues like #2165. TBH I'm not sure if this
is the right way forward as a system should technically be able to
access any entity in a traditional ECS. I also recognize that there may
be some performance impact. I will need to quantify this.

Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129 added a commit that referenced this issue Jul 9, 2024
This commit tries to address #2217.

In particular if a user despawns an entity, the associated plugin gets
removed. This should prevent issues like #2165. TBH I'm not sure if this
is the right way forward as a system should technically be able to
access any entity in a traditional ECS. I also recognize that there may
be some performance impact. I will need to quantify this.

Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129 added a commit that referenced this issue Jul 17, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.
arjo129 added a commit that referenced this issue Jul 19, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.
arjo129 added a commit that referenced this issue Jul 22, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.
arjo129 added a commit that referenced this issue Jul 26, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.
arjo129 added a commit that referenced this issue Jul 26, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.

Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129 added a commit that referenced this issue Jul 26, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.

Signed-off-by: Arjo Chakravarty <[email protected]>
iche033 pushed a commit that referenced this issue Aug 1, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.

Signed-off-by: Arjo Chakravarty <[email protected]>
iche033 pushed a commit that referenced this issue Aug 2, 2024
n particular if a user despawns an entity, the associated plugin gets removed. This should prevent issues like #2165. TBH I'm not sure if this is the right way forward as a system should technically be able to access any entity in a traditional ECS.

The PR has now been reworked and greatly simplified. All we do is stop all worker threads if an entity is removed and then recreate remaining threads.

Signed-off-by: Arjo Chakravarty <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants