Skip to content

Add XML schema validation for ros2_control tag and test assets - #3461

Open
sachinkum0009 wants to merge 18 commits into
ros-controls:masterfrom
sachinkum0009:feat/schema-description
Open

Add XML schema validation for ros2_control tag and test assets #3461
sachinkum0009 wants to merge 18 commits into
ros-controls:masterfrom
sachinkum0009:feat/schema-description

Conversation

@sachinkum0009

Copy link
Copy Markdown
Contributor

Description

Note: This PR is a recreation of the accidentally closed PR #2466.

It introduces XML schema validation for the <ros2_control> tag in URDF files, addressing Issue 2173. The changes include:

  • Added an XML Schema Definition (ros2_control.xsd) to formalize and validate the structure of the <ros2_control> tag.
  • Implemented a GTest-based unit test (validate_xml_schema.cpp) using libxml2 to validate URDF files against the schema.
  • Updated CMakeLists.txt to install the schema and URDF directories, and to build and link the new test.
  • Added a new invalid URDF test file to verify schema validation failure cases.
  • Enhanced the valid test URDF to include more schema features (e.g., params, gpio).
  • Updated package dependencies to include ament_index_cpp for test support.

Fixes #2173

Is this user-facing behavior change?

Did you use Generative AI?

No

Additional Information

TODOs

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

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.

Have a schema description for the ros2_control tag in the URDF

1 participant