之前博客《将ROS的功能包打包为deb文件,并且成功安装 》已经实现了将节点打包成deb包了。但是却没有roslaunch文件。
通过在CMakeLists.txt文件中加入
#包含launch
#install(DIRECTORY launch/
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
# PATTERN ".svn" EXCLUDE)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch")
即可实现打包launch文件
而打包节点的则是:
install(TARGETS single_led_locator_multi_spin_odom_ROI_from_mvcam_ID_decoding ekf_translater odom_translater point_subscriber_in_class navigation_traget
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
参考资料
https://blog.csdn.net/weixin_36607844/article/details/79963682