Function auto_apms_behavior_tree::createParameterValueFromAny

Function Documentation

BT::Expected<rclcpp::ParameterValue> auto_apms_behavior_tree::createParameterValueFromAny(const BT::Any &any, rclcpp::ParameterType type)

Convert a BT::Any object to a ROS 2 parameter value.

You may optionally specify the type of the parameter value to convert to using type. If you want to deduce the type from any, set this to rclcpp::PARAMETER_NOT_SET.

Parameters:
  • anyBT::Any object.

  • type – Desired type of the parameter value. Set to rclcpp::PARAMETER_NOT_SET if it is unkown (e.g. if the parameter hasn’t been set before).

Returns:

Expected object for rclcpp::ParameterValue. Holds an error message if any couldn’t be converted to type.