在运行范例的launch文件时,提示
ERROR: cannot launch node of type [chapter2_tutorials/example2_a]: can't locate node [example2_a] in package [chapter2_tutorials]
在
chapter2_tutorials包中无法找到节点
example2_a
这是因为节点的名字不是文件
example2_a.cpp
的名字,而是CMakefile中add_executable指定的名字chap2_example1_a。
将范例中launch文件的<node name ="example1_a" pkg="chapter2_tutorials"
type="example1_a"/>
改为<node name ="example1_a" pkg="chapter2_tutorials" type="chap2_example1_a"/>即可。