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

what are the differences between "name" and "type" in roslaunch?

asked 2013-05-02 03:55:52 -0600

Mohsen Hk gravatar image

updated 2013-05-02 17:03:49 -0600

joq gravatar image

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>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
13

answered 2013-05-02 04:12:10 -0600

rohan gravatar image

updated 2013-05-02 04:13:02 -0600

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

edit flag offensive delete link more

Comments

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.

Mohsen Hk gravatar image Mohsen Hk  ( 2013-05-02 04:25:00 -0600 )edit
1

Yes that's right!

rohan gravatar image rohan  ( 2013-05-02 04:31:03 -0600 )edit
4

answered 2014-12-04 04:10:33 -0600

oogabooga gravatar image

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).

edit flag offensive delete link more

Comments

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?

Fenglong gravatar image Fenglong  ( 2022-04-14 08:53:10 -0600 )edit

Question Tools

Stats

Asked: 2013-05-02 03:55:52 -0600

Seen: 14,446 times

Last updated: Dec 04 '14