ROS_DISTRO was set to ‘noetic‘ before. Please make sure that the environment does not mix paths from

一、问题描述

Ubuntu20.04同时安装了ROS1和ROS2,打开终端出现警告:ROS_DISTRO was set to ‘noetic’ before. Please make sure that the environment does not mix paths from different distributions. 具体如下:
ROS_DISTRO was set to ‘noetic‘ before. Please make sure that the environment does not mix paths from_第1张图片

二、解决方法

出现该警告的原因在于环境变量中同时存在ROS1、ROS2,在.bashrc文件把ROS1的环境变量配置注释即可,如下:
打开文件目录 —>ctrl+h —> 打开.bashrc文件 —> 注释ROS1环境配置
ROS_DISTRO was set to ‘noetic‘ before. Please make sure that the environment does not mix paths from_第2张图片
ROS_DISTRO was set to ‘noetic‘ before. Please make sure that the environment does not mix paths from_第3张图片

你可能感兴趣的:(ROS,ubuntu)