You're reading the documentation for a development version. For the latest released version, please have a look at Galactic.
Maintaining a source checkout of ROS 2 Xin
注解
For instructions on maintaining a source checkout of the latest development version of ROS 2, refer to Maintaining a source checkout of ROS 2 Rolling
如果你从源码上安装了ROS 2,那么自从你签出它之后,可能已经对源代码进行了修改。为了保持你的源码签出是最新的,你将不得不定期更新你的 ros2.repos
文件,下载最新的源码,并重建你的工作空间。
更新你的存储库列表
每个 ROS 2 版本都包括一个 ros2.repos
文件,其中包含该版本的存储库列表及其版本。
Latest ROS 2 Xin branches
If you wish to checkout the latest code for ROS 2 Xin, you can get the relevant repository list by running:
cd ~/ros2_xin
mv -i ros2.repos ros2.repos.old
wget https://raw.githubusercontent.com/ros2/ros2/xin/ros2.repos
cd ~/ros2_xin
mv -i ros2.repos ros2.repos.old
wget https://raw.githubusercontent.com/ros2/ros2/xin/ros2.repos
# CMD
cd \dev\ros2_xin
curl -sk https://raw.githubusercontent.com/ros2/ros2/xin/ros2.repos -o ros2.repos
# PowerShell
cd \dev\ros2_xin
curl https://raw.githubusercontent.com/ros2/ros2/xin/ros2.repos -o ros2.repos
更新你的存储库
You will notice that in the ros2.repos file, each repository has a version
associated with it that points to a particular commit hash, tag, or branch name.
It is possible that these versions refer to new tags/branches that your local copy of the repositories will not recognize as they are out-of-date.
Because of this, you should update the repositories that you have already checked out with the following command:
vcs custom --args remote update