ROS -- 初级练习中遇到的问题记录

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u014001964/article/details/80904142

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,另开一个终端执行 rosnode list,既能显示结果为 /rosout,而非ERROR出现的

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类型设置错误导致,修改后正常

猜你喜欢

转载自blog.csdn.net/u014001964/article/details/80904142