ROBOTIS-GIT / turtlebot3_simulations

Simulations for TurtleBot3
http://turtlebot3.robotis.com/
Apache License 2.0
309 stars 427 forks source link

Build warnings for turtlebot3_fake_node [ROS2 master / galactic] #160

Closed SteveMacenski closed 3 years ago

SteveMacenski commented 3 years ago
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp: In member function ‘void Turtlebot3Fake::init_parameters()’:
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:75:47: warning: ‘const rclcpp::ParameterValue& rclcpp::Node::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]
   75 |   this->declare_parameter("joint_states_frame");
      |                                               ^
In file included from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors.hpp:22,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/rclcpp.hpp:146,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17:
/home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/node.hpp:359:3: note: declared here
  359 |   declare_parameter(const std::string & name);
      |   ^~~~~~~~~~~~~~~~~
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:76:39: warning: ‘const rclcpp::ParameterValue& rclcpp::Node::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]
   76 |   this->declare_parameter("odom_frame");
      |                                       ^
In file included from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors.hpp:22,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/rclcpp.hpp:146,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17:
/home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/node.hpp:359:3: note: declared here
  359 |   declare_parameter(const std::string & name);
      |   ^~~~~~~~~~~~~~~~~
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:77:39: warning: ‘const rclcpp::ParameterValue& rclcpp::Node::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]
   77 |   this->declare_parameter("base_frame");
      |                                       ^
In file included from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors.hpp:22,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/rclcpp.hpp:146,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17:
/home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/node.hpp:359:3: note: declared here
  359 |   declare_parameter(const std::string & name);
      |   ^~~~~~~~~~~~~~~~~
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:78:46: warning: ‘const rclcpp::ParameterValue& rclcpp::Node::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]
   78 |   this->declare_parameter("wheels.separation");
      |                                              ^
In file included from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors.hpp:22,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/rclcpp.hpp:146,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17:
/home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/node.hpp:359:3: note: declared here
  359 |   declare_parameter(const std::string & name);
      |   ^~~~~~~~~~~~~~~~~
/home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:79:42: warning: ‘const rclcpp::ParameterValue& rclcpp::Node::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]
   79 |   this->declare_parameter("wheels.radius");
      |                                          ^
In file included from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/executors.hpp:22,
                 from /home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/rclcpp.hpp:146,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21,
                 from /home/steve/nav2_rosdevday_2021/demo_ws/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17:
/home/steve/Documents/ros2_ws/install/rclcpp/include/rclcpp/node.hpp:359:3: note: declared here
  359 |   declare_parameter(const std::string & name);
      |   ^~~~~~~~~~~~~~~~~
---
ROBOTIS-Will commented 3 years ago

Hi @SteveMacenski The use of static parameter declaration is applied in the galactic-devel branch which will be released next week. You may also use ros2 branch as this branch will be used for rolling

SteveMacenski commented 3 years ago

Thanks!