Fix import statement and usage for rclpy.node.Node#196
Conversation
dhood
left a comment
There was a problem hiding this comment.
The name of the PR suggests to me that we are changing the demos to inherit from node in this PR; for clarity when searching PRs in the future could you simplify it?
Sure, do you have a suggestion? |
"Fix import statement and usage for rclpy.node.Node"? This is really unfortunate because it adds another line to all of the examples unnecessarily (imo). It is also asymmetric with what we want to do with the C++ API, i.e. we want |
Sounds good to me
Yeah I agree, I'm proposing this fix mostly to get the demos back to a working state but don't think users should have to import this explicitly in the long-term. |
|
+1 for getting things working again, but we should try to address this before the release I think. |
node is not imported in
__init__.pyanymore (ros2/rclpy#147)Without this change the demos raise:
AttributeError: module 'rclpy' has not attribute 'Node'Not sure if ros2/rclpy#147 is a long term fix as this mean that anyone inheriting from Node will need to import it explicitly.