pschillinger / flexbe_chrome_app

Contains the source code of the FlexBE Chrome App.
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

[Question] Easy way to pass parameters to sub behaviors #7

Open achim-k opened 8 years ago

achim-k commented 8 years ago

Is there an easy way to pass parameters (private configuration) from a top-level behavior to its sub behaviors? How did you solve this? If I would use rosparams, I would need to manually include rospy in every behavior.

pschillinger commented 8 years ago

Private configuration is local (or "private") and cannot be directly passed to a sub behavior. It is only possible by setting userdata to this value and defining a respective input key or by using the behavior parameters.

However, I see the need for this in some situations and am already thinking about a way to enable some kind of passing such variables to embedded behaviors. Suggestions and ideas are welcome. Just keep in mind that it is important that a behavior can always be executed on its own, so any variable needs to have a well-defined default value if not embedded.