0
$\begingroup$

Rosanswers logo

what are the differents between "name" and "type" in roslaunch for nodes?

<launch>
  <master auto="start"/>
<node pkg="tf" type="static_transform_publisher" name="fake_localize" args="0 0 0 0 0 0 map odom 10"/>
</launch>

Originally posted by Mohsen Hk on ROS Answers with karma: 139 on 2013-05-02

Post score: 5

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Type is the file you want to launch in the package whereas the name is a unique identifier for your node.

In your example it will launch static_transform_publisher in package tf with name of the node as fake_localize.

http://www.ros.org/wiki/roslaunch/XML/node


Originally posted by rohan with karma: 358 on 2013-05-02

This answer was ACCEPTED on the original site

Post score: 13


Original comments

Comment by Mohsen Hk on 2013-05-02:
tnx for your link. for complete the answre, for example in my launch file >> the "fake_localize"(NAME) node is uniqe arbitrary name, (you can see in rxgraph!) using the "static_transform_publisher" (TYPE) executable from the "tf" package.

Comment by rohan on 2013-05-02:
Yes that's right!

$\endgroup$
0
$\begingroup$

Rosanswers logo

The easiest way to find out what to initialize in the type is to go to your CMakeLists.txt. Find the line that says something like add_executable(blah_blah src/whatever.cpp) then blah_blah is the type. Another way is to cd to your /devel/lib/ folder, dig into your package and there you will see the executables(probably, in green).


Originally posted by oogabooga with karma: 51 on 2014-12-04

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by Fenglong on 2022-04-14:
Thanks for the answer. While using C++ the "type" in launch file should be the name of the target in CMakeLists.txt, but when using Python it should be the "XXX.py", is that correct?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.