ubuntu18.04配置ROS2出现的问题:“ROS_DISTRO was set to ‘dashing‘ before ”
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了ubuntu18.04配置ROS2出现的问题:“ROS_DISTRO was set to ‘dashing‘ before ”,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1166字,纯文字阅读大概需要2分钟。
内容图文
![ubuntu18.04配置ROS2出现的问题:“ROS_DISTRO was set to ‘dashing‘ before ”](/upload/InfoBanner/zyjiaocheng/928/aab03cf1a019478f8b74cbd193b431e3.jpg)
在安装完ROS2之后,打开终端选择ROS1或ROS2之后会出现提示:
ROS_DISTRO was set to 'dashing' before .
Please make sure that the environment does not mix paths from different distributions.
或
ROS_DISTRO was set to 'melodic' before .
Please make sure that the environment does not mix paths from different distributions.
好像目前没有发现忽略这个问题出现的bug
解决方法:
修改环境变量,避免两个版本冲突
sudo vim /opt/ros/melodic/share/ros_environment/catkin_env_hook/1.ros_distro.sh
# generated from ros_environment/env-hooks/1.ros_distro.sh.in
#if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "melodic" ]; then
# echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions."
#fi
#export ROS_DISTRO=melodic
ROS2:
sudo vim /opt/ros/dashing/share/ros_environment/environment/1.ros_distro.sh
# generated from ros_environment/env-hooks/1.ros_distro.sh.in
#if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "dashing" ]; then
# echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions."
#fi
#export ROS_DISTRO=dashing
将里面的内容全部注释即可
内容总结
以上是互联网集市为您收集整理的ubuntu18.04配置ROS2出现的问题:“ROS_DISTRO was set to ‘dashing‘ before ”全部内容,希望文章能够帮你解决ubuntu18.04配置ROS2出现的问题:“ROS_DISTRO was set to ‘dashing‘ before ”所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。