-
Notifications
You must be signed in to change notification settings - Fork 79
Add missing methods for graph #1110
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
Add missing methods for graph #1110
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 new graph-related methods to expose publisher and subscription information by topic.
- Introduces native bindings and corresponding JavaScript wrappers for retrieving publishers and subscriptions info.
- Adds test coverage in both TypeScript and JavaScript test files to verify the new functionality.
- Updates build configuration and dependency lists to support the added functionality.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/types/index.test-d.ts | Added type assertions for the new graph methods. |
| test/test-graph.js | New tests verifying retrieval of publishers and subscriptions info. |
| src/rcl_utilities.h / .cpp | Added conversion functions for topic endpoint information. |
| src/rcl_node_bindings.cpp | Introduced new GetNodeNames method. |
| src/rcl_graph_bindings.cpp | Added refactored helper and new endpoints for publishers and subscriptions. |
| src/rcl_client_bindings.cpp | Added ServiceServerIsAvailable method for client bindings. |
| scripts/config.js | Updated dependencies to include rcpputils. |
| lib/node.js | Added JS wrapper methods for accessing new graph functions. |
| binding.gyp | Included linking flag for rcpputils. |
| it('Get publishers info by topic', function () { | ||
| const node = rclnodejs.createNode('publisher_node'); | ||
| const String = 'std_msgs/msg/String'; | ||
| node.createPublisher(String, 'topic'); |
Copilot
AI
Apr 30, 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 test for publishers info uses '/topic' while the created publisher uses 'topic'. Consider ensuring consistency in topic naming between creation and retrieval to avoid potential mismatches.
| node.createPublisher(String, 'topic'); | |
| node.createPublisher(String, '/topic'); |
This PR adds new graph-related methods to expose publisher and subscription information by topic. - Introduces native bindings and corresponding JavaScript wrappers for retrieving publishers and subscriptions info. - Adds test coverage in both TypeScript and JavaScript test files to verify the new functionality. - Updates build configuration and dependency lists to support the added functionality. Fix: #1111
This PR adds new graph-related methods to expose publisher and subscription information by topic.
Fix: #1111