ROS 2 examples from the ros2jsguy articles.
- Example-1: node-publisher
- Example-2: node-subscriber
- Example-3: laserscan-publisher
- Example-4: Conway's Game of Life
The project is implemented using TypeScript, Node.js and the rclnodejs ROS 2 client library.
- git
- Node.js ver. 12 and either npm or yarn package manager
- ROS 2 Foxy distribution
From a command shell run the commands shown in the following steps.
git clone https://github.com/ros2jsguy/ros2_js_examples.git
You should see the project code downloaded to a new directory named `ros2_js_example.
cd ros2_js_examples
npm install
This may take 1-2 minutes to complete as the rclnodejs package must be compiled as part of the installation process.
npm run build
Each src/example* folder includes a README that describes the example and provides details for building and running the example.