-
Notifications
You must be signed in to change notification settings - Fork 79
Provide parameter service tutorial #1242
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
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 adds a comprehensive tutorial for the ROS 2 parameter service functionality in rclnodejs, providing documentation for dynamic configuration management, parameter validation, and runtime parameter updates.
- Comprehensive tutorial covering ROS 2 parameters from basic usage to advanced features
- Complete code examples demonstrating parameter declaration, validation, and service implementation
- Best practices and CLI usage examples for parameter management
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tutorials/parameter-service.md
Outdated
|
|
||
| // Add range validation for speed | ||
| const FloatingPointRange = rclnodejs.FloatingPointRange; | ||
| descriptors[0].floatingPointRange = [new FloatingPointRange(0.0, 5.0, 0.1)]; |
Copilot
AI
Aug 28, 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 property name should be range instead of floatingPointRange based on the earlier examples in the tutorial that use descriptors[0].range. This inconsistency could confuse users.
| descriptors[0].floatingPointRange = [new FloatingPointRange(0.0, 5.0, 0.1)]; | |
| descriptors[0].range = [new FloatingPointRange(0.0, 5.0, 0.1)]; |
tutorials/parameter-service.md
Outdated
| const robotName = this.node.getParameter('enable_logging'); | ||
| console.log(`Logging enabled: ${robotName.value}`); |
Copilot
AI
Aug 28, 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 variable name robotName is misleading as it's getting the 'enable_logging' parameter, not a robot name parameter. This should be renamed to match the parameter being retrieved.
| const robotName = this.node.getParameter('enable_logging'); | |
| console.log(`Logging enabled: ${robotName.value}`); | |
| const enableLogging = this.node.getParameter('enable_logging'); | |
| console.log(`Logging enabled: ${enableLogging.value}`); |
This PR adds a comprehensive tutorial for the ROS 2 parameter service functionality in rclnodejs, providing documentation for dynamic configuration management, parameter validation, and runtime parameter updates. - Comprehensive tutorial covering ROS 2 parameters from basic usage to advanced features - Complete code examples demonstrating parameter declaration, validation, and service implementation - Best practices and CLI usage examples for parameter management Fix: #1240
This PR adds a comprehensive tutorial for the ROS 2 parameter service functionality in rclnodejs, providing documentation for dynamic configuration management, parameter validation, and runtime parameter updates.
Fix: #1240