debug-navmesh
它能做什么
这项技能检查行人能否在 CARLA 地图上导航。适合导入了地图,或发现行人不肯移动的开发者。
适用场景
- ✓当你想查看地图上的可行走区域时。
- ✓当你导入了地图,需要确认行人导航是否正常时。
- ✓当带有 AI 控制器的行人不移动时。
技能链接
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/debug-navmesh/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查地图上的行人导航网格是否已加载,并显示可行走区域。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在导航网格上随机采样大量位置。如果采样结果有效,说明网格存在,采样点还可以绘制出来,展示其覆盖范围。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Debug the pedestrian navmesh
Paths.
scripts/…andreferences/…below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
CARLA does not expose navmesh geometry, but every location from
get_random_location_from_navigation() sits on the walkable mesh. Sampling many
of them validates the navmesh loaded and visualises its coverage — the
check to run after importing a map, or when walkers refuse to move.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Validate — confirm the navmesh exists and its extent
- [ ] Step 3: (rendered view) Sample + draw to see the walkable area
Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh.
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 2: Validate (works headless)
source scripts/env.sh
python3 scripts/navmesh.py validate --count 500
PASS reports the number of valid points, unique locations, and the walkable span.
FAIL (exit 1) means get_random_location_from_navigation() returned nothing — no
usable navmesh, so pedestrians with a WalkerAIController will not navigate.
Step 3: Visualise (rendered server)
python3 scripts/navmesh.py sample --count 2000 --life 120
Draws the sampled points via world.debug; the dotted region is walkable. Needs a
windowed/packaged server (headless -nullrhi draws nothing — see debug-draw).
Examples
Example 1: after importing a map
User says: "I imported a town — did the pedestrian nav build?"
validate → PASS with a sensible span means yes; FAIL means the nav mesh is
missing and must be rebuilt during import.
Example 2: walkers won't move
User says: "my pedestrians just stand still"
validate. If it FAILs, the navmesh is the cause; if it PASSes, look at the
WalkerAIController wiring (owned by the walker-spawning skill), not the map.
Example 3: see the walkable area
User says: "show me where pedestrians can walk"
sample --count 3000 --life 180 on a rendered server; inspect the point cloud.
Troubleshooting
Problem: validate FAILs on a freshly imported map
Cause: pedestrian navigation was not generated/exported for the map.
Solution: rebuild the map's nav mesh in the import pipeline; then re-validate.
Problem: sample prints a count but nothing is visible
Cause: headless -nullrhi server, or the camera is far from the coverage bounds.
Solution: use a rendered server and move the spectator over the reported bounds.
Problem: very few unique locations Cause: navmesh is tiny or degenerate (a sliver of walkable area). Solution: check the source geometry / sidewalks in the imported map.
Outputs
validate: a PASS/FAIL report with coverage bounds and walkable span.sample: a transient point overlay of the walkable area (rendered view).
Detail (navmesh basics, WalkerAIController link, import checklist) in references/navmesh.md.
常见问题
检查失败意味着什么?
导航网格没有返回任何可用位置,因此带有 AI 控制器的行人将无法导航。
需要渲染画面吗?
验证步骤不需要,但绘制可行走区域需要能够渲染的服务器。
要采样多少个点?
由你决定,例如 500 个采样点。
详情
作者的原始描述
Visualises and validates a map's pedestrian navigation mesh by sampling walkable locations (get_random_location_from_navigation) and drawing them as debug points. Use when the user asks to "show/visualise the pedestrian navmesh", "check walkable areas", "validate pedestrian navigation after a map import", or "why won't my walkers move". Confirms the navmesh loaded and how far it covers.
repo: carla-simulator/carla
热度
- GitHub 星标
- 15k
- 排名
- #11092
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
create-leaderboard-route
15k帮你的智能体通过在模拟器视角中放置路径点和场景触发器,构建 CARLA Leaderboard 路线文件,并对其进行检查和排序。
package-leaderboard-agent
15k帮你的智能体把驾驶智能体打包成 Docker 镜像,用于提交 CARLA Leaderboard,并检查文件夹结构,测试镜像能否加载它。
read-leaderboard-results
15k帮你的智能体阅读 CARLA Leaderboard 结果文件,解释每条路线的得分和违规情况,并按另一规则版本重新计分。
run-leaderboard-evaluation
15k帮你的智能体用你的驾驶智能体在一组路线上运行 CARLA Leaderboard 评估器,先检查设置,并保存可以恢复的检查点。