-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derive ROS parameter description from field doc comments
With this change, adding doc comments to fields of structures used with `#[derive(RosParams)]` results in those comments to be used as parameter description. See r2r/examples/parameters_derive.rs for how to use and test this feature. The advantage of this implementation is that it should be backward compatible with all current users of r2r crate. However, it has also some disadvantages: - There is no API for setting parameter description without using RosParams trait. Older apps should either be ported to use RosParams or they cannot benefit from this. - The implementation could be more efficient, if the compatibility is broken. Currently, we have two HashMaps - one for ParameterValues and another for ParameterDescriptors. It might be better to change Node::params to a HashMap whose values contain both ParameterValue and ParameterDescriptior. This way, descriptors would be also available to applications, which might (or might not) be useful.
- Loading branch information
Showing
5 changed files
with
73 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters