Repository navigation
Conversation
Fixes eclipse-sumo#4391. Add POLYGON_3D (0x05) and VAR_SHAPE3D (0x3f), expose lane.getShape3D and junction.getShape3D (plus junction.getPosition3D), and keep the existing VAR_SHAPE payload unchanged.
Contributor
|
@NearCai Thanks for that one! Can you try to make your commits always under your "real" email address? If the commit shows something like @users.noreply.github.com the eclipse validation will fail |
Contributor
Author
|
Thanks! I rewrote the commit author/committer address to my real email (2094657017@qq.com) and force-pushed the branch; the PR commit now uses it. I will use this address for all future commits. |
Refs eclipse-sumo#4391. The subscription test discovers public getters by introspection; getShape3D now registers a VAR_SHAPE3D subscription. Update the expected outputs for the traci, libsumo and libtraci runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4391
Motivation
lane.getShapeandjunction.getShapeonly return 2D positions; elevation isdropped even though the simulation model and the net file contain it.
junction.getPosition(..., includeZ=True)already exists, but there was no wayto retrieve the 3D shape of a lane or junction.
Implementation
POLYGON_3D(0x05) wire type andVAR_SHAPE3D(0x3f) variable.VAR_SHAPE3D; keepVAR_SHAPE2D.lane.getShape3D,junction.getShape3Dand the convenience aliasjunction.getPosition3Dto the Python client.Because the change only adds a new variable and does not alter existing
payloads,
TRACI_VERSIONis not bumped. Old clients keep getting 2D shapes;old servers will report
VAR_SHAPE3Das unknown instead of silently returning2D data.
Verification
The new complex test
tests/complex/traci/misc/shape3Dchecks the 2D and 3Dlane/junction shapes, the
getPosition3Dalias, and aVAR_SHAPE3Dsubscription. Existing 2D retrieval (including
simulation.getNetBoundary)still returns 2-tuples.