From d08ca65a12eea01a0d5a615696a1a6a73d16a91a Mon Sep 17 00:00:00 2001 From: nsubiron Date: Fri, 24 Nov 2017 18:35:24 +0100 Subject: [PATCH] How to add autopilot control, close #30, close #36 --- Docs/measurements.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Docs/measurements.md b/Docs/measurements.md index 94c031401..d6b730de6 100644 --- a/Docs/measurements.md +++ b/Docs/measurements.md @@ -82,6 +82,16 @@ brake | float | Brake input between [ 0.0, 1.0] hand_brake | bool | Whether the hand-brake is engaged reverse | bool | Whether the vehicle is in reverse gear +To activate the autopilot from the client, send this `autopilot_control` back +to the server. Note that you can modify it before sending it back. + +```py +measurements, sensor_data = carla_client.read_data() +control = measurements.player_measurements.autopilot_control +# modify here control if wanted. +carla_client.send_control(control) +``` + (*) The actual steering angle depends on the vehicle used. The default Mustang has a maximum steering angle of 70 degrees (this can be checked in the vehicle's front wheel blueprint).