YAML parameter parser (#235)

* Implement a basic YAML based parameter parser for ros2 nodes

* Add README file

* Fix the issues after moving from rcutils_yaml_param_parser to rcl_yaml_param_parser

  - rename folders from rcutils_yaml_param_parser to rcl_yaml_param_parser
  - rename project, header guards and include statements from rcutils_yaml_param_parser to rcl_yaml_param_parser
  - move type declaration in separat file and namespace new structures
  - Fix the code review comments from Mikael

* Few minor changes

   - Changed "params" string to "ros__parameters"
   - Add -Wall, -Wextra and -Wpedantic falgs
   - Fix the compile warning with the new flags

* Fix the changes made in the design of C structure

  - Remove the node_namespaces entry in rcl_params_t
  - Change the type of num_nodes and num_params to size_t

* depend on libyaml_vendor (#236)

* Fix cmake setting standard(C and C++) and add byte_array in C struct

*   Remove C11 so that it defaults to C99

* [rcl_yaml_param_parser] fix export symbols (#237)

* add visibility macros

* remove unused macro

* Support for multi level node and parameter name spaces

* Additional fixes and cleanups

  - Support for string namespace seperator
  - Provide parameter structure init function API
  - name cleanups

* off by 1

* Call yaml_parser_delete()

* fclose(yaml_file)

* free() allocated paths

* Call yaml_event_delete()

* completely deallcoate string array

* Few cleanup changes

  - Add install command into CMakelists.txt
  - Replace one of the zero_allocate with reallocate
  - Pass allocator state
  - Fix int32_t -> rcl_ret_t return value

* Don't include unistd.h

* Use size_t for array indices

* Just pass the allocator in the init function
This commit is contained in:
anup-pem 2018-05-29 09:07:02 -07:00 committed by Mikael Arguedas
parent e8491ab8ab
commit 5edf27b032
17 changed files with 2087 additions and 0 deletions

View file

@ -0,0 +1,27 @@
**ROS2 rcl YAML paramter parser**
Parse a YAML parameter file and populate the C data structure
The data structure params_st will then be used during node initialization
YAML parameter file should follow the yaml syntax shown below
NOTE: It only supports canonical int and float types
```
<node_namespace_string>: # optional
<node1_name>:
params:
<field_name>: <field_value>
<parameter_namespace_string>: # optional
<field1_name>: <field1_value>
<field2_name>: <field2_value>
<node2_name>:
params:
<field_name>: <field_value>
<parameter_namespace_string>: # optional
<field1_name>: <field1_value>
<field2_name>: <field2_value>
```
This package depends on C libyaml