Skip to content

Message versioning and translation for ROS#24113

Merged
sfuhrer merged 5 commits intomainfrom
message_versioning_and_translation
Feb 11, 2025
Merged

Message versioning and translation for ROS#24113
sfuhrer merged 5 commits intomainfrom
message_versioning_and_translation

Conversation

@bkueng
Copy link
Member

@bkueng bkueng commented Dec 16, 2024

Follow-up to #23850

  • adds versioning to the topic name in the uxrce dds client
  • adds a translation node that runs under ROS and converts between different versions of a topic (see this document for details)
  • adds CI to ensure whenever a versioned topic changes, a new version is added. The required steps are documented in this README. We can also move that to a PX4 docs page.
  • adds CI for the ROS translation node

I ended up adding a script that copies the translation node and msg files into a ROS workspace. I tested an approach of directly adding PX4 into a workspace, but ran into too many issues (e.g. msg namespace cannot be customized independently, or that there cannot be multiple subprojects if the toplevel directory already contains a CMakeLists.txt).

@github-actions
Copy link

github-actions bot commented Dec 16, 2024

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 152 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +152  +0.0%    +152    .text
  +0.4%    +132  +0.4%    +132    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +0.0%     +13  +0.0%     +13    [section .text]
  +0.1%      +4  +0.1%      +4    ../../src/modules/vtol_att_control/vtol_type.cpp
  +0.2%      +3  +0.2%      +3    ../../src/systemcmds/ver/ver.cpp
+0.0%     +56  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%     +12  [ = ]       0    .debug_frame
+0.0%    +734  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.7%    +738  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+0.0%      +2  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.1%     +31  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  -0.4%      -4  [ = ]       0    task/task_cancelpt.c
+0.0%      +2  [ = ]       0    .debug_loc
  +0.0%      +2  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
-0.0%     -38  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  -0.3%     -32  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +3.1%      +2  [ = ]       0    task/task_cancelpt.c
+0.0%     +16  [ = ]       0    .debug_str
  +0.1%     +16  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+1.0%      +2  [ = ]       0    .shstrtab
+0.0%     +14  [ = ]       0    .strtab
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +0.4%     +14  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +0.0%     +32  [ = ]       0    [section .strtab]
-1.3%    -152  [ = ]       0    [Unmapped]
+0.0%    +792  +0.0%    +152    TOTAL

px4_fmu-v6x [Total VM Diff: 144 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +144  +0.0%    +144    .text
  +0.4%    +132  +0.4%    +132    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +0.0%      +8  +0.0%      +8    [section .text]
  +0.1%      +4  +0.1%      +4    ../../src/modules/vtol_att_control/vtol_type.cpp
+0.0%     +56  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%     +12  [ = ]       0    .debug_frame
+0.0%    +734  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.7%    +738  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+0.0%     +10  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.1%     +31  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +0.4%      +4  [ = ]       0    task/task_cancelpt.c
+0.0%      +2  [ = ]       0    .debug_loc
  +0.0%      +2  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
-0.0%     -38  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  -0.3%     -32  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +3.1%      +2  [ = ]       0    task/task_cancelpt.c
+0.0%     +16  [ = ]       0    .debug_str
  +0.1%     +16  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+0.9%      +2  [ = ]       0    .shstrtab
+0.0%     +14  [ = ]       0    .strtab
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +0.4%     +14  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
  +0.0%     +32  [ = ]       0    [section .strtab]
-0.2%    -144  [ = ]       0    [Unmapped]
+0.0%    +800  +0.0%    +144    TOTAL

Updated: 2025-02-05T10:33:52

Copy link
Contributor

@GuillaumeLaine GuillaumeLaine left a comment

Choose a reason for hiding this comment

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

Works as advertised, this is awesome 👍🏻

Copy link
Contributor

@mrpollo mrpollo left a comment

Choose a reason for hiding this comment

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

i left a few nitpicky comments regarding CI @bkueng, overall great work

This adds "_v" + string(T::MESSAGE_VERSION) to the ROS topic if the message
contains a MESSAGE_VERSION field (and the version is non-zero).
@bkueng bkueng force-pushed the message_versioning_and_translation branch from ef7c759 to 1b92445 Compare February 4, 2025 08:36
@bkueng bkueng force-pushed the message_versioning_and_translation branch 5 times, most recently from 6eea223 to dc4dd9d Compare February 5, 2025 09:31
@bkueng bkueng force-pushed the message_versioning_and_translation branch from dc4dd9d to 0115a0b Compare February 5, 2025 10:28
@bkueng
Copy link
Member Author

bkueng commented Feb 5, 2025

Thanks for all the reviews and tests. This is getting ready.

@sfuhrer
Copy link
Contributor

sfuhrer commented Feb 7, 2025

@mrpollo good to go from your side?
This PR is required to unblock development on PX4 that touches uorb topics, so would be good if we can wrap it up asap.

@mrpollo
Copy link
Contributor

mrpollo commented Feb 7, 2025

Good to go

@sfuhrer sfuhrer merged commit b96b4fb into main Feb 11, 2025
63 checks passed
@sfuhrer sfuhrer deleted the message_versioning_and_translation branch February 11, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants