Skip to content
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

Add "additional_constraints" support #221

Conversation

MrBlenny
Copy link
Contributor

This PR adds the ability to set "additional_constraints" in the ParameterDescription

@pac48
Copy link
Collaborator

pac48 commented Oct 10, 2024

@MrBlenny can you run pre-commit run -a in the root of your repository to fix the formatting?

The change looks nice overall! Is the idea of additional_constraints to pass the validation logic off to the downstream code? Since there might be domain specific validation, this seems useful.

@MrBlenny
Copy link
Contributor Author

I'll push a commit with lint when I'm at a computer later today.

Yes, I was keen to embed JSON schema into the additional constraints and use that to generate a UI for setting advanced parameters (such as parameters that have their values as JSON encoding ROS messages). A simpler example would be to embed enum options for a strong param in the additional constraints (as JSON schema or otherwise) so you can dynamically build a UI to set params via a dropdown of enum options.

It would be pretty powerful if this library supported JSON schema as a validator but that'd of course be a big change.

@pac48 pac48 merged commit 4ad0857 into PickNikRobotics:main Oct 11, 2024
7 checks passed
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.

2 participants