RSS: Fix calculation of steering angle
As ad-rss-lib is using a right-handed and CARLA left-handed coordinate system, the calculation of the steering angle must be inverted + remove obsolete openscenario
This commit is contained in:
parent
9fcde86b05
commit
e70480c664
|
@ -467,7 +467,7 @@ bool RssCheck::CheckObjects(carla::client::Timestamp const ×tamp,
|
|||
|
||||
::ad::physics::Angle RssCheck::GetSteeringAngle(carla::client::Vehicle const &actor) const {
|
||||
auto const steer_ratio = actor.GetControl().steer;
|
||||
::ad::physics::Angle steering_angle(_maximum_steering_angle * steer_ratio);
|
||||
::ad::physics::Angle steering_angle(-1 * _maximum_steering_angle * steer_ratio);
|
||||
return steering_angle;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,218 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<OpenSCENARIO>
|
||||
<FileHeader revMajor="1" revMinor="0" date="2019-06-25T00:00:00" description="CARLA:FollowLeadingVehicle" author=""/>
|
||||
<ParameterDeclarations>
|
||||
<ParameterDeclaration name="$leadingSpeed" parameterType="double" value="2.0"/>
|
||||
</ParameterDeclarations>
|
||||
<CatalogLocations>
|
||||
</CatalogLocations>
|
||||
<RoadNetwork>
|
||||
<LogicFile filepath="Town01"/>
|
||||
<SceneGraphFile filepath=""/>
|
||||
</RoadNetwork>
|
||||
<Entities>
|
||||
<ScenarioObject name="ego_vehicle">
|
||||
<Vehicle name="vehicle.lincoln.mkz2017" vehicleCategory="car">
|
||||
<ParameterDeclarations/>
|
||||
<Performance maxSpeed="69.444" maxAcceleration="10.0" maxDeceleration="10.0"/>
|
||||
<BoundingBox>
|
||||
<Center x="1.5" y="0.0" z="0.9"/>
|
||||
<Dimensions width="2.1" length="4.5" height="1.8"/>
|
||||
</BoundingBox>
|
||||
<Axles>
|
||||
<FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3"/>
|
||||
<RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3"/>
|
||||
</Axles>
|
||||
<Properties>
|
||||
<Property name="type" value="ego_vehicle"/>
|
||||
<Property name="color" value="0,0,255"/>
|
||||
</Properties>
|
||||
</Vehicle>
|
||||
</ScenarioObject>
|
||||
<ScenarioObject name="adversary">
|
||||
<Vehicle name="vehicle.lincoln.mkz2017" vehicleCategory="car">
|
||||
<ParameterDeclarations/>
|
||||
<Performance maxSpeed="69.444" maxAcceleration="10.0" maxDeceleration="10.0"/>
|
||||
<BoundingBox>
|
||||
<Center x="1.5" y="0.0" z="0.9"/>
|
||||
<Dimensions width="2.1" length="4.5" height="1.8"/>
|
||||
</BoundingBox>
|
||||
<Axles>
|
||||
<FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3"/>
|
||||
<RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3"/>
|
||||
</Axles>
|
||||
<Properties>
|
||||
<Property name="type" value="simulation"/>
|
||||
<Property name="color" value="255,0,0"/>
|
||||
</Properties>
|
||||
</Vehicle>
|
||||
</ScenarioObject>
|
||||
</Entities>
|
||||
<Storyboard>
|
||||
<Init>
|
||||
<Actions>
|
||||
<GlobalAction>
|
||||
<EnvironmentAction>
|
||||
<Environment name="Environment1">
|
||||
<TimeOfDay animation="false" dateTime="2019-06-25T12:00:00"/>
|
||||
<Weather cloudState="free">
|
||||
<Sun intensity="1.0" azimuth="0.0" elevation="1.31"/>
|
||||
<Fog visualRange="100000.0"/>
|
||||
<Precipitation precipitationType="dry" intensity="0.0"/>
|
||||
</Weather>
|
||||
<RoadCondition frictionScaleFactor="1.0"/>
|
||||
</Environment>
|
||||
</EnvironmentAction>
|
||||
</GlobalAction>
|
||||
<Private entityRef="ego_vehicle">
|
||||
<PrivateAction>
|
||||
<TeleportAction>
|
||||
<Position>
|
||||
<WorldPosition x="150" y="133" z="0" h="0"/>
|
||||
</Position>
|
||||
</TeleportAction>
|
||||
</PrivateAction>
|
||||
<PrivateAction>
|
||||
<ControllerAction>
|
||||
<AssignControllerAction>
|
||||
<Controller name="EgoVehicleAgent">
|
||||
<Properties>
|
||||
<Property name="module" value="external_control" />
|
||||
</Properties>
|
||||
</Controller>
|
||||
</AssignControllerAction>
|
||||
<OverrideControllerValueAction>
|
||||
<Throttle value="0" active="false" />
|
||||
<Brake value="0" active="false" />
|
||||
<Clutch value="0" active="false" />
|
||||
<ParkingBrake value="0" active="false" />
|
||||
<SteeringWheel value="0" active="false" />
|
||||
<Gear number="0" active="false" />
|
||||
</OverrideControllerValueAction>
|
||||
</ControllerAction>
|
||||
</PrivateAction>
|
||||
</Private>
|
||||
<Private entityRef="adversary">
|
||||
<PrivateAction>
|
||||
<TeleportAction>
|
||||
<Position>
|
||||
<WorldPosition x="190" y="133" z="0" h="0"/>
|
||||
</Position>
|
||||
</TeleportAction>
|
||||
</PrivateAction>
|
||||
</Private>
|
||||
</Actions>
|
||||
</Init>
|
||||
<Story name="MyStory">
|
||||
<Act name="Behavior">
|
||||
<ManeuverGroup maximumExecutionCount="1" name="ManeuverSequence">
|
||||
<Actors selectTriggeringEntities="false">
|
||||
<EntityRef entityRef="adversary"/>
|
||||
</Actors>
|
||||
<Maneuver name="FollowLeadingVehicleManeuver">
|
||||
<Event name="LeadingVehicleKeepsVelocity" priority="overwrite">
|
||||
<Action name="LeadingVehicleKeepsVelocity">
|
||||
<PrivateAction>
|
||||
<LongitudinalAction>
|
||||
<SpeedAction>
|
||||
<SpeedActionDynamics dynamicsShape="step" value="100" dynamicsDimension="distance"/>
|
||||
<SpeedActionTarget>
|
||||
<AbsoluteTargetSpeed value="$leadingSpeed"/>
|
||||
</SpeedActionTarget>
|
||||
</SpeedAction>
|
||||
</LongitudinalAction>
|
||||
</PrivateAction>
|
||||
</Action>
|
||||
<StartTrigger>
|
||||
<ConditionGroup>
|
||||
<Condition name="StartCondition" delay="0" conditionEdge="rising">
|
||||
<ByEntityCondition>
|
||||
<TriggeringEntities triggeringEntitiesRule="any">
|
||||
<EntityRef entityRef="ego_vehicle"/>
|
||||
</TriggeringEntities>
|
||||
<EntityCondition>
|
||||
<RelativeDistanceCondition entityRef="adversary" relativeDistanceType="cartesianDistance" value="40.0" freespace="false" rule="lessThan"/>
|
||||
</EntityCondition>
|
||||
</ByEntityCondition>
|
||||
</Condition>
|
||||
</ConditionGroup>
|
||||
</StartTrigger>
|
||||
</Event>
|
||||
</Maneuver>
|
||||
</ManeuverGroup>
|
||||
<StartTrigger>
|
||||
<ConditionGroup>
|
||||
<Condition name="OverallStartCondition" delay="0" conditionEdge="rising">
|
||||
<ByEntityCondition>
|
||||
<TriggeringEntities triggeringEntitiesRule="any">
|
||||
<EntityRef entityRef="ego_vehicle"/>
|
||||
</TriggeringEntities>
|
||||
<EntityCondition>
|
||||
<TraveledDistanceCondition value="1.0"/>
|
||||
</EntityCondition>
|
||||
</ByEntityCondition>
|
||||
</Condition>
|
||||
<Condition name="StartTime" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<SimulationTimeCondition value="0" rule="equalTo"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
</ConditionGroup>
|
||||
</StartTrigger>
|
||||
<StopTrigger>
|
||||
<ConditionGroup>
|
||||
<Condition name="EndCondition" delay="0" conditionEdge="rising">
|
||||
<ByEntityCondition>
|
||||
<TriggeringEntities triggeringEntitiesRule="any">
|
||||
<EntityRef entityRef="ego_vehicle"/>
|
||||
</TriggeringEntities>
|
||||
<EntityCondition>
|
||||
<TraveledDistanceCondition value="100.0"/>
|
||||
</EntityCondition>
|
||||
</ByEntityCondition>
|
||||
</Condition>
|
||||
</ConditionGroup>
|
||||
</StopTrigger>
|
||||
</Act>
|
||||
</Story>
|
||||
<StopTrigger>
|
||||
<ConditionGroup>
|
||||
<Condition name="criteria_RunningStopTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_RunningRedLightTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_WrongLaneTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_OnSidewalkTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_KeepLaneTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_CollisionTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="" value="" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
<Condition name="criteria_DrivenDistanceTest" delay="0" conditionEdge="rising">
|
||||
<ByValueCondition>
|
||||
<ParameterCondition parameterRef="distance_success" value="100" rule="lessThan"/>
|
||||
</ByValueCondition>
|
||||
</Condition>
|
||||
</ConditionGroup>
|
||||
</StopTrigger>
|
||||
</Storyboard>
|
||||
</OpenSCENARIO>
|
Loading…
Reference in New Issue