|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py |
ROS Distro
|
Package Summary
| Version | 1.3.1 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-14 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from setuptools import setup
from generate_parameter_library_py.setup_helper import parameter_cmdclass
setup(
name="turtlesim",
packages=["turtlesim"],
cmdclass=parameter_cmdclass(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
),
)
The module is generated during the build, so it installs with the package.
With --symlink-install and other editable installs, Python imports the source package, so the module is generated there instead (add it to .gitignore); rebuilding without --symlink-install removes it again.
A module that is renamed or removed from setup.py is deleted from the build tree or source package on the next build, so it is not installed or imported anymore.
For several modules, pass a list:
```python cmdclass=parameter_cmdclass(modules=[
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
1.3.1 (2026-10-05)
1.3.0 (2026-07-24)
1.2.0 (2026-06-09)
1.1.0 (2026-05-14)
- Remove tl_expected (#355)
- Contributors: Christoph Fröhlich
1.0.1 (2026-05-06)
- Silence deprecation warning for tl_expected (#350)
- Contributors: Christoph Fröhlich
1.0.0 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (#296)
- Remove deprecated parameter_traits (#294) (#330)
- Remove installation to deprecated include path (#319)
- Contributors: Christoph Fröhlich, Jonas Otto
0.8.0 (2026-03-22)
- Use libexpected-dev instead of tl_expected (#322)
- Contributors: Christoph Fröhlich
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py |
ROS Distro
|
Package Summary
| Version | 1.3.1 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-14 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from setuptools import setup
from generate_parameter_library_py.setup_helper import parameter_cmdclass
setup(
name="turtlesim",
packages=["turtlesim"],
cmdclass=parameter_cmdclass(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
),
)
The module is generated during the build, so it installs with the package.
With --symlink-install and other editable installs, Python imports the source package, so the module is generated there instead (add it to .gitignore); rebuilding without --symlink-install removes it again.
A module that is renamed or removed from setup.py is deleted from the build tree or source package on the next build, so it is not installed or imported anymore.
For several modules, pass a list:
```python cmdclass=parameter_cmdclass(modules=[
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
1.3.1 (2026-10-05)
1.3.0 (2026-07-24)
1.2.0 (2026-06-09)
1.1.0 (2026-05-14)
- Remove tl_expected (#355)
- Contributors: Christoph Fröhlich
1.0.1 (2026-05-06)
- Silence deprecation warning for tl_expected (#350)
- Contributors: Christoph Fröhlich
1.0.0 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (#296)
- Remove deprecated parameter_traits (#294) (#330)
- Remove installation to deprecated include path (#319)
- Contributors: Christoph Fröhlich, Jonas Otto
0.8.0 (2026-03-22)
- Use libexpected-dev instead of tl_expected (#322)
- Contributors: Christoph Fröhlich
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py |
ROS Distro
|
Package Summary
| Version | 1.3.1 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/PickNikRobotics/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-11-14 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from setuptools import setup
from generate_parameter_library_py.setup_helper import parameter_cmdclass
setup(
name="turtlesim",
packages=["turtlesim"],
cmdclass=parameter_cmdclass(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
),
)
The module is generated during the build, so it installs with the package.
With --symlink-install and other editable installs, Python imports the source package, so the module is generated there instead (add it to .gitignore); rebuilding without --symlink-install removes it again.
A module that is renamed or removed from setup.py is deleted from the build tree or source package on the next build, so it is not installed or imported anymore.
For several modules, pass a list:
```python cmdclass=parameter_cmdclass(modules=[
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
1.3.1 (2026-10-05)
1.3.0 (2026-07-24)
1.2.0 (2026-06-09)
1.1.0 (2026-05-14)
- Remove tl_expected (#355)
- Contributors: Christoph Fröhlich
1.0.1 (2026-05-06)
- Silence deprecation warning for tl_expected (#350)
- Contributors: Christoph Fröhlich
1.0.0 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (#296)
- Remove deprecated parameter_traits (#294) (#330)
- Remove installation to deprecated include path (#319)
- Contributors: Christoph Fröhlich, Jonas Otto
0.8.0 (2026-03-22)
- Use libexpected-dev instead of tl_expected (#322)
- Contributors: Christoph Fröhlich
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged generate_parameter_library at Robotics Stack Exchange
|
generate_parameter_library package from generate_parameter_library repogenerate_parameter_library_example cmake_generate_parameter_module_example generate_parameter_library_example_external generate_parameter_module_example generate_parameter_library generate_parameter_library_py parameter_traits |
ROS Distro
|
Package Summary
| Version | 0.7.7 |
| License | BSD-3-Clause |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/ros-tooling/generate_parameter_library.git |
| VCS Type | git |
| VCS Version | humble |
| Last Updated | 2026-10-17 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bmagyar
- christophfroehlich
- Nathan Brooks
- Shaurya Kumar
- Paul Gesel
Authors
- Paul Gesel
generate_parameter_library
Generate C++ or Python code for ROS 2 parameter declaration, getting, and validation using declarative YAML. The generated library contains a C++ struct with specified parameters. Additionally, dynamic parameters and custom validation are made easy.
TOC
Killer Features
- Declarative YAML syntax for ROS 2 Parameters converted into C++ or Python struct
- Declaring, Getting, Validating, and Updating handled by generated code
- Dynamic ROS 2 Parameters made easy
- Custom user-specified validator functions
- Automatically create documentation of parameters
Basic Usage
- Create YAML parameter codegen file
- Add parameter library generation to project
- Use generated struct in project source code
Create yaml parameter codegen file
Write a yaml file to declare your parameters and their attributes.
src/turtlesim_parameters.yaml
turtlesim:
background:
r:
type: int
default_value: 0
description: "Red color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
g:
type: int
default_value: 0
description: "Green color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
b:
type: int
default_value: 0
description: "Blue color value for the background, 8-bit"
validation:
bounds<>: [0, 255]
Add parameter library generation to project
package.xml
<depend>generate_parameter_library</depend>
CMakeLists.txt
find_package(generate_parameter_library REQUIRED)
generate_parameter_library(
turtlesim_parameters # cmake target name for the parameter library
src/turtlesim_parameters.yaml # path to input yaml file
)
add_executable(minimal_node src/turtlesim.cpp)
target_link_libraries(minimal_node PRIVATE
rclcpp::rclcpp
turtlesim_parameters
)
install(TARGETS minimal_node turtlesim_parameters
EXPORT ${PROJECT_NAME}Targets)
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
setup.py
from generate_parameter_library_py.setup_helper import generate_parameter_module
generate_parameter_module(
"turtlesim_parameters", # python module name for parameter library
"turtlesim/turtlesim_parameters.yaml", # path to input yaml file
)
For a Python package built with ament_cmake_python, use generate_parameter_module()
in CMakeLists.txt and install the Python package with ament_python_install_package():
```cmake cmake_minimum_required(VERSION 3.16) project(turtlesim)
find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) find_package(generate_parameter_library REQUIRED)
generate_parameter_module(turtlesim_parameters
File truncated at 100 lines see the full file
Changelog for package generate_parameter_library
0.7.7 (2026-10-05)
0.7.6 (2026-08-08)
- Silence CMake deprecation warning (#375)
- Contributors: Christoph Fröhlich
0.7.5 (2026-07-24)
0.7.4 (2026-06-10)
0.7.3 (2026-05-06)
- Silence deprecation warning for tl_expected (backport #350)
- Contributors: Christoph Froehlich
0.7.2 (2026-04-22)
- Add repository README.md to generate_parameter_library package docs (backport #296)
- Use libexpected-dev instead of tl_expected (#322) (#333)
- Contributors: Christoph Fröhlich, Jonas Otto
0.7.1 (2026-03-22)
0.7.0 (2026-02-22)
- Use a temporary build directory for Python module output (#303)
- Move linters to pre-commit (#298)
- Contributors: Błażej Sowa, Christoph Fröhlich
0.6.0 (2025-12-06)
- Update maintainers for GBP release team (#282)
- Contributors: Nathan Brooks
0.5.0 (2025-06-12)
- Fix generate_parameter_library macro on Windows (#242)
- Contributors: Nathan Brooks, Silvio Traversaro
0.4.0 (2025-01-13)
- Change header install path (#213)
- Contributors: Auguste Bourgois
0.3.9 (2024-10-27)
- Disable cache for program (#218)
- Contributors: Paul Gesel
0.3.8 (2024-03-27)
- use python_install_dir (#178)
- Update CMakeLists.txt (#173)
- Contributors: Christoph Fröhlich, Paul Gesel
0.3.7 (2024-01-12)
- Enable generate_parameter_module through ament_cmake_python (#161)
- Contributors: Paul Gesel
0.3.6 (2023-07-31)
0.3.5 (2023-07-28)
0.3.4 (2023-07-24)
- Add Python support for generate_parameter_library (#110) Co-authored-by: Tyler Weaver <<tyler@picknik.ai>>
- Contributors: Paul Gesel
0.3.3 (2023-04-13)
0.3.2 (2023-04-12)
0.3.1 (2023-02-01)
- Add keyword INTERFACE to fix build error 'ar: no archive members specified' since the generated target is header-only (#93)
- Make it easy for users to override (#92)
File truncated at 100 lines see the full file
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_python | |
| generate_parameter_library_py | |
| parameter_traits | |
| rclcpp | |
| rclpy | |
| rclcpp_lifecycle | |
| rsl | |
| tcb_span | |
| tl_expected |
System Dependencies
| Name |
|---|
| fmt |
| libexpected-dev |