-
Notifications
You must be signed in to change notification settings - Fork 79
Update actionlib.md file #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update actionlib.md file #1239
Conversation
There was a problem hiding this 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.
tutorials/actionlib.md
Outdated
| ```javascript | ||
| // Example: Fibonacci.Goal | ||
| { | ||
| order: 10; // Compute Fibonacci sequence up to order 10 |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
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.
| async sendGoal() { | ||
| try { | ||
| // Wait for server with timeout (5 seconds) | ||
| this._node.getLogger().info('Waiting for action server...'); |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
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.
| 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) |
| - `feedback` event: triggered after the action server called `publishFeedback`. | ||
| - `result` event: triggered after the action server called `setSucceeded`. | ||
| ```bash | ||
| npx generate-ros-messages |
Copilot
AI
Aug 27, 2025
There was a problem hiding this comment.
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.
| npx generate-ros-messages | |
| npx rclnodejs-msg-gen |
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
This PR completely rewrites the
actionlib.mdtutorial 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:
Fix: #1238