| 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | RELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser | 
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged parameter_expression at Robotics Stack Exchange
         
       | 
      
        parameter_expression package from parameter_expression repoparameter_expression | 
      
         ROS Distro
       | 
    
Package Summary
| Version | 0.0.2 | 
| License | Apache License 2.0 | 
| Build type | AMENT_CMAKE | 
| Use | RECOMMENDED | 
Repository Summary
| Checkout URI | https://github.com/ForteFibre/parameter_expression.git | 
| VCS Type | git | 
| VCS Version | main | 
| Last Updated | 2025-09-22 | 
| Dev Status | DEVELOPED | 
| Released | UNRELEASED | 
| Contributing | 
        
          Help Wanted (-)
        
         Good First Issues (-) Pull Requests to Review (-)  | 
    
Package Description
Maintainers
- f0reachARR
 
Authors
parameter_expression
A ROS 2 package that allows using mathematical expressions in dynamic parameters using the muParser library.
Overview
The parameter_expression package provides a C++ class that enables ROS 2 nodes to use mathematical expressions as parameter values. Instead of static numeric values, you can use expressions like "sin(0.5) * 2 + 1" which will be evaluated dynamically when the parameter is set.
Features
- Dynamic Expression Evaluation: Parameters can be set as mathematical expressions that are evaluated in real-time
 - Mathematical Functions: Supports common mathematical functions like sin, cos, tan, atan2, etc (powered by muParser).
 - Type Flexibility: Automatically handles different parameter types (int, double, string expressions)
 - Error Handling: Provides error messages for invalid expressions
 
Dependencies
- rclcpp: ROS 2 C++ client library
 - muParser: Mathematical expression parser library
 
Usage
Basic Usage
Include the header in your ROS 2 node:
#include <parameter_expression/parameter_expression.hpp>
Also, ensure you have the necessary dependencies in your package.xml and CMakeLists.txt:
<depend>parameter_expression</depend>
find_package(parameter_expression REQUIRED)
target_link_libraries(
  your_node
  parameter_expression::parameter_expression
)
Create a parameter expression in your node:
class MyNode : public rclcpp::Node
{
public:
  MyNode() : Node("my_node")
  {
    // Create a parameter expression with default value 0.0
    expression_param_ = std::make_shared<parameter_expression::ParameterExpression>(*this, "my_expression", 0.0);
  }
  void some_function()
  {
    // Get the current evaluated value
    double value = expression_param_->get();
    RCLCPP_INFO(this->get_logger(), "Expression value: %f", value);
  }
private:
  parameter_expression::ParameterExpression::SharedPtr expression_param_;
};
Setting Parameters
You can set the parameter using various methods:
Via Command Line
ros2 param set /my_node my_expression "sin(3.14159/2) * 100"
Via Launch File or parameter YAML file
<launch>
  <node pkg="your_package" exec="your_node" name="my_node">
    <param name="my_expression" value="2 * _pi * 0.5" />
  </node>
</launch>
Advanced Usage
Custom Parameter Descriptor
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.description = "A mathematical expression for calculation";
descriptor.additional_constraints = "Must be a valid mathematical expression";
auto expression_param = std::make_shared<parameter_expression::ParameterExpression>(
  *this, "advanced_expression", 1.0, descriptor);
File truncated at 100 lines see the full file
Changelog for package parameter_expression
0.0.2 (2025-09-23)
- Merge pull request #1 from ForteFibre/fix/pkg-config Add pkg-config as build dependencies
 - Add pkg-config as build dependencies
 - Apply formatter
 - Change to Apache License 2.0
 - Add README
 - Move from our internal library
 - initial commit
 - Contributors: f0reachARR, ぐるぐる
 
Package Dependencies
| Deps | Name | 
|---|---|
| ament_cmake | |
| ament_cmake_auto | |
| ament_lint_auto | |
| ament_lint_common | |
| ament_cmake_clang_format | |
| ament_cmake_gtest | |
| ament_cmake_gmock | |
| rclcpp | |
| std_msgs | 
System Dependencies
| Name | 
|---|
| pkg-config | 
| muparser |