多ROS环境

在多个ros环境中进行切换时,通过下面的设置.bashrc可以实现终端环境的切换
在这里插入图片描述

如果是ros2的foxy环境时输入foxy,如果是ros1的noetic环境时使用noetic:
在这里插入图片描述

alias foxy="unset ROS\_DISTRO && \
unset ROS\_ROOT && \
unset ROS\_PACKAGE\_PATH && \
unset ROS\_MASTER\_URI && \
unset ROS\_VERSION && \
unset ROS\_PYTHON\_VERSION && \
unset ROS\_ETC\_DIR && \
unset CMAKE\_PREFIX\_PATH && \
source /opt/ros/foxy/setup.bash"

alias noetic="unset ROS\_DISTRO && \
unset ROS\_ROOT && \
unset ROS\_PACKAGE\_PATH && \
unset ROS\_MASTER\_URI && \
unset ROS\_VERSION && \
unset ROS\_PYTHON\_VERSION && \
unset ROS\_ETC\_DIR && \
unset CMAKE\_PREFIX\_PATH && \
source /opt/ros/noetic/setup.bash"

alias galactic="unset ROS\_DISTRO && \
unset ROS\_ROOT && \
unset ROS\_PACKAGE\_PATH && \
unset ROS\_MASTER\_URI && \
unset ROS\_VERSION && \
unset ROS\_PYTHON\_VERSION && \
unset ROS\_ETC\_DIR && \
unset CMAKE\_PREFIX\_PATH && \
source /opt/ros/galactic/setup.bash"
posted @ 2024-12-15 18:15  白云千载尽  阅读(21)  评论(0)    收藏  举报  来源