mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-24 16:01:53 +08:00
feat(uxrce_dds_client): bridge out-of-tree uORB messages over uXRCE-DDS (#29782)
* feat(uxrce_dds_client): bridge the topics of out-of-tree messages Out-of-tree uORB messages build into PX4 like any other, but the bridge reads only dds_topics.yaml, so bridging one means editing that file and carrying the change through every PX4 update. When $EXTERNAL_MODULES_LOCATION/msg/dds_topics.yaml exists, the build passes it to the generator after dds_topics.yaml, and the generator appends each file's lists to those before it. A topic declared twice in the same list stops the build, since it would be bridged twice. A single file, as Zenoh's build passes, yields its lists unchanged. Assisted-by: Claude-Code:claude-opus-5-5 * test(uxrce_dds_client): test the topic generator in the Python checks The generator runs only inside a firmware build, so a change that breaks joining topic files, or the check for repeated topics, would first show up as a broken build. The tests run it on its own: a second file appends its topics to each list, lists split across files give the same header as one file, files without topics add nothing, and a repeated topic stops it. The Python checks job installs empy for the generator, in the range PX4's requirements.txt gives. Assisted-by: Claude-Code:claude-opus-5-5 * feat(scripts): copy out-of-tree messages into px4_msgs ROS 2 needs every bridged message in px4_msgs, and copy_to_ros_ws.sh copies only PX4's own. An optional second argument, the external modules location, adds the messages of its msg directory, if it has any. A message with the name of a PX4 message would replace PX4's definition in px4_msgs, so the script refuses it before copying anything. A test in the Python checks runs the script on throwaway workspaces: PX4's messages alone, a location's messages added, a location without messages, and the refusals of a PX4 message name and of a location without a msg directory. Assisted-by: Claude-Code:claude-opus-5-5 * docs(uxrce_dds): document bridging out-of-tree messages The uXRCE-DDS page covers dds_topics.yaml but not the topics of out-of-tree messages. Describe their topics file and the copy into px4_msgs there, and point to it from the External Modules page. Assisted-by: Claude-Code:claude-opus-5-5
This commit is contained in:
1 parent
cd68f944d4
commit
288b114841
8 files changed
+264
-9
No files matched your search
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
- name: Install tools
|
||||
run: |
|
||||
pip install mypy types-requests types-PyYAML flake8 pyyaml
|
||||
pip install mypy types-requests types-PyYAML flake8 pyyaml "empy>=3.3,<4"
|
||||
pip install -r Tools/setup/test-requirements.txt
|
||||
|
||||
- name: Check MAVSDK test scripts with mypy
|
||||
@@ -63,6 +63,16 @@ jobs:
|
||||
flake8 Tools/ros2/*.py
|
||||
python3 -m unittest discover -s Tools/ros2 -p 'test_*.py'
|
||||
|
||||
- name: Check the uXRCE-DDS topic generator
|
||||
run: |
|
||||
flake8 src/modules/uxrce_dds_client/test_generate_dds_topics.py
|
||||
python3 -m unittest discover -s src/modules/uxrce_dds_client -p 'test_*.py' -v
|
||||
|
||||
- name: Test the ROS workspace copy script
|
||||
run: |
|
||||
flake8 Tools/test_copy_to_ros_ws.py
|
||||
python3 -m unittest discover -s Tools -p 'test_copy_to_ros_ws.py' -v
|
||||
|
||||
- name: Test submodule check
|
||||
run: python3 -m unittest discover -s Tools -p 'test_check_submodules.py' -v
|
||||
|
||||
|
||||
Reference in new issue
Block a user