本仓库维护了 ROS 2 官方文档的中文版本,可以在https://ros2docs.robook.org访问到在线文档.
本仓库的源码会通过 GitHub Action 自动发布至 GitHub Pages。
我们很欢迎大家为此仓库提交代码,帮助我们完善 ROS 2 的中文文档。
对官方文档(英文)的贡献可以参考:
Please see the Contributing to ROS 2 Documentation page to learn more.
向 ROS 2 源码项目贡献代码请参考 ROS 2 contributing guidelines。
如果你想在本地构建文档,请确保你的系统中安装了以下软件:
- make
- graphviz
With venv
# activate the venv
python3 -m venv ros2doc
# activate venv
source ros2doc/bin/activate
# install required packages
pip install -r requirements.txt -c constraints.txt
# deactivate the venv
(ros2doc) deactivate
目前的开发环境使用 Jammy 作为构建平台。
所有的 Python 依赖版本都被固定在 constraints 文件中,以确保构建可复现。
如果你想升级系统,请确保一切正常,然后使用 pip freeze > constraints.txt 锁定版本以升级。
对当前分支进行本地测试:
make html
sensible-browser build/html/index.html
To check the spelling, use:
make spellcheck
Note
If that detects specific words that need to be ignored, add it to codespell_whitelist.
To include any custom corrections that are to be applied, add it to codespell_dictionary.
对多站点版本的构建进行测试:
make multiversion
sensible-browser build/html/rolling/index.html
注意: 这个命令会忽略本地的工作空间变更,并从分支构建。