Generation

generate functionFri, 05 May 2023

Then, use dropped_vehicle on the apply_control method and pass “carla.VehicleControl” inside the “apply_control” function. In carla.VehicleControl, add parameters like throttle and steer. Try throttle range from 0.1 to 0.15 and steer range from 0.1 to 0.2 to turn right and keep on the same lane. So that our car doesn’t go out of the road. ● Now, drive straight with throttle 0.34 using the apply control method.

def throttle_steer(self,throttle,steer): self.carla_vehicle.apply_control(carla.VehicleControl(throttle=throttle, steer=steer))

Want to kickstart your project?Use the new AI Studio to create your code