运行条件ubuntu-16.04 ros-kinetic
隔段时间运行roslaunch 会如下错误
[mavros_posix_sitl.launch] is neither a launch file in package [px4] nor is [px4] a launch file name
The traceback for the exception was written to the log file
解决:
1.在Firmware下面打开终端,打开环境变量设置,查看为Firmware设置的路径
$ gedit ~/.bashrc
2.Firmware下新终端分别输入如下三条命令
source ~/Firmware/Tools/setup_gazebo.bash ~/Firmware ~/Firmware/build/posix_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/Firmware/Tools/sitl_gazebo
source ~/.bashrc
成功解决问题!
环境变量配置这个问题一直是细节性问题,要多摸索,慢慢理解,终会理解,问题终会解决,加油!!!文章来源:https://www.toymoban.com/news/detail-602446.html
参考文档:PX4设置环境变量后,roslaunch启动报错_God__hao的博客-CSDN博客文章来源地址https://www.toymoban.com/news/detail-602446.html
到了这里,关于roslaunch运行px4功能包 报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!