Add road_predecessor_id and road_successor_id properties to Waypoint Python API#9572
Draft
Add road_predecessor_id and road_successor_id properties to Waypoint Python API#9572
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
…Python API Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add method to obtain road and lane information
Add road_predecessor_id and road_successor_id properties to Waypoint Python API
Mar 6, 2026
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.
The Python API lacked access to OpenDRIVE road-level connectivity (predecessor/successor road IDs), forcing users to rely solely on waypoint-based navigation without the ability to query the underlying road graph structure.
Changes
LibCarla/source/carla/client/Waypoint.h/.cpp: AddedGetRoadSuccessor()andGetRoadPredecessor()methods, delegating to the existingcarla::road::Road::GetSuccessor/Predecessor()via the lane→road chain.PythonAPI/carla/source/libcarla/Map.cpp: Exposed the new methods asroad_predecessor_idandroad_successor_idread-only properties on the PythonWaypointclass.Usage
Description
Exposes OpenDRIVE road predecessor/successor IDs to the Python API via two new
Waypointproperties:road_predecessor_idandroad_successor_id.Where has this been tested?
Possible Drawbacks
None. Read-only accessors with no side effects, delegating to already-existing
carla::road::Roadmethods.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is