Skip to content

Conversation

PetervdPerk-NXP
Copy link
Member

Adds documentation on how to use Zenoh in PX4 since #24476

@hamishwillee is this the correct way to add a new page to the sidebar?

https://docs.px4.io/main/en/modules/modules_driver.html#zenoh
category: System
type: int32
type: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a bit messed up. I think this is the right way to do a boolean - and you should use either a boolean or an enum when you only want particular values.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm interesting I though PX4 always only had float and int32, didn't knew boolean worked.
So yeah boolean is way better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great. Enum works too if you think there might be other configuration you want to do through the param later.

It gets converted into an INT32 by the toolchain



The [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) file specifies which uORB message definitions are compiled into the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) module when [PX4 is built](../middleware/uxrce_dds.md#code-generation), and hence which topics are available for ROS 2 applications to subscribe or publish (by default).
The [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) file specifies which uORB message definitions are compiled into the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) and/or [zeroh](../modules/modules_driver.html#zenoh) module when [PX4 is built](../middleware/uxrce_dds.md#code-generation), and hence which topics are available for ROS 2 applications to subscribe or publish (by default).
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only change of relevance here. The rest added by prettier.


| PX4 Target | Notes |
| ---------------------- | ------------------------------------------------------------------------------------------- |
| `px4_fmu-v6xrt` | For [FMUv6X-RT](../flight_controller/nxp_mr_vmu_rt1176.md) (reference platform for testing) |
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't recommend particular platforms unless it won't work on other platforms. I've called this a reference platform for testing, which it is.

Comment on lines +57 to +59
You can check if the module is present on your board by searching for the key `CONFIG_MODULES_ZENOH=y` in your board's `default.px4board` KConfig file.
For example, you can see that the module is present in `px4_fmu-v6xrt` build targets from [/boards/px4/fmu-v6xrt/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#L91).
If it is not present you can add this key to your board configuration and rebuild.
Copy link
Contributor

@hamishwillee hamishwillee Oct 15, 2025

Choose a reason for hiding this comment

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

Section rewritten so people can try this on any board if that is what they have.

If I did this for fmu-v5 build target, would I need to:

  • Remove the uXRCE-DDS module?
  • Any thing else to get it working

Essentially, what level of coexistence can this have with the DDS alternative?

Copy link
Member Author

Choose a reason for hiding this comment

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

You can check if the module is present on your board by searching for the key CONFIG_MODULES_ZENOH=y in your board's default.px4board KConfig file.

Indeed the text above described it correctly. Overall both Zenoh and uXRCE-DDS are perfectly capable to co-exist. However simply due to flash constraints they can't be integrated in the same build. The targets in the table below have enough flash and thus have it enabled in their default builds.

Copy link
Contributor

Choose a reason for hiding this comment

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

That is worth adding. Will add tomorrow. Thanks!


Set up PX4 to connect to the companion computer running `zenohd`.

PX4's default IP address of the Zenoh daemon host is `192.168.1.104`.
Copy link
Contributor

@hamishwillee hamishwillee Oct 15, 2025

Choose a reason for hiding this comment

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

I assume this is the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good remark actually there's no default, I thought @bkueng did some IP address related changes lately?
@bkueng do we have a default IP for the companion computer nowadays?
If so, I think we should change this.

Comment on lines +66 to +68
| `nxp_tropic-community` | |
| `nxp_mr-tropic` | |
| `nxp_mr-canhubk344` | |
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what these are for. If that is useful perhaps add note (it might be something that NXP users will already know about).

Copy link
Contributor

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Looks great. I've subedited so you can you please read over to check I didn't break anything. Also check my comments to see if any action is needed.

Copy link

No flaws found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants