Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: user_guidelines gen error & Updating link of message description document #66

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/user_guidelines/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

set -e

# 检查 python 命令是否存在
if command -v python >/dev/null 2>&1; then
PYTHON=python
# 检查 python3 命令是否存在
if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
else
# 如果 python 命令不存在,检查 python3 命令是否存在
if command -v python3 >/dev/null 2>&1; then
PYTHON=python3
# 如果 python3 命令不存在,检查 python 命令是否存在
if command -v python >/dev/null 2>&1; then
PYTHON=python
else
# 如果 pythonpython3 命令都不存在,显示错误信息并退出脚本
# 如果 python3python 命令都不存在,显示错误信息并退出脚本
echo "Error: Python 3.x not found. Please install Python 3.x or modify script to use appropriate command." >&2
exit 1
fi
Expand Down
10 changes: 6 additions & 4 deletions docs/user_guidelines/generate_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ def _preprocess(self, edition: str, pathdir: Path, suffix: str = ".md") -> None:
pathfiles = [str(path) for path in pathdir.glob(f"**/*{suffix}")]

# 使用 fileinput.input() 函数读取多个文件
with fileinput.input(files=pathfiles, inplace=True, backup=".bak", encoding="utf-8") as f:
# with fileinput.input(files=pathfiles, inplace=True, backup=".bak", encoding="utf-8") as f:
with fileinput.input(files=pathfiles, inplace=True, backup=".bak") as f:
keep = True

# 遍历行, 处理起始为 <!-- ifconfig:: --> 终止为 <!-- end --> 标记的行
Expand Down Expand Up @@ -235,7 +236,8 @@ def _run_doxygen(self) -> None:
target_string = target_string.replace("\\", "/")

# 使用 fileinput 模块操作文件
for line in fileinput.input(str(pathfile_doxyfile), inplace=True, encoding="utf-8"):
# for line in fileinput.input(str(pathfile_doxyfile), inplace=True, encoding="utf-8"):
for line in fileinput.input(str(pathfile_doxyfile), inplace=True):
# Replace the target string
line = re.sub(original_string, target_string, line, flags=re.MULTILINE)
# Write the file out again
Expand Down Expand Up @@ -304,8 +306,8 @@ def process(self):
# 拷贝项目整体文件夹至生成目录
self._copy_project_for_preprocess(self.source, self.tadsim_docs_dir_dist)

# 预处理, 通过标记筛选文件内容
self._preprocess(edition=self.edition, pathdir=self.tadsim_docs_dir_sphinx)
# # 预处理, 通过标记筛选文件内容
# self._preprocess(edition=self.edition, pathdir=self.tadsim_docs_dir_sphinx)

# 运行 Doxygen
self._run_doxygen()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TAD Sim 提供了 `tx_simvehicle` (乘用车动力学模型) 作为核心被控
- location.proto, 对应的 TOPIC 为 ``LOCATION``
- vehState.proto, 对应的 TOPIC 为 ``VEHICLE_STATE``

对应 protobuf 的详细字段参考 [仿真消息说明文档](./403.仿真消息说明.md#3-仿真消息说明) 的定义.
对应 protobuf 的详细字段参考 [403.仿真消息说明](./403.仿真消息说明.md#3-仿真消息说明) 的定义.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ TAD Sim 支持真值传感器仿真, 平台提供默认配置参数, 并支持
### 6.5.2 数据获取

打开 SensotTruth 模块, 模块将广播过滤后的 traffic 消息 .Topic: ``TXSIM_SENSOR_OBJECT``, 依赖camera、lidar、ultrasonic 传感器, 如果指定了 -device, topic 为 ``TXSIM_SENSOR_OBJECT_{id}``.
详细信息见 [TAD Sim系统消息定义](https://doc.weixin.qq.com/sheet/e3_AYIAKQZaABoLqLUV4KmRMeXIjEXUu?scode=AJEAIQdfAAoRpj2akxAYIAKQZaABo&tab=mwzam3)
详细信息见 [403.仿真消息说明](./403.仿真消息说明.md#3-仿真消息说明) 的定义.


## 6.6 IMU 仿真
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 3. 仿真消息说明

见 [腾讯文档 TAD_Sim 消息说明](https://doc.weixin.qq.com/sheet/e3_AYIAKQZaABoSjqd81bFQWODMbOrxX?scode=AJEAIQdfAAok7l0rAy)
见 [腾讯文档 TAD_Sim 消息说明](https://doc.weixin.qq.com/sheet/e3_AVwAKQaaAB480BcFBYISxG1eFNjZE?scode=AEwA3wKoAGM30VymmLAVwAKQaaAB4%3FnewPad%3D1&tab=njdi31)