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

Allow empty machine attribute #274

Closed
liborw opened this issue Aug 15, 2013 · 7 comments · Fixed by #1885
Closed

Allow empty machine attribute #274

liborw opened this issue Aug 15, 2013 · 7 comments · Fixed by #1885

Comments

@liborw
Copy link

liborw commented Aug 15, 2013

Allowing empty machine attribute of node tag would help to make a launch-files with optional machine argument.

An example:

<arg name="machine" default=""/>
<node name="some_name" pkg="some_pkg" type="some_type" machine="$(arg machine)"/>
@dirk-thomas
Copy link
Member

Wouldn't it be sufficient if you use localhost / 127.0.0.1?

@liborw
Copy link
Author

liborw commented Aug 19, 2013

It would, but it require to have defined localhost as a machine in every such launchfile.

@liborw
Copy link
Author

liborw commented Sep 5, 2013

I still think that allow machine to be empty would be the better solution.

This is what you are suggesting?

<machine name="localhost" address="localhost" env-loader="/opt/ros/hydro/env.sh"/>
<arg name="machine" default="localhost"/>
<node name="some_name" pkg="some_pkg" type="some_type" machine="$(arg machine)"/>

@dirk-thomas
Copy link
Member

dirk-thomas commented May 2, 2014

None of the attributes in roslaunch currently supports this kind of behavior. In order to stay consistent that rule would need to apply to all attributes (e.g. ns attribute of the group tag).

This would require some effort to investigate the effect on all attributes and describing the consequences of such a change. Since the maintainers do not have the time to address this in the near future the issue will be marked with the milestone untargeted.

Any contribution on this is highly welcome.

@dirk-thomas dirk-thomas added this to the untargeted milestone May 2, 2014
contradict pushed a commit to contradict/ros_comm that referenced this issue Aug 12, 2016
enable display of depth image thumbnails in rqt_bag
@furushchev
Copy link
Contributor

furushchev commented Sep 8, 2016

@dirk-thomas @liborw I've got the same issue.
How about to take localhost as a type of reserved word, and if node are written in launch files with machine="localhost", launch the node even if there is no declaration of <machine name="localhost" address="localhost" />?

@dirk-thomas
Copy link
Member

In the meantime some attributes started to allow empty values (e.g. the include tag #882). So allowing an empty machine tag doesn't sound that different anymore. A generic approach (optional attributes with an empty value are considered equal to the attribute not being specified) would be preferred. But any pull request would be appreciated. Also if it only implements the handling of an empty machine tag.

@peci1
Copy link
Contributor

peci1 commented Feb 16, 2020

Solution proposed in #1885.

dirk-thomas pushed a commit that referenced this issue Feb 20, 2020
* Allow empty machine tag.

Fixes #274.

* Fix tests for machine arg in node tag.

* Remove obsolete test.

* Remove obsolete test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants