public void OnDestinationReceived(object sender, EventArgsLibrary.LocationArgs e) { if (e.RobotId == robotId) { destinationLocation = e.Location; } }
public void OnPhysicalPositionReceived(object sender, EventArgsLibrary.LocationArgs e) { if (robotId == e.RobotId) { currentLocation = e.Location; } }
public void OnGhostLocationReceived(object sender, EventArgsLibrary.LocationArgs e) { if (localWorldMap == null) { return; } if (localWorldMap.RobotId == e.RobotId) { localWorldMap.robotGhostLocation = e.Location; } }
public void OnWaypointReceived(object sender, EventArgsLibrary.LocationArgs e) { if (localWorldMap == null) { return; } if (RobotId == e.RobotId) { localWorldMap.waypointLocation = e.Location; } }
public void OnPhysicalPositionReceived(object sender, EventArgsLibrary.LocationArgs e) { if (localWorldMap == null) { return; } if (localWorldMap.RobotId == e.RobotId) { localWorldMap.robotLocation = e.Location; //Update de la robot Location dans la local world map OnLocalWorldMapForDisplayOnly(localWorldMap); //Event de transmission de la local world map } }
public void OnPhysicalPositionReceived(object sender, EventArgsLibrary.LocationArgs e) { if (!swTimeInterPhysicalPositionReceived.IsRunning) { swTimeInterPhysicalPositionReceived.Start(); } double InstantPhysicalPositionReceived = swTimeInterPhysicalPositionReceived.ElapsedMilliseconds; double elapsedTimeBetweenSamples = (InstantPhysicalPositionReceived - InstantPhysicalPositionReceived_1) / 1000; InstantPhysicalPositionReceived_1 = InstantPhysicalPositionReceived; if (robotId == e.RobotId) { currentLocationRefTerrain = e.Location; CalculateGhostPosition(elapsedTimeBetweenSamples); PIDPosition(elapsedTimeBetweenSamples); } }
//Input Events public void OnWaypointReceived(object sender, EventArgsLibrary.LocationArgs e) { wayPointLocation = e.Location; }