Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl rclcpp_benchmark geometry_msgs

Repository Summary

Description Node.js version of ROS 2.0 client
Checkout URI https://github.com/robotwebtools/rclnodejs.git
VCS Type git
VCS Version develop
Last Updated 2025-07-31
Dev Status UNKNOWN
Released UNRELEASED
Tags nodejs javascript client typescript robotics ros ros2 rcl
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
rclcpp_benchmark 0.0.1
geometry_msgs 0.1.0

README

rclnodejs - The ROS 2 Client Library for JavaScript

npmCoverage StatusnpmGitHub licensenodenpm type definitionscode style: prettier

ROS Distro* Status
Rolling
Kilted
Jazzy
Humble
Linux
Linux
Windows

* rclnodejs development and maintenance is limited to the ROS 2 LTS releases and the Rolling development branch

rclnodejs is a Node.js client library for the Robot Operating System (ROS 2). It provides tooling and comprehensive JavaScript and TypeScript APIs for developing ROS 2 solutions capable of interoperating with ROS 2 nodes implemented in other languages such as C++ and Python.

Here’s an example for creating a ROS 2 node that publishes a string message in a few lines of JavaScript.

const rclnodejs = require('rclnodejs');
rclnodejs.init().then(() => {
  const node = new rclnodejs.Node('publisher_example_node');
  const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
  publisher.publish(`Hello ROS 2 from rclnodejs`);
  node.spin();
});

Documentation

Installation

Prerequisites

Before installing rclnodejs please ensure the following software is installed and configured on your system:

Installing rclnodejs

Install the rclnodejs version that is compatible with your version of ROS 2 (see table below).

For the most current version of rclnodejs run:

npm i rclnodejs

To install a specific version of rclnodejs use:

npm i rclnodejs@x.y.z

  • Note: to install rclnodejs from GitHub: add "rclnodejs":"RobotWebTools/rclnodejs#<branch>" to your package.json dependency section.

rclnodejs-cli

rclnodejs-cli is a companion project we recently launched to provide a commandline interface to a set of developer tools for working with this rclnodejs. You may find rclnodejs-cli particularly useful if you plan to create ROS 2 node(s) and launch files for working with multiple node orchestrations.

           _                 _       _
  _ __ ___| |_ __   ___   __| | ___ (_)___
 | '__/ __| | '_ \ / _ \ / _` |/ _ \| / __|
 | | | (__| | | | | (_) | (_| |  __/| \__ \
 |_|  \___|_|_| |_|\___/ \__,_|\___|/ |___/
                                  |__/
Usage: rclnodejs [command] [options]

Options:
  -h, --help                               display help for command

Commands:
  create-package [options] <package-name>  Create a ROS2 package for Nodejs development.
  generate-ros-messages                    Generate JavaScript code from ROS2 IDL interfaces
  help [command]                           display help for command

API Documentation

API documentation is generated by jsdoc and can be viewed in the docs/ folder or online doc. To create a local copy of the documentation run npm run docs.

Using rclnodejs with TypeScript

File truncated at 100 lines see the full file

Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl
Repo symbol

rclnodejs repository

nodejs javascript client typescript robotics ros ros2 rcl