Skip to content

[22872] Configure ROS 2 Easy Mode via C++ and XML #5689

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

Merged
merged 8 commits into from
Mar 18, 2025

Conversation

Carlosespicur
Copy link
Contributor

@Carlosespicur Carlosespicur commented Mar 5, 2025

Description

This PR adds a new member in RTPSParticipant attributes to store the IP of the Discovery Server when using ROS 2 Easy Mode.

  • IP can be configured through C++ using WireProtocolConfigQos easy_mode setter.
  • IP can be configured through XML using easy_mode_ip tag.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Any new/modified methods have been properly documented using Doxygen.
  • Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • ❌ Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • New feature has been added to the versions.md file (if applicable).
  • New feature has been documented/Current behavior is correctly described in the documentation.
  • N/A Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • N/A If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@Carlosespicur Carlosespicur force-pushed the feature/easy-mode-ip branch from 4fa7db0 to 754d56e Compare March 5, 2025 16:53
Signed-off-by: Carlosespicur <[email protected]>
Copy link
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

Some minor suggestions from a quick review:

  • I would add a call to IPLocator::isIPv4 in each setter to ensure that a valid IPv4 is used. We might also add this check in the current environment variable parsing for consistency.
  • A test to check that non-IPv4 IPs are not accepted would be great.
  • Also, we need to modify the fastdds_profiles.xsd to add the new XML tag

Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima left a comment

Choose a reason for hiding this comment

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

Looking good. We must decide now if we want to extend the new API to allow for shared memory configuration (only option that would affect this PR), reuse the builtin transports configuration (which allows to configure some of SHM parameters but indirectly), extend it to also include SHM specific params, or create a new dedicated attribute/qos.

Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima left a comment

Choose a reason for hiding this comment

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

LGTM

@juanlofer-eprosima juanlofer-eprosima merged commit 55f67e1 into master Mar 18, 2025
14 of 17 checks passed
@juanlofer-eprosima juanlofer-eprosima deleted the feature/easy-mode-ip branch March 18, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants