Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Aug 26, 2025

This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users.

Key changes:

  • Adds a note about ROS 2 LTS support and development scope
  • Streamlines installation and prerequisites sections with updated ROS 2 references
  • Removes verbose example code sections in favor of directing users to example repositories
  • Updates TypeScript configuration recommendations and examples

Fix: #1232

Copilot AI review requested due to automatic review settings August 26, 2025 02:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users.

Key changes:

  • Adds a note about ROS 2 LTS support and development scope
  • Streamlines installation and prerequisites sections with updated ROS 2 references
  • Removes verbose example code sections in favor of directing users to example repositories
  • Updates TypeScript configuration recommendations and examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


`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.

\* rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backslash before the asterisk (\*) creates escaped markdown. This should be just * to render as a proper bullet point, or use - for consistency with other list items in the document.

Suggested change
\* rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch
- rclnodejs development and maintenance is limited to all active ROS 2 LTS releases and the Rolling development branch

Copilot uses AI. Check for mistakes.
import * as rclnodejs from 'rclnodejs';
rclnodejs.init().then(() => {
const node = rclnodejs.createNode('publisher_example_node');
const node = new rclnodejs.Node('publisher_example_node');
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript example uses new rclnodejs.Node() while the JavaScript example uses rclnodejs.createNode(). This inconsistency could confuse users about the correct API usage. Consider using the same pattern in both examples for clarity.

Suggested change
const node = new rclnodejs.Node('publisher_example_node');
const node = rclnodejs.createNode('publisher_example_node');

Copilot uses AI. Check for mistakes.
const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
publisher.publish(`Hello ROS 2 from rclnodejs`);
rclnodejs.spin(node);
node.spin();
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript example uses node.spin() while the JavaScript example uses rclnodejs.spin(node). This API inconsistency could confuse users. Both examples should demonstrate the same API pattern for consistency.

Suggested change
node.spin();
rclnodejs.spin(node);

Copilot uses AI. Check for mistakes.
@coveralls
Copy link

coveralls commented Aug 26, 2025

Coverage Status

coverage: 84.555%. remained the same
when pulling a6a2d48 on minggangw:fix-1232
into e014a6c on RobotWebTools:develop.

@minggangw minggangw merged commit f0408ad into RobotWebTools:develop Aug 26, 2025
19 checks passed
minggangw added a commit that referenced this pull request Sep 10, 2025
This PR updates the npmjs README to provide a cleaner, more concise documentation structure for the rclnodejs package. The update simplifies the README content while maintaining essential information for users.

Key changes:
- Adds a note about ROS 2 LTS support and development scope
- Streamlines installation and prerequisites sections with updated ROS 2 references
- Removes verbose example code sections in favor of directing users to example repositories
- Updates TypeScript configuration recommendations and examples

Fix: #1232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update README for npmjs

2 participants