control-vehicle
यह क्या करती है
यह स्किल CARLA सिमुलेशन में किसी एक गाड़ी को सीधे नियंत्रित करती है। यह उन लोगों के लिए है जो खुद गाड़ी चलाना चाहते हैं या कोई खास नियंत्रण कमांड परखना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप किसी खास गाड़ी को हाथ से स्टीयर, तेज़ या ब्रेक करना चाहते हैं।
- ✓जब आप गति लक्ष्य तय करना या गाड़ी का दरवाज़ा खोलना-बंद करना चाहते हैं।
- ✓जब आपको हाथ से ड्राइविंग रोकनी हो।
Skill का लिंक
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/control-vehicle/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“ego कार को आधे थ्रॉटल पर तीन सेकंड आगे चलाइए, फिर ब्रेक लगाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट चुनी गई गाड़ी को नियंत्रण इनपुट भेजता है, और पहले उस गाड़ी के लिए ऑटोपायलट बंद कर देता है। वह कमांड को एक तय समय तक रोके रख सकता है, और रोकने का कमांड हाथ से ड्राइविंग समाप्त करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Control a vehicle directly
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.
Drive one vehicle yourself: control input, Ackermann speed target, lights, doors,
physics. It targets the ego (role_name = hero) by default, or any vehicle by
--id / --role / --filter. This is manual control — control and
ackermann turn autopilot off first; for autonomous traffic use the
control-traffic skill instead.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Ensure a target vehicle exists (spawn-vehicles ego)
- [ ] Step 3: Apply the command (control / ackermann / lights / door / physics)
- [ ] Step 4: Confirm on a rendered server; `stop` to halt manual driving
Commands need CARLA_HOST/CARLA_PORT/TM_PORT from scripts/env.sh.
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 3: Control
source scripts/env.sh
# drive the ego forward for 3 s, then it brakes
python3 scripts/vehicle_control.py control --throttle 0.5 --hold 3
# turn while creeping forward
python3 scripts/vehicle_control.py control --throttle 0.3 --steer -0.4 --hold 2
# hold a target speed (built-in controller does throttle/brake for you)
python3 scripts/vehicle_control.py ackermann --speed 8
# lights: headlights + brake on; position off
python3 scripts/vehicle_control.py lights --on LowBeam,Brake --off Position
# left blinker on a specific car
python3 scripts/vehicle_control.py lights --filter '*prius*' --on LeftBlinker
# doors
python3 scripts/vehicle_control.py door --open FL,FR
python3 scripts/vehicle_control.py door --close All
# physics: read, then make it heavier / draggier
python3 scripts/vehicle_control.py physics --show
python3 scripts/vehicle_control.py physics --mass 2200 --drag 0.4
# emergency stop
python3 scripts/vehicle_control.py stop
# what ROS 2 topics drive this vehicle (read-only)
python3 scripts/vehicle_control.py ros-info
Driving it from ROS 2
On a server started with --ros2 ([[run-carla-server]] ROS2=1), the hero
vehicle exposes two command topics — the server subscribes, so the commands come
from outside this skill:
| Topic (DDS name) | Message | Maps to |
|---|---|---|
rt/carla/<ros_name>/vehicle_control_cmd |
carla_msgs/CarlaEgoVehicleControl |
carla.VehicleControl (throttle, steer, brake, hand_brake, reverse, gear, manual_gear_shift) |
rt/carla/<ros_name>/ackermann_control_cmd |
ackermann_msgs/AckermannDriveStamped |
carla.VehicleAckermannControl (steering_angle, speed, acceleration, jerk) |
ros-info prints them for the resolved vehicle plus a ready-to-run
ros2 topic pub line, and says so plainly when the target cannot be driven
from ROS: only role_name = hero gets subscribers (the server tests that string
in ActorDispatcher), so ordinary traffic never does. Spawn the hero with
[[spawn-vehicles]] ego --ros-name <name>.
You need the message definitions to publish. Verified: neither type ships with
a stock ROS 2 install, so ros2 topic pub carla_msgs/msg/... fails with an unknown
type until you provide them:
| Type | Where it comes from |
|---|---|
ackermann_msgs/AckermannDriveStamped |
sudo apt install ros-$ROS_DISTRO-ackermann-msgs |
carla_msgs/CarlaEgoVehicleControl |
not an apt package — build carla_msgs from carla-ros-bridge, or hand-write a one-message package (below) |
A minimal carla_msgs is enough and takes a minute — this exact recipe was used to
drive the hero from ROS (0 → 64 km/h) on a packaged server:
mkdir -p ws/src/carla_msgs/msg
cat > ws/src/carla_msgs/msg/CarlaEgoVehicleControl.msg <<'EOF'
std_msgs/Header header
float32 throttle
float32 steer
float32 brake
bool hand_brake
bool reverse
int32 gear
bool manual_gear_shift
EOF
# + a standard ament_cmake package.xml / CMakeLists.txt calling
# rosidl_generate_interfaces(${PROJECT_NAME} "msg/CarlaEgoVehicleControl.msg"
# DEPENDENCIES std_msgs)
colcon build --packages-select carla_msgs && source install/setup.bash
ros2 topic pub -r 20 /carla/hero/vehicle_control_cmd \
carla_msgs/msg/CarlaEgoVehicleControl "{throttle: 0.8}"
Field order is the contract, not the field names: CDR is positional
अक्सर पूछे जाने वाले सवाल
क्या यह ऑटोपायलट बंद करती है?
हाँ। हाथ से नियंत्रण से पहले उस गाड़ी का ऑटोपायलट बंद हो जाता है।
डिफ़ॉल्ट रूप से कौन-सी गाड़ी नियंत्रित होती है?
ego कार, यानी वह गाड़ी जिसका role name hero है।
क्या मैं ROS से गाड़ी नियंत्रित कर सकता हूँ?
हाँ। स्किल hero कार के ROS 2 कमांड टॉपिक बताती है, ताकि आप ROS से कमांड भेज सकें।
जानकारी
लेखक का मूल विवरण
Directly drives a specific vehicle on a running CARLA server — raw VehicleControl (throttle/steer/brake/reverse/hand-brake), Ackermann speed control, vehicle lights, opening/closing doors, and physics-control tuning; ros-info reports the native ROS 2 command topics (vehicle_control_cmd, ackermann_control_cmd) for the hero. Targets the ego by default. Use when the user asks to "drive/steer the car", "accelerate/brake/reverse", "set a target speed", "turn on the headlights/blinkers/brake lights", "open a door", "drive the car from ROS", or "change the vehicle's mass/drag/physics". This is manual
repo: carla-simulator/carla
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11089
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-leaderboard-route
15kयह आपके एजेंट को CARLA Leaderboard की रूट फ़ाइल बनाने में मदद करती है, जिसमें वेपॉइंट और सीन ट्रिगर कैमरे से लगाए जाते हैं।
package-leaderboard-agent
15kयह आपके एजेंट को CARLA Leaderboard के लिए Docker इमेज बनाने में मदद करती है, और जाँचती है कि इमेज में एजेंट सही लोड होता है।
read-leaderboard-results
15kयह आपके एजेंट को CARLA Leaderboard की नतीजा फ़ाइल पढ़कर हर रूट का स्कोर समझाने और दूसरे नियम संस्करण में फिर से स्कोर करने में मदद करती है।
run-leaderboard-evaluation
15kयह आपके एजेंट को रूट के सेट पर CARLA Leaderboard मूल्यांकन चलाने में मदद करती है, शुरू करने से पहले सेटअप जाँचकर और चेकपॉइंट सेव करके।
मिलती-जुलती skills
blucli
394kयह आपके एजेंट को blu कमांड से Bluesound और NAD स्पीकर खोजने, चलाने, रोकने, समूह बनाने और वॉल्यूम बदलने में मदद करती है।
camsnap
394kयह आपके एजेंट को नेटवर्क कैमरों और लोकल webcam से स्नैपशॉट, छोटी क्लिप या मोशन इवेंट लेने में मदद करती है, जो आपने सेट किए हों।
eightctl
394kयह आपके एजेंट को Eight Sleep pod की जांच और नियंत्रण करने में मदद करती है, जिसमें तापमान, अलार्म और नींद की समय-सारणी शामिल हैं।