I have a "Node" class, used for pathfinding. However, when I try to use it anywhere in my rclcpp project, I get errors like "error: cannot convert ‘rclcpp::Node*’ to ‘Node*’". I would expect this if I had specified "using namespace rclcpp" somewhere, but I didn't do that. Why would rclcpp::Node be conflicting with my global namespace Node class? What would be the best way to resolve this? I would like to avoid renaming my "Node" class, as it shouldn't be necessary if rclcpp is behaving properly.
Thanks!
rclcpp::Node
, but delegates construction toNode
. This works and also surprised me. I don't think this is really desirable because there are plenty of use cases to call something Node and provocate a conflict. But I also don't think there is a direct answer to the question. He can't do much about it except namespace himself. $\endgroup$class Node : public rclcpp::Node{ ... }
, which obviously seems bound for trouble. Then again, I re-read the question, and it could as well be that it's about aNode
class and arclcpp::Node
class that are completely unrelated. Anyway, I have no intention to spend any more time on this question as long as I have to guess about the exact issue the OP wants to address. $\endgroup$Node
class that I use in the same scope as therclcpp::Node
, which is rather annoying. Anyhow, you are right, for the sake of focus of this question OP should clarify. $\endgroup$