parameters: (self)
docstring: Get all the vehicles (both controlled by SUMO and Webots) already present in the world.
docstring_summary: Get all the vehicles (both controlled by SUMO and Webots) already present in the world.
docstring_tokens: Get all the vehicles ( both controlled by SUMO and Webots ) already present in the world .
function: def get_initial_vehicles(self):
          """Get all the vehicles (both controlled by SUMO and Webots) already present in the world."""
          for i in range(0, self.vehiclesLimit):
              defName = "SUMO_VEHICLE%d" % self.vehicleNumber
              node = self.getFromDef(defName)
              if node:
                  self.vehicles[i] = Vehicle(node)
                  self.vehicles[i].name.setSFString("SUMO vehicle %i" % self.vehicleNumber)
                  self.vehicleNumber += 1
              else:
                  break
          for i in range(0, self.vehiclesLimit):
              defName = "WEBOTS_VEHICLE%d" % self.webotsVehicleNumber
              node = self.getFromDef(defName)
              if node:
                  self.webotsVehicles[i] = WebotsVehicle(node, self.webotsVehicleNumber)
                  self.webotsVehicleNumber += 1
              else:
                  break
function_tokens: def get_initial_vehicles ( self ) : for i in range ( 0 , self . vehiclesLimit ) : defName = "SUMO_VEHICLE%d" % self . vehicleNumber node = self . getFromDef ( defName ) if node : self . vehicles [ i ] = Vehicle ( node ) self . vehicles [ i ] . name . setSFString ( "SUMO vehicle %i" % self . vehicleNumber ) self . vehicleNumber += 1 else : break for i in range ( 0 , self . vehiclesLimit ) : defName = "WEBOTS_VEHICLE%d" % self . webotsVehicleNumber node = self . getFromDef ( defName ) if node : self . webotsVehicles [ i ] = WebotsVehicle ( node , self . webotsVehicleNumber ) self . webotsVehicleNumber += 1 else : break