Skip to content

Use different position modes (Center, Front, Rear) when interpreting WorldPositions #590

@lrstttl

Description

@lrstttl

Hi,

I have come across the following use case: in an input OpenScenario file, I define a trajectory as follows (simplified here of course):

<Trajectory name="trajectory" closed="false">
    <Shape>
        <Polyline>
            <Vertex time="0">
                <Position>
                    <WorldPosition x="400.0" y="12.0" z="100.0" h="-1.5" p="0.0" r="0.0"/>
                </Position>
            </Vertex>
            <Vertex time="1">
                <Position>
                    <WorldPosition x="397.0" y="10.0" z="100.0" h="-2.0" p="0.0" r="0.0"/>
                </Position>
            </Vertex>
             ...
        </Polyline>
    </Shape>
</Trajectory>

When running the scenario with esmini, all WorldPositions are interpreted as the center point of the object.

Is there an option to not interpret them as the object's center, but rather move the rear end or the front end of the vehicle to that position? Meaning in the vehicle's coordinate system, its x position should increased or decreased by length / 2?

I've seen that there is an enum class PositionType in RoadManager (https://github.com/esmini/esmini/blob/master/EnvironmentSimulator/Modules/RoadManager/RoadManager.hpp#L2982-L2990). Can this be used after reading world positions from the OpenScenario?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions