Skip to content

Commit

Permalink
Merge pull request #22 from ika-rwth-aachen/improvement/package-naming
Browse files Browse the repository at this point in the history
Enable parallel handling for TS and EN versions of the same message type
  • Loading branch information
jpbusch authored Jul 9, 2024
2 parents 9372249 + 46c2ca8 commit 06eefef
Show file tree
Hide file tree
Showing 2,386 changed files with 67,375 additions and 67,372 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
script: ./utils/codegen/asn1ToC.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -t cam -o etsi_its_coding/etsi_its_cam_coding -di ghcr.io/${{ github.repository }}:asn1c_${{ github.sha }}_ci
- message: denm
script: ./utils/codegen/asn1ToC.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -t denm -o etsi_its_coding/etsi_its_denm_coding -di ghcr.io/${{ github.repository }}:asn1c_${{ github.sha }}_ci
- message: cpm
script: ./utils/codegen/asn1ToC.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -t cpm -o etsi_its_coding/etsi_its_cpm_coding -di ghcr.io/${{ github.repository }}:asn1c_${{ github.sha }}_ci
- message: cpm_ts
script: ./utils/codegen/asn1ToC.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -t cpm_ts -o etsi_its_coding/etsi_its_cpm_ts_coding -di ghcr.io/${{ github.repository }}:asn1c_${{ github.sha }}_ci

steps:
- name: Checkout code
Expand Down Expand Up @@ -90,8 +90,8 @@ jobs:
script: ./utils/codegen/codegen-rust/asn1ToRosMsg.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -o etsi_its_msgs/etsi_its_cam_msgs/msg -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: denm
script: ./utils/codegen/codegen-rust/asn1ToRosMsg.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -o etsi_its_msgs/etsi_its_denm_msgs/msg -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: cpm
script: ./utils/codegen/codegen-rust/asn1ToRosMsg.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -o etsi_its_msgs/etsi_its_cpm_msgs/msg -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: cpm_ts
script: ./utils/codegen/codegen-rust/asn1ToRosMsg.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -o etsi_its_msgs/etsi_its_cpm_ts_msgs/msg -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci

steps:
- name: Checkout code
Expand Down Expand Up @@ -124,8 +124,8 @@ jobs:
script: ./utils/codegen/codegen-rust/asn1ToConversionHeader.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -t cam -o etsi_its_conversion/etsi_its_cam_conversion/include/etsi_its_cam_conversion -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: denm
script: ./utils/codegen/codegen-rust/asn1ToConversionHeader.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -t denm -o etsi_its_conversion/etsi_its_denm_conversion/include/etsi_its_denm_conversion -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: cpm
script: ./utils/codegen/codegen-rust/asn1ToConversionHeader.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -t cpm -o etsi_its_conversion/etsi_its_cpm_conversion/include/etsi_its_cpm_conversion -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci
- message: cpm_ts
script: ./utils/codegen/codegen-rust/asn1ToConversionHeader.py asn1/raw/cpm_ts103324/asn/CPM-PDU-Descriptions.asn asn1/raw/cpm_ts103324/asn/CPM-OriginatingStationContainers.asn asn1/raw/cpm_ts103324/asn/CPM-PerceivedObjectContainer.asn asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn -t cpm_ts -o etsi_its_conversion/etsi_its_cpm_ts_conversion/include/etsi_its_cpm_ts_conversion -di ghcr.io/${{ github.repository }}:rgen_${{ github.sha }}_ci

steps:
- name: Checkout code
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-ros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: ika-rwth-aachen/docker-ros@main
with:
platform: amd64,arm64
platform: amd64
target: dev,run
image-tag: ros
base-image: rwthika/ros:noetic
Expand All @@ -22,20 +22,20 @@ jobs:
steps:
- uses: ika-rwth-aachen/docker-ros@main
with:
platform: amd64,arm64
platform: amd64
target: dev,run
image-tag: ros2
base-image: rwthika/ros2:humble
command: ros2 launch etsi_its_conversion converter.launch.py
enable-industrial-ci: 'true'
enable-recursive-vcs-import: 'false'

ros2-iron:
runs-on: ubuntu-latest
steps:
- uses: ika-rwth-aachen/docker-ros@main
with:
platform: amd64,arm64
platform: amd64
target: dev,run
image-tag: ros2-iron
base-image: rwthika/ros2:iron
Expand All @@ -48,7 +48,7 @@ jobs:
steps:
- uses: ika-rwth-aachen/docker-ros@main
with:
platform: amd64,arm64
platform: amd64
target: dev,run
image-tag: ros2-jazzy
base-image: ubuntu:24.04
Expand Down
16 changes: 8 additions & 8 deletions .gitlab-ci.codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ etsi_its_denm_coding:
- rm -rf /builds/$CI_PROJECT_PATH/tmp
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_cpm_coding:
etsi_its_cpm_ts_coding:
stage: asn1c
needs: ["asn1c-docker"]
script:
Expand All @@ -93,8 +93,8 @@ etsi_its_cpm_coding:
asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn
asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn
asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn
-t cpm
-o etsi_its_coding/etsi_its_cpm_coding
-t cpm_ts
-o etsi_its_coding/etsi_its_cpm_ts_coding
-td /builds/$CI_PROJECT_PATH/tmp
-di ${_ASN1C_CI_IMAGE}
- rm -rf /builds/$CI_PROJECT_PATH/tmp
Expand Down Expand Up @@ -128,7 +128,7 @@ etsi_its_denm_msgs:
- rm -rf /builds/$CI_PROJECT_PATH/tmp
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_cpm_msgs:
etsi_its_cpm_ts_msgs:
stage: ROS Messages
needs: ["rgen-docker"]
script:
Expand All @@ -140,7 +140,7 @@ etsi_its_cpm_msgs:
asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn
asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn
asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn
-o etsi_its_msgs/etsi_its_cpm_msgs/msg
-o etsi_its_msgs/etsi_its_cpm_ts_msgs/msg
-td /builds/$CI_PROJECT_PATH/tmp
-di ${_RGEN_CI_IMAGE}
- rm -rf /builds/$CI_PROJECT_PATH/tmp
Expand Down Expand Up @@ -176,7 +176,7 @@ etsi_its_denm_conversion:
- rm -rf /builds/$CI_PROJECT_PATH/tmp
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_cpm_conversion:
etsi_its_cpm_ts_conversion:
stage: Conversion Headers
needs: ["rgen-docker"]
script:
Expand All @@ -188,8 +188,8 @@ etsi_its_cpm_conversion:
asn1/raw/cpm_ts103324/asn/CPM-PerceptionRegionContainer.asn
asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn
asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn
-t cpm
-o etsi_its_conversion/etsi_its_cpm_conversion/include/etsi_its_cpm_conversion
-t cpm_ts
-o etsi_its_conversion/etsi_its_cpm_ts_conversion/include/etsi_its_cpm_ts_conversion
-td /builds/$CI_PROJECT_PATH/tmp
-di ${_RGEN_CI_IMAGE}
- rm -rf /builds/$CI_PROJECT_PATH/tmp
Expand Down
16 changes: 8 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"justMyCode": true
},
{
"name": "CPM (coding)",
"name": "CPM TS (coding)",
"preLaunchTask": "Patch ASN.1 files",
"type": "debugpy",
"request": "launch",
Expand All @@ -113,15 +113,15 @@
"asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn",
"asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn",
"-t",
"cpm",
"cpm_ts",
"-o",
"etsi_its_coding/etsi_its_cpm_coding"
"etsi_its_coding/etsi_its_cpm_ts_coding"
],
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "CPM (msgs)",
"name": "CPM TS (msgs)",
"preLaunchTask": "Patch ASN.1 files",
"type": "debugpy",
"request": "launch",
Expand All @@ -134,13 +134,13 @@
"asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn",
"asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn",
"-o",
"etsi_its_msgs/etsi_its_cpm_msgs/msg"
"etsi_its_msgs/etsi_its_cpm_ts_msgs/msg"
],
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "CPM (conversion)",
"name": "CPM TS (conversion)",
"preLaunchTask": "Patch ASN.1 files",
"type": "debugpy",
"request": "launch",
Expand All @@ -153,9 +153,9 @@
"asn1/raw/cpm_ts103324/asn/CPM-SensorInformationContainer.asn",
"asn1/patched/cpm_ts103324/asn/cdd/ETSI-ITS-CDD.asn",
"-t",
"cpm",
"cpm_ts",
"-o",
"etsi_its_conversion/etsi_its_cpm_conversion/include/etsi_its_cpm_conversion"
"etsi_its_conversion/etsi_its_cpm_ts_conversion/include/etsi_its_cpm_ts_conversion"
],
"console": "integratedTerminal",
"justMyCode": true
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ During runtime, the `etsi_its_conversion` ROS node converts incoming UDP payload

## Supported ETSI ITS Messages

| Status | Acronym | Name | Version | Definition | Repository |
| --- | --- | --- | --- | --- | --- |
| :white_check_mark: | CAM | Cooperative Awareness Message | 1.4.1 | [Link](https://www.etsi.org/deliver/etsi_en/302600_302699/30263702/01.04.01_60/en_30263702v010401p.pdf) | [Link](https://forge.etsi.org/rep/ITS/asn1/cam_en302637_2) |
| :white_check_mark: | DENM | Decentralized Environmental Notification Message | 1.3.1 | [Link](https://www.etsi.org/deliver/etsi_en/302600_302699/30263703/01.03.01_60/en_30263703v010301p.pdf) | [Link](https://forge.etsi.org/rep/ITS/asn1/denm_en302637_3) |
| :white_check_mark: | CPM | Collective Perception Message | 2.1.1 | [Link](https://www.etsi.org/deliver/etsi_ts/103300_103399/103324/02.01.01_60/ts_103324v020101p.pdf) | [Link](https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324) |
| Status | Acronym | Name | EN Specification | TS Specification |
| --- | --- | --- | --- | --- |
| :white_check_mark: | CAM | Cooperative Awareness Message | [EN 302 637-2 V1.4.1](https://www.etsi.org/deliver/etsi_en/302600_302699/30263702/01.04.01_60/en_30263702v010401p.pdf) ([ASN.1](https://forge.etsi.org/rep/ITS/asn1/cam_en302637_2)) | - |
| :white_check_mark: | DENM | Decentralized Environmental Notification Message | [EN 302 637-3 V1.3.1](https://www.etsi.org/deliver/etsi_en/302600_302699/30263703/01.03.01_60/en_30263703v010301p.pdf) ([ASN.1](https://forge.etsi.org/rep/ITS/asn1/denm_en302637_3)) | - |
| :white_check_mark: | CPM | Collective Perception Message | - | [TS 103 324 V2.1.1](https://www.etsi.org/deliver/etsi_ts/103300_103399/103324/02.01.01_60/ts_103324v020101p.pdf) ([ASN.1](https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324)) |
| :soon: | MAPEM | Map Extended Message | - | - | - |
| :soon: | SPATEM | Signal Phase and Timing Extended Message | - | - | - |

> [!NOTE]
> Message types that are standardized as *European Norms (EN)* are available as, e.g., `etsi_its_cam_msgs`. New message types or revisions of existing message types that are only specified in *Technical Specifications (TS)* are available as, e.g., `etsi_its_cpm_ts_msgs`.

## Packages

Expand All @@ -66,19 +69,19 @@ etsi_its_messages
├── etsi_its_coding
│ ├── etsi_its_coding # metapackage including all coding packages
│ ├── etsi_its_cam_coding
│ ├── etsi_its_cpm_coding
│ ├── etsi_its_cpm_ts_coding
│ └── etsi_its_denm_coding
├── etsi_its_conversion
│ ├── etsi_its_conversion # conversion node depending on all conversion packages
│ ├── etsi_its_cam_conversion
│ ├── etsi_its_cpm_conversion
│ ├── etsi_its_cpm_ts_conversion
│ ├── etsi_its_denm_conversion
│ └── etsi_its_primitives_conversion
├── etsi_its_messages # metapackage including all others
├── etsi_its_msgs
│ ├── etsi_its_msgs # metapackage including all msg packages
│ ├── etsi_its_cam_msgs
│ ├── etsi_its_cpm_msgs
│ ├── etsi_its_cpm_ts_msgs
│ └── etsi_its_denm_msgs
├── etsi_its_msgs_utils
└── etsi_its_rviz_plugins
Expand Down Expand Up @@ -138,12 +141,12 @@ The conversion node bridges all ETSI ITS message types at the same time in both
# ROS 2
ros2 launch etsi_its_conversion converter.launch.py
# or
ros2 run etsi_its_conversion etsi_its_conversion_node --ros-args -p etsi_types:=[cam,cpm,denm] -p has_btp_destination_port:=true -p btp_destination_port_offset:=8 -p etsi_message_payload_offset:=78
ros2 run etsi_its_conversion etsi_its_conversion_node --ros-args -p etsi_types:=[cam,cpm_ts,denm] -p has_btp_destination_port:=true -p btp_destination_port_offset:=8 -p etsi_message_payload_offset:=78

# ROS
roslaunch etsi_its_conversion converter.ros1.launch
# or
rosrun nodelet nodelet standalone etsi_its_conversion/Converter _etsi_types:=[cam,cpm,denm] _has_btp_destination_port:=true _btp_destination_port_offset:=8 _etsi_message_payload_offset:=78
rosrun nodelet nodelet standalone etsi_its_conversion/Converter _etsi_types:=[cam,cpm_ts,denm] _has_btp_destination_port:=true _btp_destination_port_offset:=8 _etsi_message_payload_offset:=78
```

#### Subscribed Topics
Expand All @@ -152,7 +155,7 @@ rosrun nodelet nodelet standalone etsi_its_conversion/Converter _etsi_types:=[ca
| --- | --- | --- |
| `~/udp/in` | `udp_msgs/msg/UdpPacket` | UDP payload for conversion to ROS |
| `~/cam/in` | `etsi_its_cam_msgs/msg/CAM` | CAM for conversion to UDP |
| `~/cpm/in` | `etsi_its_cpm_msgs/msg/CollectivePerceptionMessage` | CPM for conversion to UDP |
| `~/cpm_ts/in` | `etsi_its_cpm_ts_msgs/msg/CollectivePerceptionMessage` | CPM for conversion to UDP |
| `~/denm/in` | `etsi_its_denm_msgs/msg/DENM` | DENM for conversion to UDP |

#### Published Topics
Expand All @@ -161,7 +164,7 @@ rosrun nodelet nodelet standalone etsi_its_conversion/Converter _etsi_types:=[ca
| --- | --- | --- |
| `~/udp/out` | `udp_msgs/msg/UdpPacket` | UDP payload converted from ROS message |
| `~/cam/out` | `etsi_its_cam_msgs/msg/CAM` | CAM converted from UDP payload |
| `~/cpm/out` | `etsi_its_cpm_msgs/msg/CollectivePerceptionMessage` | CPM converted from UDP payload |
| `~/cpm_ts/out` | `etsi_its_cpm_ts_msgs/msg/CollectivePerceptionMessage` | CPM converted from UDP payload |
| `~/denm/out` | `etsi_its_denm_msgs/msg/DENM` | DENM converted from UDP payload |

#### Parameters
Expand All @@ -171,7 +174,7 @@ rosrun nodelet nodelet standalone etsi_its_conversion/Converter _etsi_types:=[ca
| `has_btp_destination_port` | `bool` | whether incoming/outgoing UDP messages include a [2-byte BTP destination port](https://www.etsi.org/deliver/etsi_en/302600_302699/3026360501/02.01.00_20/en_3026360501v020100a.pdf) |
| `btp_destination_port_offset` | `int` | number of bytes before an optional 2-byte BTP destination port, see `has_btp_destination_port` |
| `etsi_message_payload_offset` | `int` | number of bytes before actual ETSI message payload |
| `etsi_types` | `string[]` | list of ETSI types to convert | `cam`, `cpm`, `denm` |
| `etsi_types` | `string[]` | list of ETSI types to convert | `cam`, `cpm_ts`, `denm` |


## Access Functions
Expand Down
2 changes: 1 addition & 1 deletion etsi_its_coding/etsi_its_coding/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<depend>etsi_its_cam_coding</depend>
<depend>etsi_its_denm_coding</depend>
<depend>etsi_its_cpm_coding</depend>
<depend>etsi_its_cpm_ts_coding</depend>
<depend>ros_environment</depend>

<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend>
Expand Down
69 changes: 0 additions & 69 deletions etsi_its_coding/etsi_its_cpm_coding/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 06eefef

Please sign in to comment.