Gazebo | Ignition | Community
Ask Your Question

Can i share variable within instances of model plugin?

asked 2019-10-25 09:42:49 -0500

Boris94 gravatar image

I am spawning objects that fall into virtual bin. I created model plugin for objects, that reads their positions. From what i understand each plugin is running separately for each model a they don't share any variables.

My goal is to delete last XY spawned objects if one of them is outside of the bin. Is there any way that i can share for example boolean within all instances of plugin, so when one object is out, other objects are also aware of this? thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-10-26 01:31:18 -0500

chapulina gravatar image

For this kind of functionality, I recommend you use a WorldPlugin, which has access to all objects at once.

edit flag offensive delete link more


i thought this might be best solution, going to try it on monday, thanks

Boris94 gravatar imageBoris94 ( 2019-10-26 19:39:55 -0500 )edit

Question Tools

1 follower


Asked: 2019-10-25 09:42:49 -0500

Seen: 173 times

Last updated: Oct 26 '19