leaderboard/leaderboard/autoagents/ros_agent.py
def on_vehicle_control(self, data):
        """
        callback if a new vehicle control command is received
        """
        cmd = carla.VehicleControl()
        cmd.throttle = data.throttle
        cmd.steer = data.steer
        cmd.brake = data.brake
        cmd.hand_brake = data.hand_brake
        cmd.reverse = data.reverse
        cmd.gear = data.gear
        cmd.manual_gear_shift = data.manual_gear_shift
        self.current_control = cmd
        if not self.vehicle_control_event.is_set():
            self.vehicle_control_event.set()
        # After the first vehicle control is sent out, it is possible to use the stepping mode
        self.step_mode_possible = True

        callback if a new vehicle control command is received
        
callback if a new vehicle control command is received
callback if a new vehicle control command is received
def on_vehicle_control(self, data):
        cmd = carla.VehicleControl()
        cmd.throttle = data.throttle
        cmd.steer = data.steer
        cmd.brake = data.brake
        cmd.hand_brake = data.hand_brake
        cmd.reverse = data.reverse
        cmd.gear = data.gear
        cmd.manual_gear_shift = data.manual_gear_shift
        self.current_control = cmd
        if not self.vehicle_control_event.is_set():
            self.vehicle_control_event.set()
        self.step_mode_possible = True
def on_vehicle_control ( self , data ) : cmd = carla . VehicleControl ( ) cmd . throttle = data . throttle cmd . steer = data . steer cmd . brake = data . brake cmd . hand_brake = data . hand_brake cmd . reverse = data . reverse cmd . gear = data . gear cmd . manual_gear_shift = data . manual_gear_shift self . current_control = cmd if not self . vehicle_control_event . is_set ( ) : self . vehicle_control_event . set ( ) self . step_mode_possible = True
callback if a new vehicle control command is received
callback if a new vehicle control command is received
"""
        callback if a new vehicle control command is received
        """ # After the first vehicle control is sent out, it is possible to use the stepping mode
self
data