使用以下命令编译代码:

catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release

 出现:

ERROR: cannot launch node of type [x_rio/rosbag_node]: Cannot locate node of type [rosbag_node] in package [x_rio]. Make sure file exists in package path and permission is set to executable (chmod +x)

 可能原因之一:

看似编译通过,但是没有生成可执行文件

解决:

检查是否生成了可执行文件: 确保 rosbag_node 可执行文件被正确生成并位于 bin/ 目录中。例:你可以通过以下命令检查

ls ~/catkin_ws/devel/lib/x_rio/rosbag_node

如果没有生成,删除dev和build文件夹,重新编译。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐