冰焦玛 2021-12-24 15:32 采纳率: 40%
浏览 184
已结题

ROS2 roscore出错

我是按照https://docs.ros.org/en/foxy/Installation/Ubuntu-Development-Setup.html


//输入 roscore

Traceback (most recent call last):
  File "/usr/bin/roscore", line 72, in <module>
    import roslaunch
  File "/usr/lib/python3/dist-packages/roslaunch/__init__.py", line 62, in <module>
    from .scriptapi import ROSLaunch
  File "/usr/lib/python3/dist-packages/roslaunch/scriptapi.py", line 42, in <module>
    import roslaunch.parent
  File "/usr/lib/python3/dist-packages/roslaunch/parent.py", line 54, in <module>
    import roslaunch.server
  File "/usr/lib/python3/dist-packages/roslaunch/server.py", line 79, in <module>
    from rosgraph_msgs.msg import Log
ImportError: cannot import name 'Log' from 'rosgraph_msgs.msg' (/home/hjxian/ros2_foxy/ros2-linux/lib/python3.6/site-packages/rosgraph_msgs/msg/__init__.py)

请问这个该如何解决

输入 Building ROS 2 on Ubuntu Linux里的
. ~/ros2_foxy/install/local_setup.bash 是可以的

但是输入 installing ROS 2 on Ubuntu Linux里的
. ~/ros2_foxy/ros2-linux/local_setup.bash 会出错

[connext_cmake_module] Warning: The location at which Connext was found when the workspace was built [[/home/rosbuild/rti_connext_dds-5.3.1]] does not point to a valid directory, and the NDDSHOME environment variable has not been set. Support for Connext will not be available.

  • 写回答

0条回答 默认 最新

    编辑
    预览

    报告相同问题?

    问题事件

    • 系统已结题 12月31日
    • 创建了问题 12月24日