Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit cd2ee3ec authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

use actionRoll in abort criterion; use vehicleStopped property

parent c386e2d0
No related branches found
No related tags found
No related merge requests found
......@@ -593,7 +593,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return false;
}
return coasting && !ds.IsEqual(r.OperatingPoint.SimulationDistance);
return !actionRoll && !ds.IsEqual(r.OperatingPoint.SimulationDistance);
});
} catch (VectoSearchAbortedException) {
// search aborted, try to go ahead with the last acceleration
......@@ -745,7 +745,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
/// <returns></returns>
public IResponse DrivingActionHalt(Second absTime, Second dt, MeterPerSecond targetVelocity, Radian gradient)
{
if (!targetVelocity.IsEqual(0) || !DataBus.VehicleSpeed.IsEqual(0, 1e-3)) {
if (!targetVelocity.IsEqual(0) || !DataBus.VehicleStopped) {
Log.Error("TargetVelocity ({0}) and VehicleVelocity ({1}) must be zero when vehicle is halting!", targetVelocity,
DataBus.VehicleSpeed);
throw new VectoSimulationException(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment