- type是节点文件的名称,如对
demo_hello.cpp
节点,type="demo_hello"
- name是节点的名称,如在语句
ros::init(argc,argv,"talker");
中 ,name="talker"
,如果在launch文件中将name设为其他名称"bar"
,那即便代码里写的是"talker"
,也会被覆盖为"bar"
pkg/type/name: The argument pkg points to the package associated with the node that is to be launched, while “type” refers to the name of the node executable file. It is also possible to overwrite the name of the node with the name argument, this will take priority over the name that is given to the node in the code.
参考链接:LAUNCH FILES