You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix leak in CreateNode/ShadowNode
For some reason, assigning the object wrapping `RclHandle` to a new persistent handle causes the weak callback to not get called, and the wrapped `RclHandle` is lost. My theory is that now that it has a strong persistent handle keeping it alive, v8 decides that the weak persistent handle is not needed anymore and disposes it. The fix is to simply remove the `handle` accessors, since the `RclHandle`'s life is now handled by v8, it should be automatically cleaned up when there is no more reference to the `ShadowNode`.
* add cpp test artifacts to .gitignore
* fix possible buffer overflows and use after stack scope
* add helper scripts and instructions to run tests with asan
* fix cpplint errors
* make node.handle readonly; remove corrupted handle destruction test
Fix#674
`rclnodejs` is a Node.js client for the Robot Operating System (ROS 2). It provides a simple and easy JavaScript API for ROS 2 programming. TypeScript declarations are included to support use of rclnodejs in TypeScript projects.
8
+
`rclnodejs` is a Node.js client for the Robot Operating System (ROS 2). It provides a simple and easy JavaScript API for ROS 2 programming. TypeScript declarations are included to support use of rclnodejs in TypeScript projects.
9
9
10
-
Here's an example for how to create a ROS 2 node that publishes a string message in a few lines of JavaScript.
10
+
Here's an example for how to create a ROS 2 node that publishes a string message in a few lines of JavaScript.
*[Node.js](https://nodejs.org/en/) version between 8.12 - 12.x.
24
+
**Node.js**
26
25
27
-
**ROS 2 SDK**
28
-
* See the ROS 2 SDK [Installation Guide](https://index.ros.org/doc/ros2/Installation/) for details.
29
-
**** DON'T FORGET TO [SOURCE THE ROS 2 STARTUP FILES](https://index.ros.org/doc/ros2/Tutorials/Configuring-ROS2-Environment/#source-the-setup-files)***
26
+
-[Node.js](https://nodejs.org/en/) version between 8.12 - 12.x.
27
+
28
+
**ROS 2 SDK**
29
+
30
+
- See the ROS 2 SDK [Installation Guide](https://index.ros.org/doc/ros2/Installation/) for details.
31
+
-**_ DON'T FORGET TO [SOURCE THE ROS 2 STARTUP FILES](https://index.ros.org/doc/ros2/Tutorials/Configuring-ROS2-Environment/#source-the-setup-files)_**
30
32
31
33
## Install rclnodejs
32
34
33
-
Install the rclnodejs version that is compatible with your version of ROS 2 (see table below).
34
-
35
+
Install the rclnodejs version that is compatible with your version of ROS 2 (see table below).
36
+
35
37
Run the following command for the most current version of rclnodejs
ASAN needs to be loaded at the start of the process, since rclnodejs is a dynamically loaded library, it will not do so by default. To workaround this, run node with `LD_PRELOAD` to force ASAN to be loaded.
Due to v8's garbage collector, there may be false positives in the leak test, to remove them as much as possible, there is a simple helper script to run gc on exit. To use it, the `--expose-gc` flag needs to be set in node, then run mocha with `-r test/gc-on-exit.js` e.g.
0 commit comments