Environment setup
You must source this script in every bash terminal you use ROS in.
source /opt/ros/noetic/setup.bash
It can be convenient to automatically source this script every time a new shell is launched. These commands will do that for you.
起首需要将ROS的环境设置脚本添加到终端程序的初始化脚本里;
(之后每次打开终端程序都会主动进行ROS系统环境的初始化)
echo “source /opt/ros/noetic/setup.bash” >> ~/.bashrc
source ~/.bashrc
6.测试环节