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

电脑上同时安装了ros2和ros1
总是报错

ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.

总结起来需要做的是两点

  1. bashrc或者zshrc文件中的ros1相关的内容注释掉;
  2. 把之前在ros1环境下编译的东西全部删掉,只保留src;
  3. source一下bashrc/zshrc文件即可。

你可能感兴趣的:(ros)