ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

roslaunch default package

asked 2014-06-19 12:03:57 -0500

crpizarr gravatar image

In a .launch file inside a package, is it possible to omit the package name in a <node> tag if the node package is the same as the package the launcher lives in? I mean, I have a launcher with lines like this:

<launch>

<rosparam command="load" file="$(find my_package)/config/config.yaml" ns="configuration" />

<node pkg="my_package" name="node1" type="node1.py" output="screen" />

<node pkg="my_package" name="node2" type="node2.py" output="screen" />

<node pkg="my_package" name="node3" type="node3.py" output="screen" />

<node pkg="my_package" name="gui" type="gui.py" output="screen" required="true"/>

</launch>

If I want to change the package's name, I'll have to change the pkg argument of all the nodes. Is there a way to omit that, or at least to replace with something like "this" (or "self", as Python programmers use)?

Thanks

edit retag flag offensive close merge delete

Comments

1

My guess is no and if it was available I'd advise against it. If someone copies the launch to adapt it, everything will break. Changing all occurrences is an easy task for search and replace.

dornhege gravatar image dornhege  ( 2014-06-19 12:14:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-06-19 23:18:28 -0500

fergs gravatar image

You could use roslaunch args, but I would completely advise against that. Changing the name of a package is not something to be taken lightly, as it affects all downstream uses (roslaunch files, packages that find this package through catkin, dependency calculations, etc).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-19 12:03:57 -0500

Seen: 258 times

Last updated: Jun 19 '14