flexbe_app icon indicating copy to clipboard operation
flexbe_app copied to clipboard

Multiple instances of Flexbe

Open RhysMcK opened this issue 7 years ago • 6 comments
trafficstars

Hey @pschillinger ,

I am trying to control two difference robots by launching flexbe_app (roslaunch flexbe_app flexbe_full.launch) in two different namespaces, however the Flexbe_app seems to become unresponsive when i launch the 2nd instance. Is flexbe_app currently not support to run multiple instances, if so, is there a way to get this to work?

Thanks Phil!

RhysMcK avatar Jun 18 '18 22:06 RhysMcK

Unfortunately, this results from a limitation of the nwjs framework. In general, only one instance of an app can be running (i.e., one process). It is possible to open multiple additional windows in the same process and thus, pretend multi-instance apps, but this does not work well with ROS.

The main problem is that environment variables like the ROS master URI and also the namespace in which the flexbe_app should be running is given by the respective process and naturally, running a second app in the same namespace does not make much sense.

There might be a way around it, but it is non-trivial and I did not yet look too much into it. If you have any ideas how to address this, I am happy to discuss and will also look again myself if I find a good approach.

pschillinger avatar Jun 30 '18 14:06 pschillinger

Hi, as I ran into the same issue (want to control 2 robots with different ROS-Masters from one PC with 2 FlexBE apps), I wanted to ask if there is already a solution for that. Thanks!

manox avatar Mar 07 '19 10:03 manox

Hi, are there any updates on this? Our scenario is a bit different, we have one robot running onboard behaviors and want to control/supervise from different PCs. The FlexBE Apps are excluding between them, when a new FlexBE App is lauched blocks the previous one. Thanks!

hectorherrero avatar Feb 12 '21 10:02 hectorherrero

Is it possible to specify the namespace in which the flexbe controller should be running? I am not so much interested in the GUI app but rather the onboard behavior engine.

tropappar avatar Oct 11 '21 11:10 tropappar

This pull request allows to run the behavior engine in a sub-namespace, hence allowing multiple instances to run simultaneously. https://github.com/team-vigir/flexbe_behavior_engine/pull/155

tropappar avatar Nov 05 '21 12:11 tropappar

See https://github.com/team-vigir/flexbe_behavior_engine/pull/160

Noting this discussion for ROS 2 changes

dcconner avatar Apr 28 '23 20:04 dcconner