dialogos-project / dialogos

The DialogOS dialog system.
https://www.dialogos.app
GNU General Public License v3.0
21 stars 8 forks source link

ROS-plugin inhibits start when ROSserver isn't running regardless of whether ROSnodes are present #177

Closed timobaumann closed 5 years ago

timobaumann commented 5 years ago

The ROS plugin needs some way of knowing whether the dialog to be executed contains a ROS node and only attempt to start a ROS connection in that case. Also, need to timeout with a reasonable threshold.

@alexanderkoller, @akoehn: do you know of functionality to check whether nodes of certain types are reachable from the start node?

alexanderkoller commented 5 years ago

You could do a DFS using the Node#getEdges method.

alexanderkoller commented 5 years ago

Hi, I would like to urgently make a release 2.1.1 of DialogOS because 2.1.0 has bugs that make it unrunnable. Given this issue, should the ROS plugin be part of the release, or should I comment it out for now? @timobaumann

timobaumann commented 5 years ago

this is actually only problematic for dialog models that contain a ROS node (or probably: have contained one in the past...). Thus, it won't affect any users that don't use ROS (and those using ROS should be prepared to have a ROS installation available).

You can hence leave it in, it should not cause any problems.

alexanderkoller commented 5 years ago

Ok.

Should the version of the ROS plugin be kept equal to the version number of DialogOS itself, as for the other plugins? Or do you want to control the ROS plugin version by hand?

I made a note about the version of the ROS plugin in #175, but I can't remember what I meant with that.

alexanderkoller commented 5 years ago

Hang on, just to double-check: What is the current behavior of the ROS plugin? Will it try to make a ROS connection when the plugin is loaded (i.e. at startup of DialogOS) or when a dialog with ROS nodes in it is loaded/started?

I understood your initial issue description to mean that the plugin tries to make the ROS connection at DialogOS startup time if it is installed, not just if a dialog with ROS nodes is executed. This would obviously be bad - just because someone installed the ROS plugin doesn't mean that they have a ROS server running, or even know what ROS is.

timobaumann commented 5 years ago

connecting to ROS is in PluginRuntime, i.e., when you run a dialog (not at DialogOS startup). The plugin runtime will now only connect if there's a topic to listen/write to AND there's a node of our type in the graph.

timobaumann commented 5 years ago

I previously made sub-versions (2.1.0.x) and may have hard-wired these in install4j. Maybe that's what's meant with the comment in #175. Please feel free to update the ROS-plugin version to 2.1.1, thanks!

alexanderkoller commented 5 years ago

Ok, thanks!