環境 Ubuntu 16.04 ,ROS kinetic
問題1:
/home/acl/rbx1/build/rbx1_nav/setup_custom_pythonpath.sh: 5: exec: /home/acl/rbx1/src/rbx1_nav/cfg/CalibrateAngular.cfg: Permission denied
/home/acl/rbx1/build/rbx1_nav/setup_custom_pythonpath.sh: 5: exec: /home/acl/rbx1/src/rbx1_nav/cfg/CalibrateLinear.cfg: Permission denied
rbx1_nav/CMakeFiles/rbx1_nav_gencfg.dir/build.make:65: recipe for target '/home/acl/rbx1/devel/include/rbx1_nav/CalibrateAngularConfig.h' failed
make[2]: *** [/home/acl/rbx1/devel/include/rbx1_nav/CalibrateAngularConfig.h] Error 126
make[2]: *** 正在等待未完成的任務....
rbx1_nav/CMakeFiles/rbx1_nav_gencfg.dir/build.make:83: recipe for target '/home/acl/rbx1/devel/include/rbx1_nav/CalibrateLinearConfig.h' failed
make[2]: *** [/home/acl/rbx1/devel/include/rbx1_nav/CalibrateLinearConfig.h] Error 126
CMakeFiles/Makefile2:851: recipe for target 'rbx1_nav/CMakeFiles/rbx1_nav_gencfg.dir/all' failed
make[1]: *** [rbx1_nav/CMakeFiles/rbx1_nav_gencfg.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

解決:
賦予cfg檔案夾可執行權限,首先找到你的cfd檔案夾的路徑(比如我的路徑是/home/acl/rbx1/src/rbx1_nav/cfg),然后執行以下指令:
chmod -R +x /home/acl/rbx1/src/rbx1_nav/cfg
問題2:
編譯通過后,按照以下指令啟動可執行檔案時報錯:
rosrun rbx1_nav calibrate_linear.py
報錯;
[rosrun] Couldn't find executable named calibrate_linear.py below /home/acl/rbx1/src/rbx1_nav
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/acl/rbx1/src/rbx1_nav/nodes/calibrate_linear.py

原因:
calibrate_linear.py檔案沒有可執行權限,
解決:
按照報錯的路徑找到calibrate_linear.py,右鍵屬性->權限,勾選上“允許作為程式可執行檔案(E)”,如下圖紅框中所示:

再次運行以下指令即可成功運行該檔案啟動機器人,
rosrun rbx1_nav calibrate_linear.py
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/132275.html
標籤:其他
