ROS -- 初級練習中遇到的問題記錄
1. 執行rosrun turtlesim turtlesim_node,出現
“QXcbConnection: Could not connect to display”
解決:由於我是用docker安裝的ubuntu容器,在容器中安裝的ROS,執行會出現這個問題~~換成有桌面的Ubuntu,再次執行就正常了,可以出現圖形~~~
2. 執行rosnode list,出現
ERROR: Unable to communicate with master!
解決: 教程中示例講解為,執行 roscore,另開一個終端
3. 執行roscore ,出現
roscore cannot run as another roscore/master is already running.
Please kill other roscore/master processes before relaunching.
解決:killall -9 roscore 或者 killall -9 rosmaster
4. NameError : AddTwoIntResponse is not defined
解決: 自己粗心了,示例程式碼是AddTwoIntsResponse,,自己寫的少了個s
5. 執行 roswtf,提示了關於node的error,如下
執行rosnode kill 後,再去執行roswtf,還是會出現同樣問題
解決: 先徹底清除roscore 後,再執行roswtf,將不會再出現類似問題
-----------------2018.08.28-------------
6. roslaunch 啟動節點出現 [roslaunch][ERROR] OSError(8, Exec format error),,If it is a script, you may be missing a ‘#!’ Declaration at the top
具體圖示:
應該是交叉編譯的問題,即我把arm上的編譯產物放在x86上跑,便會遇到這類問題~~~
具體參照連結:https://answers.ros.org/question/9496/roscore-errors-out/
-----------------2018.09.01-------------
7. 寫了個測試節點發資料,原有節點接收資料時,出現
WARN] [1511259980.900398]: Could not process inbound connection: [/rosbridge_websocket] is not a publisher of [/ui_action]. Topics are [['/text_to_speech', 'std_msgs/String'], ['/speech_to_text', 'std_msgs/String'], ['/rosout', 'rosgraph_msgs/Log']]{'message_definition': 'string data\n', 'callerid': '/rosbridge_websocket', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/ui_action', 'type': 'std_msgs/String'}
解決: 傳送節點的topic型別設定錯誤導致,修改後正常