-
Notifications
You must be signed in to change notification settings - Fork 129
feat: New OSI message osi_route #705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pmai
merged 3 commits into
OpenSimulationInterface:master
from
FabianPfeufferCAP:OsiRoute
Feb 13, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
syntax = "proto2"; | ||
|
||
option optimize_for = SPEED; | ||
|
||
import "osi_common.proto"; | ||
|
||
package osi3; | ||
|
||
// | ||
// \brief A route in the road network | ||
// | ||
// A route is an e.g. planned or suggested path for an agent to travel from one | ||
// location to another within the road network. It is composed of a list of route | ||
// segments, which form a continuous path through the road network and should be | ||
// traversed in the order they are listed. | ||
// The route allows the simulation environment to provide agents with high level | ||
// path information, similar to that of a map or a navigation system, without the | ||
// need for the agent model to perform complex path planning on its own. This | ||
// allows for an efficient control of the agent's general direction, while | ||
// simultaneously giving it enough freedom on how to traverse the path. | ||
// | ||
// ## Example | ||
// | ||
// The example below shows the \link Route route\endlink of a vehicle. | ||
// | ||
// \image html OSI_Planned_Route.png "Route" width=850px | ||
// | ||
// The route is composed of three \link RouteSegment route segments\endlink RS1-3, | ||
// each indicated by a yellow outline. Two of the route segments | ||
// (RS2 and RS3) only contain a single \link LogicalLaneSegment logical lane segment\endlink | ||
// (highlighted in blue), while RS1 is composed of three | ||
// logical lane segments (green, blue and red). | ||
// | ||
message Route | ||
{ | ||
// The unique id of the route. | ||
// | ||
// \note This field is mandatory. | ||
// | ||
// \note This id must be unique within all route messages exchanged with | ||
// one traffic participant. | ||
// | ||
optional Identifier route_id = 1; | ||
|
||
// Route segments that form the route of an agent. | ||
// | ||
// Consecutive segments should be connected without gaps, meaning that the | ||
// two of them should form a continuous area. | ||
// | ||
repeated RouteSegment route_segment = 2; | ||
|
||
// | ||
// \brief A segment of a logical lane. | ||
// | ||
// \note The LogicalLaneSegment allows that start_s > end_s. | ||
// If start_s < end_s, then the traffic agent should traverse the | ||
// segment in the logical lane's reference line definition direction. | ||
// If end_s > start_s, then the traffic agent should traverse the | ||
// segment in the opposite of the logical lane's reference line | ||
// definition direction. | ||
// | ||
message LogicalLaneSegment | ||
{ | ||
// The ID of the logical lane this segment belongs to. | ||
// | ||
// \rules | ||
// refers_to: LogicalLane | ||
// \endrules | ||
// | ||
optional Identifier logical_lane_id = 1; | ||
|
||
// S position on the logical lane where the segment starts. | ||
// | ||
optional double start_s = 2; | ||
|
||
// S position on the logical lane where the segment ends. | ||
// | ||
optional double end_s = 3; | ||
} | ||
|
||
// | ||
// \brief A segment of a route. | ||
// | ||
// A route segment describes a segment of a traffic agent's route through the | ||
// logical lanes of the road network. | ||
// | ||
// Each time there is a successor-predecessor relation between the logical | ||
// lanes along the route (i.e. a logical lane ends, and is continued by another | ||
// logical lane, e.g. at a junction border), a new RouteSegment starts. The | ||
// RouteSegment then lists the logical lane segments that can be used to | ||
// travel through this space of the road. | ||
// | ||
// Together, the listed logical lane segments should form a continuous area, | ||
// where the traffic agent can move freely. These will mostly be parallel | ||
// lanes, though lanes may overlap (e.g. if one lane splits into two on a | ||
// junction). In general, the logical lane segments in a RouteSegment will | ||
// have the same length, though there are exceptions (e.g. if a lane | ||
// widening occurs, the newly appearing lane will have a shorter length). | ||
// | ||
// Typically a route segment will be either | ||
// - a set of parallel lanes between two junctions, or | ||
// - parallel lanes on an intersection with the same driving direction | ||
// | ||
// ## Example | ||
// | ||
// Consider the \link RouteSegment route segment\endlink between two intersections, | ||
// shown in the image below. | ||
// | ||
// \image html OSI_Route_Segment.png "RouteSegment" width=850px | ||
// | ||
// In the example, a single route segment RS with three | ||
// \link LogicalLaneSegment logical lane segments\endlink LL1, LL2 and LL3 is | ||
// shown. The segments are indicated by the green, blue and red highlighted areas, | ||
// one for each underlying logical lane The starting | ||
// s-position of each segment is indicated by the yellow dotted line and the s- prefix | ||
// (note that the start of LL2 lies further to the left, outside of the image), | ||
// while the ending s-position of all segments is shown by the yellow dotted line e-RS. | ||
// | ||
// As it can be seen in the example, all logical lane segments are parallel, | ||
// but two of them are opening at a later position, so their starting | ||
// s-positions will be different. | ||
// | ||
message RouteSegment | ||
{ | ||
|
||
// Logical lane segments that form a route segment. | ||
// | ||
// The logical lane segments of a route segment should be connected without | ||
// gaps, meaning that, together, the lane segments should form a continuous | ||
// area. | ||
// | ||
repeated LogicalLaneSegment lane_segment = 1; | ||
} | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomassedlmayer I think we should apply the rules here: https://github.com/OpenSimulationInterface/open-simulation-interface/blob/master/rules.yml
is_set
is_globally_unique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to put rules into a new issue and/or PR, as we would find more fields, where we would add them, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will create a new PR (see #805) an check everything for mandatory fields. We should definitely add this to v3.7.0, since I consider this a bug.