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
319 stars 70 forks source link

multiple context support #668 #669

Closed wayneparrott closed 4 years ago

wayneparrott commented 4 years ago

Adds the ability to support multiple simultaneous rcl contexts, #668.

index.js

node.js

rate.js

test-init-shutdown.js

test-rate.js

node.d.ts

main.ts

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.8%) to 84.399% when pulling 191aaa356a36628585bf6edc1d4dff7e56c4924c on wayneparrott:multiple_context_support_668 into 3a73bad3c4c335499822ebb9f192e5835a8f8bbd on RobotWebTools:develop.

wayneparrott commented 4 years ago

Note how the appveyor ci build failed during the generate_messages.js script https://ci.appveyor.com/project/minggangw/rclnodejs/builds/33854406

I've seen similar error a few times (seg fault) when installing rclnodejs to a project with foxy debian package installation. I've not had time to investigate the cause yet.

minggangw commented 4 years ago

Paste the error below:

Start JavaScript message generation...
Generation complete.
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! rclnodejs@0.14.1 postinstall: `node scripts/generate_messages.js`
npm ERR! Exit status 3221225477
npm ERR! 
npm ERR! Failed at the rclnodejs@0.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\appveyor\AppData\Roaming\npm-cache\_logs\2020-07-01T19_05_42_428Z-debug.log
Command exited with code -1073741819

I've seen this before too, but it seems that the log doesn't give much meaningful information about the cause. I only found this error on Windows (appveyor), not ubuntu (build ROS2 from scratch).

P.S. node scripts/generate_messages.js generates JS messages from .dot template based on the IDL parser.