ros2-realtime-demo / pendulum

ROS, ROS2, real-time, control, pendulum
Apache License 2.0
131 stars 38 forks source link

Fix parameter declaration rolling branch #77

Closed LanderU closed 3 years ago

LanderU commented 3 years ago
/root/ros2_ws/src/pendulum/pendulum_driver/src/pendulum_driver_node.cpp:35:57: warning: ‘const rclcpp::ParameterValue& rclcpp_lifecycle::LifecycleNode::declare_parameter(const string&)’ is deprecated: declare_parameter() with only a name is deprecated and will be deleted in the future.\nIf you want to declare a parameter that won't change type without a default value use:\n`node->declare_parameter<ParameterT>(name)`, where e.g. ParameterT=int64_t.\n\nIf you want to declare a parameter that can dynamically change type use:\n```\nrcl_interfaces::msg::ParameterDescriptor descriptor;\ndescriptor.dynamic_typing = true;\nnode->declare_parameter(name, rclcpp::ParameterValue{}, descriptor);\n``` [-Wdeprecated-declarations]
   35 |   state_topic_name_(declare_parameter("state_topic_name").get<std::string>()),

@carlossvg, we're having these type of warnings on rolling CI.

carlossvg commented 3 years ago

Fixed in https://github.com/ros2-realtime-demo/pendulum/pull/79