按照官網的教程:http://wiki.ros.org/urdf/Tutorials/Using%20urdf%20with%20robot_state_publisher
學習的時候,在最後launch的時候出現了error:ERROR: cannot launch node of type [r2d2/state_publisher]: can't locate node [state_publisher] in package [r2d2]
最後在這位大神的回答中找到了答案:
http://blog.csdn.net/u013793399/article/details/51851383
就是在CMakelist.txt中添加:
catkin_package()