Skip to content

Add tests for GPIO parsing behavior in component_parser#3157

Open
Anusha-Sharma-2 wants to merge 1 commit intoros-controls:masterfrom
Anusha-Sharma-2:add-gpio-parser-tests
Open

Add tests for GPIO parsing behavior in component_parser#3157
Anusha-Sharma-2 wants to merge 1 commit intoros-controls:masterfrom
Anusha-Sharma-2:add-gpio-parser-tests

Conversation

@Anusha-Sharma-2
Copy link
Copy Markdown

Summary

This PR adds test coverage for GPIO tag parsing in component_parser.

Specifically, it introduces a test case where a GPIO interface is declared in the URDF but does not correspond to a hardware interface.

Details

While working on this, I observed that unlike joints and sensors, GPIO interfaces are not strictly validated against hardware interface existence during URDF parsing. The added test documents this behavior and ensures it is explicitly covered.

This improves test coverage and clarifies expected behavior for GPIO parsing. Happy to extend this further if stricter validation for GPIO interfaces is desired.

Testing

  • Built and tested locally using:
    • colcon build --packages-select hardware_interface
    • colcon test --packages-select hardware_interface
    • pre-commit run --all-files
  • All tests pass

Related Issue

Closes #976

Copy link
Copy Markdown
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

The name of the test and what it does is completely different. I believe it this crashes at the Resource Manager level, not at the parsing level

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.

Add tests for tag parsing

2 participants