Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Aug 27, 2025

This PR completely rewrites the actionlib.md tutorial file to provide comprehensive documentation for ROS 2 actions in rclnodejs. The update transforms a deprecated, minimal tutorial into a modern, detailed guide covering all aspects of action implementation.

Key changes include:

  • Complete replacement of deprecated actionlib content with ROS 2 actions documentation
  • Addition of detailed code examples for both action servers and clients
  • Introduction of advanced features like goal cancellation and multiple goal handling

Fix: #1238

Copilot AI review requested due to automatic review settings August 27, 2025 09:38

This comment was marked as outdated.

@minggangw minggangw requested a review from Copilot August 27, 2025 09:51
@coveralls
Copy link

coveralls commented Aug 27, 2025

Coverage Status

coverage: 84.555%. remained the same
when pulling bf6c4ce on minggangw:fix-1238
into f1e8005 on RobotWebTools:develop.

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 completely rewrites the actionlib.md tutorial file to provide comprehensive documentation for ROS 2 actions in rclnodejs. The update transforms a deprecated, minimal tutorial into a modern, detailed guide covering all aspects of action implementation.

Key changes include:

  • Complete replacement of deprecated actionlib content with ROS 2 actions documentation
  • Addition of detailed code examples for both action servers and clients
  • Introduction of advanced features like goal cancellation and multiple goal handling

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

```javascript
// Example: Fibonacci.Goal
{
order: 10; // Compute Fibonacci sequence up to order 10
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

This appears to be invalid JavaScript syntax. The semicolon should be a comma in an object literal, or this should be formatted differently if it's meant to represent a different language.

Copilot uses AI. Check for mistakes.
async sendGoal() {
try {
// Wait for server with timeout (5 seconds)
this._node.getLogger().info('Waiting for action server...');
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

The timeout parameter for waitForServer should be documented. It's unclear from the code example whether 5000 represents milliseconds or seconds, and this could lead to confusion for users implementing this pattern.

Suggested change
this._node.getLogger().info('Waiting for action server...');
this._node.getLogger().info('Waiting for action server...');
// Timeout is specified in milliseconds (5000 ms = 5 seconds)

Copilot uses AI. Check for mistakes.
- `feedback` event: triggered after the action server called `publishFeedback`.
- `result` event: triggered after the action server called `setSucceeded`.
```bash
npx generate-ros-messages
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

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

The command 'npx generate-ros-messages' may not be the correct command for generating ROS message interfaces in rclnodejs. This should be verified against the actual rclnodejs documentation or replaced with the correct command.

Suggested change
npx generate-ros-messages
npx rclnodejs-msg-gen

Copilot uses AI. Check for mistakes.
@minggangw minggangw merged commit 3dea196 into RobotWebTools:develop Aug 27, 2025
15 checks passed
minggangw added a commit that referenced this pull request Sep 10, 2025
This PR completely rewrites the `actionlib.md` tutorial file to provide comprehensive documentation for ROS 2 actions in rclnodejs. The update transforms a deprecated, minimal tutorial into a modern, detailed guide covering all aspects of action implementation.

Key changes include:
- Complete replacement of deprecated actionlib content with ROS 2 actions documentation
- Addition of detailed code examples for both action servers and clients
- Introduction of advanced features like goal cancellation and multiple goal handling


Fix: #1238
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 actionlib.md file

2 participants