ika-rwth-aachen / etsi_its_messages

ROS / ROS 2 Support for ETSI ITS Messages for V2X Communication
MIT License
43 stars 8 forks source link

Alternative gen for .msg and conversion headers #17

Closed v0-e closed 4 months ago

v0-e commented 5 months ago

Adds new code generators for ROS .msg and asn1c structs to ROS structs conversion headers, as discussed in #13. Implements two compiler backends for librasn's compiler. As I used a bit of the code written by @6d7a for the Rust backend, I'm adding him as a co-author.

Code generation is pretty much as asn1c:

Specify a -m/--message (e.g., cam, denm) and the newly built container using -di for the above Python scripts.

Let me know what you think :+1: Any issues please report them. If you prefer other naming for variables/functions/files please also let me know. I'll keep this PR as a draft for now.

v0-e commented 5 months ago

Added/renamed constraint-related fields to better comply with the expected naming used in etsi_its_msgs_utils.

v0-e commented 5 months ago

Tested full CAM conversion pipeline with the provided RViz plugin. Vehicles are displayed correctly. 👍 Tested real-time using simulated OBUs sending CAMs: OBUs -> RSU -> UPER to ROS Conversion node -> RViz

lreiher commented 5 months ago

Awesome to hear that the testing is looking good! It's very cool to see that you made such large progress in that short amount of time.

I've already spent a couple of minutes to try to regenerate CAM myself (working fine). Before going into further testing and also before looking at any other details, I'd like to ask you to do the following:

Thanks again!

v0-e commented 5 months ago

Hey @lreiher,

lreiher commented 4 months ago

Hi, your PR hasn't been forgotten yet. ;) Sorry for the delay, but we have now had the time to have a closer look and will add a few more review comments on Monday.

We are really looking forward to merge this (as an alternative for now) as soon as possible, with the potential of also completely switching to your approach in the near future.

Have a great weekend!

v0-e commented 4 months ago

Hi @lreiher, Thanks for the comments :) I think I've tackled most of your concerns. Let me know what you think :+1:

jpbusch commented 4 months ago

Hi @v0-e, Thanks for your adjustments! The diff looks good. We are now adding the small part in the Readme and will merge the PR afterwards. For now, however, we would undo the changes to the msgs and header files so that the files with the "default" py-generation are still on the main.

Our plan is then to generate further message formats (e.g. CPM) in a separate PR. As part of this, we would then change the default generation to the rust-generation and also update the CAM and DENM files accordingly.