RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
316 stars 70 forks source link

Support creation of Node subclasses #754

Closed wayneparrott closed 3 years ago

wayneparrott commented 3 years ago

Added ability to create Node subclasses. This PR maintains the public 0.17 api.

753

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.5%) to 91.747% when pulling f8adddc3dd06914c5ce22e07dfa702e1bbbc0f2a on wayneparrott:node_hierarchy into a8c7f756eb4260426ac3e0038c614e93a1955ce2 on RobotWebTools:develop.

wayneparrott commented 3 years ago

@minggangw Thx for the feedback. I wanted to get early positive feedback on the general idea of this PR before doing the extra work of expanding our test suite to exercise the full api changes. A big TODO is for the PR to include updates the test suite to cover the Node and Context api changes before we consider the PR ready. (Perhaps I should have created this PR in draft status.)

Also I want to focus some attention and get feedback on the tagging of some rcl functions @deprecated such as createNode(), createLifecycleNode(), spin(), that are now public methods on Node. I'm not opposed to removing the @deprecated tag if we feel OK with supporting the current functional api approach and this newer object-oriented api approach going forward. Thoughts?

minggangw commented 3 years ago

It seems that the Last successful build (#2125) has some problem and the ci fails constantly, I am going to re-trigger it once a new packaging is generated.

minggangw commented 3 years ago

Would you please take a look at the error reported by lint

/root/rclnodejs/types/node.d.ts
  121:1  error  Replace `⏎` with `··`  prettier/prettier
  123:1  error  Insert `··`            prettier/prettier
  124:4  error  Insert `··`            prettier/prettier
  125:1  error  Insert `··`            prettier/prettier
  126:4  error  Insert `··`            prettier/prettier
  127:1  error  Insert `··`            prettier/prettier
  128:4  error  Insert `··`            prettier/prettier
  129:1  error  Insert `··`            prettier/prettier
minggangw commented 3 years ago

Merged, thanks for your effort!