You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CARLA version:0.9.12
Platform/OS:windows10
Problem you have experienced:set_autopilot API can't stop the vehicle
What you expected to happen:stop the vehicle from autopilot
Steps to reproduce:
In my python script. I set the autopilot to all spawned vehicle.
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(True)
It runed perfectly.
But,When I tried to stop all the vehicle(set_autopilot(False)),I failed to stop them. Those vehicle holds different VehicleControl VehicleControl(throttle=0.631335, steer=0.000000, brake=0.000000, hand_brake=False, reverse=False, manual_gear_shift=False, gear=1)
I can't apply any VehicleControl to any vehicle. How to stop those vehicle.
The API I tried:
(1)
vehicle_control = carla.VehicleControl(throttle=0.000000)
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(False)
carla.command.ApplyVehicleControl(vehicles,vehicle_control)
carla.command.ApplyTargetVelocity(vehicles,carla.Vector3D(0,0,0))
(2)
traffic_manager = client.get_trafficmanager()
traffic_manager.shut_down()
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(False)
carla.command.ApplyVehicleControl(vehicles,vehicle_control)
carla.command.ApplyTargetVelocity(vehicles,carla.Vector3D(0,0,0))
The text was updated successfully, but these errors were encountered:
CARLA version:0.9.12
Platform/OS:windows10
Problem you have experienced:set_autopilot API can't stop the vehicle
What you expected to happen:stop the vehicle from autopilot
Steps to reproduce:
In my python script. I set the autopilot to all spawned vehicle.
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(True)
It runed perfectly.
But,When I tried to stop all the vehicle(set_autopilot(False)),I failed to stop them. Those vehicle holds different VehicleControl VehicleControl(throttle=0.631335, steer=0.000000, brake=0.000000, hand_brake=False, reverse=False, manual_gear_shift=False, gear=1)
I can't apply any VehicleControl to any vehicle. How to stop those vehicle.
The API I tried:
(1)
vehicle_control = carla.VehicleControl(throttle=0.000000)
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(False)
carla.command.ApplyVehicleControl(vehicles,vehicle_control)
carla.command.ApplyTargetVelocity(vehicles,carla.Vector3D(0,0,0))
(2)
traffic_manager = client.get_trafficmanager()
traffic_manager.shut_down()
for vehicles in world.get_actors().filter('vehicle'):
vehicles.set_autopilot(False)
carla.command.ApplyVehicleControl(vehicles,vehicle_control)
carla.command.ApplyTargetVelocity(vehicles,carla.Vector3D(0,0,0))
The text was updated successfully, but these errors were encountered: