Skip to content
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

Add CPM/VAM (Release 2) to Vanetza #235

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5fd203d
asn1: rename its to its1
diogopjesus Nov 27, 2023
1ccc8de
Add asn1 ITS2 files for CDD, CAM, DENM, and CPM
diogopjesus Nov 27, 2023
5a45dad
update gitignore
diogopjesus Nov 28, 2023
4f79ea7
Update cmake files to support both its versions
diogopjesus Nov 28, 2023
6014202
asn1: update cpm.hpp to support both its versions
diogopjesus Nov 28, 2023
9445d20
remove cpm.hpp
diogopjesus Nov 28, 2023
12abab2
Add its2 compilation files and updated its and its2 sources.
diogopjesus Nov 28, 2023
4288fe4
Update gitignores
diogopjesus Nov 28, 2023
336dafb
pdate cam_function.hpp to support both its versions and rename it to …
diogopjesus Nov 28, 2023
c1c877b
update gitignore
diogopjesus Nov 28, 2023
3ef3ecf
Update cmake file for facilities
diogopjesus Nov 28, 2023
ba2ce11
Update cam_functions.cpp
diogopjesus Nov 28, 2023
c04366e
asn1: correct cpm class definition error
diogopjesus Nov 28, 2023
3ae5030
Remove commented asn1 constraints.
diogopjesus Nov 29, 2023
160acbf
Add newly generated file changes with v0-e fork of asn1c.
diogopjesus Nov 29, 2023
1fffc5d
Merge branch 'cpm' of github.com:diogopjesus/vanetza into cpm
khevessy Aug 8, 2024
6d652dc
Merge branch 'riebl:master' into cpm
khevessy Aug 9, 2024
8f4a61f
Merge branch 'riebl:master' into cpm
khevessy Aug 9, 2024
7639192
Merge remote-tracking branch 'remotes/origin/master' into cpm
khevessy Aug 14, 2024
610318e
Try to fix unit tests by removing read-only from the workspace
khevessy Aug 21, 2024
b59bca3
Docker: remove USER directive as per https://docs.github.com/en/actio…
khevessy Aug 21, 2024
7c91dcf
Fix aper_get_nsnnwn() call
khevessy Aug 21, 2024
9292cd4
Fix security prefix removal (bad merge 7639192)
khevessy Aug 21, 2024
3a4f0b6
Merge branch 'riebl:master' into cpm
khevessy Aug 23, 2024
8bff4ed
Preparation for VAM
khevessy Aug 23, 2024
211e6fb
Add VAM .asn files
khevessy Aug 23, 2024
bc608e4
Add VAM. Generate code with 18e565032e52af8002c2353be20bdbba9233e700
khevessy Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
${{github.workspace}}/tools/docker
- run: >
docker run --rm
-v${{github.workspace}}:/home/build-user/workspace:ro
-v${{github.workspace}}:/home/build-user/workspace
vanetza/docker-ci:${{matrix.ubuntu-version}}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build
.vscode/
build/
build.asn1/
conanfile.pyc
doxygen/html/
www/
www/
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ if (VANETZA_WITH_OPENSSL)
include(CompatOpenSSLTargets)
endif()

# ASN.1 select ITS version
option(VANETZA_ASN1_WITH_ITS2 "ENABLE ITS2 ASN.1 support" OFF)
if(VANETZA_ASN1_WITH_ITS2)
set(VANETZA_USE_ITS2 1)
else()
set(VANETZA_USE_ITS2 0)
endif()

add_subdirectory(vanetza/access)
add_subdirectory(vanetza/asn1)
add_subdirectory(vanetza/btp)
Expand Down
7,260 changes: 7,260 additions & 0 deletions asn1/TS102894-2v221-CDD.asn

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions asn1/TS103300-3v221-VAM-MotorcylistSpecialContainer.asn
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Draft V0.0.4_2.2.1 - TS 103 300-3
-- Based on the official version available at @url https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/-/tree/v2.1.1
-- Modified to import from the CDD module V2.1.1

-- This module defines a special container for motorcycles, to be integrated into the
-- Cooperative Awareness Message (CAM) defined in ETSI TS 103 900

VRU-Motorcyclist-Special-Container {itu-t(0) identified-organization(4) etsi(0) itsDomain(5)
wg1(1) 103300 motorcyclist-special-container(2) version2(2)}


DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

IMPORTS
PathPredicted, SequenceOfSafeDistanceIndication,
StabilityChangeIndication, Wgs84Angle, CartesianAngle,
VruSizeClass, VruSubProfileMotorcyclist
FROM ETSI-ITS-CDD
{itu-t(0) identified-organization(4) etsi(0)
itsDomain(5) wg1(1) 102894 cdd(2) major-version-4(4) minor-version-1(1)}
;

MotorcylistSpecialContainer ::= SEQUENCE {
motorcyclist VruSubProfileMotorcyclist,
sizeClass VruSizeClass,
rollAngle CartesianAngle OPTIONAL,
orientation Wgs84Angle OPTIONAL,
safeDistance SequenceOfSafeDistanceIndication OPTIONAL,
pathPrediction PathPredicted OPTIONAL,
stabilityChangeIndication StabilityChangeIndication OPTIONAL,
...
}



END

229 changes: 229 additions & 0 deletions asn1/TS103300-3v221-VAM.asn
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
-- Draft V0.0.4_2.2.1 - VAM TS 103 300-1 ASN.1 module
-- Based on the official version available at @url https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/-/tree/v2.1.1
-- Modified to import from the CDD module V2.1.1

VAM-PDU-Descriptions {itu-t(0) identified-organization(4) etsi(0) itsDomain(5)
wg1(1) 103300 vam(1) major-version-3(3) minor-version-1(1)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

IMPORTS
AccelerationChangeIndication, BasicContainer, CartesianAngle, ClusterBreakupInfo,
ClusterJoinInfo, ClusterLeaveInfo, Curvature, CurvatureCalculationMode,
DeltaTimeQuarterSecond, GenerationDeltaTime, HeadingChangeIndication, ItsPduHeader, LanePosition,
LateralAcceleration, LongitudinalAcceleration, PathHistory, PathPredicted,
SequenceOfSafeDistanceIndication, SequenceOfTrajectoryInterceptionIndication,
SequenceOfTrajectoryInterceptionIndication, Speed, StabilityChangeIndication, StationId,
TrajectoryInterceptionIndication, VerticalAcceleration, VruClusterInformation, VruDeviceUsage,
VruEnvironment, VruExteriorLights, GeneralizedLanePosition, VruProfileAndSubprofile, VruMovementControl,
VruSizeClass, YawRate, Wgs84Angle
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) 102894 cdd (2) major-version-4 (4) minor-version-1 (1) }
WITH SUCCESSORS
;

VAM ::= SEQUENCE {
header ItsPduHeaderVam,
vam VruAwareness
}

/**
* @details ItsPduHeaderVam
* The ITS PDU header for the VAM.
*
* This DF includes DEs for the VAM _protocolVersion_, the VAM message type identifier _messageID_
* and the station identifier _stationID_ of the originating ITS-S.
*
* @category: Communication information
* @revision: V2.2.1
*/
ItsPduHeaderVam ::= ItsPduHeader(WITH COMPONENTS {..., protocolVersion(3), messageId(vam)})


/**
* @details VruAwareness
* VAM payload.
*
* It includes the time stamp of the VAM and the VAM different containers
*
* @category: Communication information
* @revision: V2.2.1
*/
VruAwareness ::= SEQUENCE {
generationDeltaTime GenerationDeltaTime,
vamParameters VamParameters
}

/**
* @details VamParameters
* The VAM payload includes the @ref BasicContainer and @ref VruHighFrequencyContainer.
* The VAM payload may also include additional containers: @ref VruLowFrequencyContainer,
* @ref VruClusterInformationContainer, @ref VruClusterOperationContainer and @ref VruMotionPredictionContainer.
* The selection of the additional containers depends on the dissemination criteria,
* e.g. _vruCluster_ or _MotionDynamicPrediction_ availability.
*
* @category: Communication information
* @revision: V2.2.1
**/
VamParameters ::= SEQUENCE {
basicContainer BasicContainer,
vruHighFrequencyContainer VruHighFrequencyContainer,
vruLowFrequencyContainer VruLowFrequencyContainer OPTIONAL,
vruClusterInformationContainer VruClusterInformationContainer OPTIONAL,
vruClusterOperationContainer VruClusterOperationContainer OPTIONAL,
vruMotionPredictionContainer VruMotionPredictionContainer OPTIONAL,
...
}

/**
* @details VruHighFrequencyContainer
* The VRU HF container of the VAM contains potentially fast-changing status information of the VRU ITS-S.
* It includes the following components (setting indications are specified in clause 7.3.3 of TS 103 300-3):
*
* @field heading: heading and heading confidence of the originating VRU with regards to the true north.
* @field speed: speed in moving direction and speed confidence of the originating VRU.
* @field longitudinalAcceleration: longitudinal acceleration of the originating VRU.
* @field curvature: related to the actual trajectory of the originating VRU vehicle.
_(recommended for VRU Profile 2)_
* @field curvatureCalculationMode: indicates whether vehicle yaw-rate is used in the calculation of
* the curvature of the VRU vehicle ITS-S that originates the VAM. _(recommended for VRU Profile 2)_
* @field yawRate: yaw rate of originating VRU vehicle. _(recommended for VRU Profile 2)_
* @field lateralAcceleration: originating VRU lateral acceleration in the street plane.
* This field shall be present if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
* @field verticalAcceleration: vertical acceleration of the originating VRU.
* This field shall be present if the data is available at the originating ITS-S.
* @field vruLanePosition: lane position of the referencePosition of a VRU, which is either a VRU-specific non-traffic lane
* or a standard traffic lane. This field shall be present if the data is available at the originating ITS-S.
* @field environment: provides contextual awareness of the VRU among other road users.
* This field shall be present only if the data is available at the originating ITS-S.
* @field movementControl: indicates the mechanism used by the VRU to control the longitudinal movement of the VRU vehicle.
* This field shall be present only if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
* @field orientation : complements the dimensions of the VRU vehicle by defining the angle of the VRU vehicle longitudinal
* axis with regards to the WGS84 north. _(recommended for VRU Profile 2)_
* @field rollAngle: provides the angle and angle accuracy between the ground plane and the current orientation of a vehicle's
* y-axis with respect to the ground plane about the x-axis according to the ISO 8855.
* This field shall be present only if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
* @field deviceUsage: provides indications from the personal device about the potential
* activity of the VRU. This field shall be present only if the data is available at the originating ITS-S.
* _(recommended for VRU Profile 1)_
*
* @category: VRU information
* @revision: V2.2.1
*/
VruHighFrequencyContainer ::= SEQUENCE {
heading Wgs84Angle,
speed Speed,
longitudinalAcceleration LongitudinalAcceleration,
curvature Curvature OPTIONAL,
curvatureCalculationMode CurvatureCalculationMode OPTIONAL,
yawRate YawRate OPTIONAL,
lateralAcceleration LateralAcceleration OPTIONAL,
verticalAcceleration VerticalAcceleration OPTIONAL,
vruLanePosition GeneralizedLanePosition OPTIONAL,
environment VruEnvironment OPTIONAL,
movementControl VruMovementControl OPTIONAL,
orientation Wgs84Angle OPTIONAL,
rollAngle CartesianAngle OPTIONAL,
deviceUsage VruDeviceUsage OPTIONAL,
...
}

/**
* @details VruLowFrequencyContainer
* The VRU LF container of the VAM contains potentially slow-changing information of the VRU ITS-S.
* It is mandatory with higher periodicity as specified in clause 6.2 or when VRU cluster operation container is present.
* It includes the following components (setting indications are specified in clause 7.3.4 of TS 103 300-3):
*
* @field profileAndSubprofile: profile of the ITS-S that originates the VAM, including sub-profile information.
* @field sizeClass: information about the size of the VRU.
* @field exteriorLights: status of the most important exterior lights switches of the VRU ITS-S that originates the VAM.
* _(conditional mandatory as specified in clause 7.3.4 of TS 103 300-3)_
*
* @category: VRU information
* @revision: V2.2.1
*/
VruLowFrequencyContainer ::= SEQUENCE {
profileAndSubprofile VruProfileAndSubprofile,
sizeClass VruSizeClass OPTIONAL,
exteriorLights VruExteriorLights OPTIONAL,
...
}

/**
* @details VruClusterInformationContainer
* The VRU Cluster Information container of the VAM provides the information/parameters relevant to the VRU cluster.
* It is mandatory if the VAM is transmitted by VRU cluster leader.
* It includes the following components (setting indications are specified in clause 7.3.5 of TS 103 300-3):
*
* @field vruClusterInformation: set of parammeters releated to the VRU cluster.
* When transmitted by a VRU ITS-S, the clusterId and clusterBoundingBoxShape fields inside this DF shall be present.
* The clusterBoundingBoxShape is positioned with respect to the position sent in the BasicContainer.
*
* @category: VRU information
* @revision: V2.2.1
*/
VruClusterInformationContainer::= SEQUENCE{
vruClusterInformation VruClusterInformation (WITH COMPONENTS{..., clusterId, clusterBoundingBoxShape PRESENT}),
...
}


/**
* @details VruClusterOperationContainer
* The VRU Cluster Operation container of the VAM provides information relevant to change of cluster state and composition.
* It is mandatory if the VAM is transmitted by a VRU joining, leaving or breaking up a cluster.
* It includes the following components (setting indications are specified in clause 7.3.5 of TS 103 300-3).
* At least one of the fields below shall be present if the container is present in the VAM:
*
* @field clusterJoinInfo: indicates the intent of an individual VAM transmitter to join a cluster.
* @field clusterLeaveInfo : indicates that an individual VAM transmitter has recently left the VRU cluster.
* @field clusterBreakupInfo: indicates the intent of a cluster VAM transmitter to stop sending cluster VAMs.
* @field clusterIdChangeTimeInfo: indicates the intent of a cluster VAM transmitter to change cluster ID.
*
* @category: VRU information
* @revision: V2.2.1
*/
VruClusterOperationContainer ::= SEQUENCE {
clusterJoinInfo ClusterJoinInfo OPTIONAL,
clusterLeaveInfo ClusterLeaveInfo OPTIONAL,
clusterBreakupInfo ClusterBreakupInfo OPTIONAL,
clusterIdChangeTimeInfo DeltaTimeQuarterSecond OPTIONAL,
...
}

/**
* @details VruMotionPredictionContainer
* The VRU Motion Prediction container of the VAM carries the past and future motion state information of the VRU.
* It includes the following components (setting indications are specified in clause 7.3.6 of TS 103 300-3).
* At least one of the fields below shall be present if the container is present in the VAM:
*
* @field pathHistory: represents the VRU's recent movement over some past time and/or distance.
* It consists of a list of path points.
* @field pathPrediction: provides the set of predicted locations of the ITS-S, confidence values
* and the corresponding future time instants.
* @field safeDistance: provides indication of safe distance between an ego-VRU and up to 8 other ITS-S
* or entity on the road to indicate whether the ego-VRU is at a safe distance (that is less likely to
* physically collide) from another ITS-S or entity on the road.
* @field trajectoryInterceptionIndication: provides the indication for possible trajectory interception
* with up to 8 VRUs or other objects on the road..
* @field accelerationChangeIndication: provides an acceleration change indication of the VRU.
* When present this DF indicates an anticipated change in the VRU speed for period of actionDeltaTime.
* @field headingChangeIndication: provides additional data elements associated to heading change indicators
* such as a change of travel direction (left or right).
* The direction change action is performed for a period of actionDeltaTime.
* @field stabilityChangeIndication: provides an estimation of the VRU stability.
*
* @category: GeoReference information, VRU information
* @revision: V2.2.1
*/
VruMotionPredictionContainer ::= SEQUENCE {
pathHistory PathHistory OPTIONAL,
pathPrediction PathPredicted OPTIONAL,
safeDistance SequenceOfSafeDistanceIndication OPTIONAL,
trajectoryInterceptionIndication SequenceOfTrajectoryInterceptionIndication OPTIONAL,
accelerationChangeIndication AccelerationChangeIndication OPTIONAL,
headingChangeIndication HeadingChangeIndication OPTIONAL,
stabilityChangeIndication StabilityChangeIndication OPTIONAL,
...
}

END
54 changes: 54 additions & 0 deletions asn1/TS103324v211-CPM-OriginatingStationContainers.asn
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
CPM-OriginatingStationContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) originatingStationContainers (2) major-version-1 (1) minor-version-1(1)}

DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

IMPORTS

CartesianAngle, MapReference, Speed, StationType, TrailerData, Wgs84Angle
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)}
;

/**
* This DF represents the Originating Vehicle Container
*
* It shall include the following components:
*
* @field orientationAngle: the angle and angle accuracy of the absolute orientation of the disseminating vehicle in the WGS84 coordinate system with respect to true North.
*
* @field pitchAngle: the optional angle and angle accuracy between the ground plane and the current orientation of the vehicle's x-axis with respect to the ground plane about the y-axis according to the ISO 8855.
*
* @field rollAngle: the optional angle and angle accuracy between the ground plane and the current orientation of a vehicle's y-axis with respect to the ground plane about the x-axis according to the ISO 8855
*
* @field trailerData: information about the trailer dimensions and orientation in case a trailer is present.
*
*/
OriginatingVehicleContainer ::= SEQUENCE {
orientationAngle Wgs84Angle,
pitchAngle CartesianAngle OPTIONAL,
rollAngle CartesianAngle OPTIONAL,
trailerDataSet TrailerDataSet OPTIONAL,
...
}

/**
* This DF represents the Originating RSU Container.
*
* It shall include the following components:
*
* @field mapReference: identifies the MAPEM containing the topology information reference in the Perceived Object Container
*
*/
OriginatingRsuContainer ::= SEQUENCE{
mapReference MapReference OPTIONAL,
...
}

/**
* This DF represents a list of trailer data.
*
*/
TrailerDataSet::= SEQUENCE SIZE(1..8,...) OF TrailerData (WITH COMPONENTS {... ,frontOverhang ABSENT, rearOverhang ABSENT, trailerWidth ABSENT})

END
34 changes: 34 additions & 0 deletions asn1/TS103324v211-CPM-PerceivedObjectContainer.asn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CPM-PerceivedObjectContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) perceivedObjectContainer (4) major-version-1 (1) minor-version-1(1)}

DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

IMPORTS

CardinalNumber1B, PerceivedObject
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)}
;

/**
* This DF represents the Perceived Object Container
*
* It shall include the following components:
*
* @field numberOfPerceivedObjects: the total number of perceived objects at the time of generating the message.
*
* @field perceivedObjects: the list of perceived objects.
*
*/
PerceivedObjectContainer ::= SEQUENCE {
numberOfPerceivedObjects CardinalNumber1B,
perceivedObjects PerceivedObjects,
...
}

/** @brief Perceived Objects
* This DF provides a list of perceived objects represented in the coordinate system in which the y-axis corresponds to the North direction, the x-axis to the East direction, and the z- axis to the vertical direction.
*/
PerceivedObjects::= SEQUENCE SIZE(0..255, ...) OF PerceivedObject (WITH COMPONENTS {... ,objectId PRESENT})

END
Loading