問題一.ROS_MASTER_URI is not defined in the environment.
這個錯誤其實是qt不能夠加載ROS的環境變量進來,解決辦法是必須先使用roscore在終端啓動ROS,再打開qt。這樣就解決了這個問題。
問題二.Debugging starts &warning: GDB: Failed to set controlling terminal.
解決步驟一:qt界面左邊,依次點擊 項目->build&run->run->勾選run in terminal。
步驟二:點擊 工具->選項->環境->system->/usr/bin/gnome-terminal -x (沒有的話可修改成這樣)或者/usr/bin/xterm -e或者/usr/bin/x-terminal-emulator -e。
這樣這個問題就解決了。
參考鏈接:https://blog.csdn.net/jz1570551401/article/details/78154164?locationNum=2&fps=1