diff --git a/rclcpp/include/rclcpp/parameter.hpp b/rclcpp/include/rclcpp/parameter.hpp index afb7ce1..3da59bb 100644 --- a/rclcpp/include/rclcpp/parameter.hpp +++ b/rclcpp/include/rclcpp/parameter.hpp @@ -160,6 +160,16 @@ public: return value_.bytes_value; } + int64_t as_int() const {return get_value(); } + + double as_double() const {return get_value(); } + + const std::string & as_string() const {return get_value(); } + + bool as_bool() const {return get_value(); } + + std::vector as_bytes() const {return get_value(); } + private: std::string name_; rcl_interfaces::ParameterValue value_;