Skip to content

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
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ set(OSI_PROTO_FILES
osi_trafficcommandupdate.proto
osi_referenceline.proto
osi_roadmarking.proto
osi_route.proto
osi_lane.proto
osi_logicallane.proto
osi_featuredata.proto
Expand Down
Binary file added doc/images/OSI_Planned_Route.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/OSI_Route_Segment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions osi_hostvehicledata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ option optimize_for = SPEED;

import "osi_version.proto";
import "osi_common.proto";
import "osi_route.proto";

package osi3;

Expand Down Expand Up @@ -91,6 +92,10 @@ message HostVehicleData
//
optional VehicleMotion vehicle_motion = 13;

// Currently planned route of the vehicle
//
optional Route route = 14;

//
// \brief Base parameters and overall states of the vehicle.
//
Expand Down
134 changes: 134 additions & 0 deletions osi_route.proto
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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?

Copy link
Contributor

@ClemensLinnhoff ClemensLinnhoff May 2, 2024

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.

//
// \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;
}
}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def find_protoc():
"osi_occupant.proto",
"osi_referenceline.proto",
"osi_roadmarking.proto",
"osi_route.proto",
"osi_sensordata.proto",
"osi_sensorspecific.proto",
"osi_sensorview.proto",
Expand Down