Hello,
I want to use parameters in Route catalog, but it doesn't working.
esmini version:
2.37.3 (build 3814)
esmini-demo_Linux.zip
To reproduce the problem,
I added $RoadId parameter in "esmini-demo/resources/xosc/Catalogs/Routes/RoutesAtFabriksgatan.xosc" as below.
<Route name="HostStraightRoute" closed="false">
<ParameterDeclarations>
<ParameterDeclaration name="RoadId" parameterType="integer" value="0"/>
</ParameterDeclarations>
<Waypoint routeStrategy="shortest">
<Position>
<LanePosition roadId="$RoadId" laneId="1" offset="0" s="63"/>
<!-- <LanePosition roadId="0" laneId="1" offset="0" s="63"/> -->
</Position>
</Waypoint>
<Waypoint routeStrategy="shortest">
<Position>
<LanePosition roadId="2" laneId="1" offset="0" s="5"/>
</Position>
</Waypoint>
</Route>
When I attempted to run "esmini-demo/resources/xosc/pedestrian.xosc", which references the catalog, the operation failed.
Failed to resolve parameter $RoadId
And if I add $RoadId in the pedestrian.xosc (main scenario) as below,
<?xml version="1.0" encoding="UTF-8"?>
<!-- Demonstrate how a simple trajectory can be defined and assigned to a moving -->
<!-- entity, in this case a pedestrian. TimeToCollision condition is utilized to -->
<!-- trig a brake maneuver. -->
<OpenSCENARIO>
<FileHeader revMajor="1"
revMinor="1"
date="2020-10-02T10:00:00"
description="Pedestrian involved in a critical situation"
author="esmini-team"/>
<ParameterDeclarations>
<ParameterDeclaration name="HostVehicle" parameterType="string" value="car_white"/>
<ParameterDeclaration name="HostSpeed" parameterType="double" value="10"/>
<ParameterDeclaration name="PedestrianSpeed" parameterType="double" value="1.5"/>
<ParameterDeclaration name="RoadId" parameterType="integer" value="0"/>
</ParameterDeclarations>
It works...
This demonstrates that the Route does not use its own parameters but rather the global ones from the main scenario. In contrast, entities in other catalogs (such as Vehicle, Pedestrian, etc.) utilize their own parameters, which can be overridden in the main scenario by ParameterAssignment. Unlike the Route, they do not directly reference the parameters of the main scenario.
To summarize,
- ParameterDeclaration does not working in the Route catalog.
- The parameters of the route catalog refer to the parameters of the main scenario.
I am not an expert in OpenSCENARIO, so my understanding or opinions may be incorrect.
Thanks!
Hello,
I want to use parameters in Route catalog, but it doesn't working.
esmini version:
2.37.3 (build 3814)
esmini-demo_Linux.zip
To reproduce the problem,
I added $RoadId parameter in "esmini-demo/resources/xosc/Catalogs/Routes/RoutesAtFabriksgatan.xosc" as below.
When I attempted to run "esmini-demo/resources/xosc/pedestrian.xosc", which references the catalog, the operation failed.
Failed to resolve parameter $RoadIdAnd if I add $RoadId in the pedestrian.xosc (main scenario) as below,
It works...
This demonstrates that the Route does not use its own parameters but rather the global ones from the main scenario. In contrast, entities in other catalogs (such as Vehicle, Pedestrian, etc.) utilize their own parameters, which can be overridden in the main scenario by ParameterAssignment. Unlike the Route, they do not directly reference the parameters of the main scenario.
To summarize,
I am not an expert in OpenSCENARIO, so my understanding or opinions may be incorrect.
Thanks!