【问题标题】:Couldn't rosrun turtlesim turtlesim_node无法 rosrun turtlesim turtlesim_node
【发布时间】:2019-02-08 03:36:32
【问题描述】:

我正在学习rosnode初学者教程http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes

环境是 Windows 10 / WSL。当我在运行“roscore”后输入命令“rosrun turtlesim turtlesim_node”时,出现以下错误:

wn-003% rosrun turtlesim turtlesim_node QXcbConnection: Could not connect to display zsh: abort (core dumped) rosrun turtlesim turtlesim_node

有什么解决办法吗?谢谢。

【问题讨论】:

    标签: ros coredump abort


    【解决方案1】:

    WLS 不支持图形界面。您需要初始化一些“x server for windows”应用程序,例如 Xming,然后在 WLS 终端中键入以下行:

    export DISPLAY=:0

    【讨论】:

      【解决方案2】:

      ROS 拥有强大的开源生态系统和对 Linux 操作系统的支持。对于初学者来说,最好直接在 Linux 机器上获得实践经验,因为它更容易,并且您会在遇到的错误时得到很好的支持。

      ROS 确实可以在 Windows 上运行,但它需要 Windows Subsystem for Linux (WSL),这是一个兼容层,允许在 Windows 10 上本地运行一大堆 Linux 二进制文件。随着 Windows 10 Creators Update 的出现,WSL进行了大量更新,现在可以运行 ROS lunar 和 melodic。

      您还需要在 Windows 10 机器上安装 BASH shell。

      按照 Microsoft 的这篇文章安装 WSL 和 BASH:install WSL on windows

      然后关注 janbernloehr 的这篇精彩文章:https://janbernloehr.de/2017/06/10/ros-windows

      【讨论】:

        猜你喜欢
        • 2021-10-27
        • 1970-01-01
        • 2016-12-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-01-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多