Chuyển đến nội dung
Skillpedia
Khác15k · #11095

navigate-to

Skill này làm gì

Skill đưa một xe đến địa điểm đã chọn trong mô phỏng CARLA. Skill dành cho người muốn một xe tự lái đến một điểm cụ thể.

Khi nào nên dùng

  • ✓Khi bạn muốn xe ego được lái đến một vị trí cụ thể.
  • ✓Khi bạn muốn lập kế hoạch tuyến giữa hai điểm mà không lái.
  • ✓Khi bạn muốn xe tuân thủ hoặc bỏ qua đèn giao thông trên đường.

Liên kết skill

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/navigate-to/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/navigate-to/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy lái xe ego đến ngã tư tại âm 24, âm 57, và dừng lại khi tới nơi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent lập kế hoạch tuyến, rồi chạy một vòng lặp trong đó agent điều hướng bám theo tuyến, tránh vật cản và tuân thủ đèn giao thông trừ khi bạn yêu cầu bỏ qua. Vòng lặp kết thúc khi tới nơi hoặc khi hết thời gian.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Navigate a vehicle to a destination

Paths. scripts/… and references/… 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.

Point-to-point autonomous driving. go drives the ego to a destination with a navigation agent that plans a route and follows it while avoiding obstacles and obeying (or ignoring, on request) traffic lights. route just plans the path.

This is distinct from the sibling driving skills: control-vehicle is manual actuator input; control-traffic is the Traffic Manager making cars roam; this drives one car to a specific place.

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs (incl. agents import)
- [ ] Step 2: Have an ego (spawn-vehicles ego) and a destination (world-data/map-waypoints)
- [ ] Step 3: go (drive) — or route (plan only). Runs a tick loop until arrival/timeout

Commands need CARLA_HOST/CARLA_PORT + CARLA_ROOT from scripts/env.sh. Negative coordinates: use the = form (--to=-24,-57,0.6).

Step 1: Check prerequisites

bash scripts/check_env.sh

FAILs if the agents package isn't importable — set CARLA_ROOT to a carla checkout so PythonAPI/carla/agents is on PYTHONPATH.

Step 3: Navigate

source scripts/env.sh

# plan a route and draw it (no driving)
python3 scripts/navigate.py route --from=0,0,1 --to=-24,-57,1 --draw

# drive the ego there (BasicAgent, obeys lights)
python3 scripts/navigate.py go --to=-24,-57,1 --speed 25

# a cautious/aggressive style
python3 scripts/navigate.py go --to=-24,-57,1 --agent behavior --behavior aggressive

# ignore lights (e.g. an emergency run) and give it more time
python3 scripts/navigate.py go --to=100,20,1 --ignore-lights --seconds 120

go targets the ego (role hero) by default; --id/--filter for another vehicle. It blocks until the car arrives (agent.done()) or --seconds elapses.

Examples

Example 1: drive to a spot

User says: "drive the ego to (−24, −57)"

go --to=-24,-57,1. It plans, drives, and prints "arrived" on success.

Example 2: go to a resolved element

User says: "drive to the 4-way junction in the middle"

map-waypoints junctions --arms 4 → pick its centre → go --to=<centre>.

Example 3: just the route

User says: "what's the route from here to the depot?"

route --from=<here> --to=<depot> --draw → maneuver list + drawn path.

Troubleshooting

Problem: cannot import agents Cause: the agents package (checkout-only) isn't on PYTHONPATH. Solution: set CARLA_ROOT to a carla checkout; env.sh adds PythonAPI/carla.

Problem: it never arrives / stops at timeout Cause: unreachable destination, too little time, or stuck in traffic. Solution: verify the destination is on a road (map-waypoints waypoint), raise --seconds, or --ignore-vehicles to push through.

Problem: the car doesn't move in sync mode Cause: go ticks the world itself in sync mode; if another process also ticks, they fight. Solution: run one ticker. In async it just drives.

Problem: it stops at every red light forever Cause: dense traffic / lights. Solution: --ignore-lights (and/or the control-traffic-lights skill to free them).

Outputs

Server state — the vehicle drives to the destination (or a planned route + drawn overlay for route). No file. go reports arrival or timeout.

Detail (agent types, route planner, run-step loop, sync interaction) in references/navigation.md.

Câu hỏi thường gặp

Nếu xe không bao giờ tới nơi thì sao?

Vòng lặp kết thúc khi hết thời gian, nên lần chạy không tiếp tục mãi.

Đây có giống lái thủ công không?

Không. Điều khiển thủ công gửi đầu vào trực tiếp, còn skill này dùng agent điều hướng cho cả chuyến đi.

Làm sao lập kế hoạch tuyến mà không lái?

Lệnh route lập kế hoạch đường đi giữa hai điểm và không làm xe di chuyển.

Chi tiết

Mô tả gốc của tác giả

Drives a vehicle to a destination autonomously using CARLA's navigation agents (BasicAgent/BehaviorAgent/ConstantVelocityAgent), or plans a route between two points with GlobalRoutePlanner. The agent handles routing, obstacle avoidance and traffic-light obedience. Use when the user asks to "drive the ego to (x,y,z)", "navigate to the junction", "go to that location", "plan a route from A to B", or "make the car drive itself somewhere specific". Manual control is control-vehicle; autopilot roaming is control-traffic.

repo: carla-simulator/carla

Độ phổ biến

Sao GitHub
15k
Vị trí xếp hạng
#11095
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự