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

Message versioning and translation for ROS #24113

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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).

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).
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%    +140  +0.4%    +140    ../../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%    +720  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.6%    +724  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+0.0%      +8  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.1%     +29  [ = ]       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]
-0.9%    -152  [ = ]       0    [Unmapped]
+0.0%    +780  +0.0%    +152    TOTAL

px4_fmu-v6x [Total VM Diff: 160 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +160  +0.0%    +160    .text
  +0.4%    +140  +0.4%    +140    ../../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%    +720  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.7%    +724  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
+0.0%      +2  [ = ]       0    .debug_loc
  +0.0%      +2  [ = ]       0    ../../src/modules/uxrce_dds_client/uxrce_dds_client.cpp
-0.0%     -42  [ = ]       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.0%      -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%    -160  [ = ]       0    [Unmapped]
+0.0%    +768  +0.0%    +160    TOTAL

Updated: 2024-12-17T08:46:46

@bkueng bkueng force-pushed the message_versioning_and_translation branch 3 times, most recently from 098194d to 6a3bb95 Compare December 16, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant