Scope Resolution problem in the ROS2 migration guide
While trying to migrate from ROS1 to ROS2 using the migration guide there is a problem of scope declaration.
while compilation many of the classes of the rclcpp
are said as not declared.
e.g. auto node = rclcpp::node::Node::make_shared("talker");
, here rclcpp::node has not been declared.
Similarly in rclcpp::rate::Rate loop_rate(10);
, here rclcpp::rate has not been declared.
I already have the #include "rclcpp/rclcpp.hpp"
What else am i missing ?
It's possible that line in the guide is out of date. Does
rclcpp::Node::make_shared("talker")
work?Yes, I also thought the same and changed it to
rclcpp::Node::make_shared("talker")
. This works. As i also saw in therclcpp::Node
class and there is no mention ofnode
. I am just creating a node by usingauto node
. Also does that mean I should changerclcpp::rate::Rate
to rclcpp::Rate
?