Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Jul 23, 2025

This PR fixes errors in two example files related to ROSIDL parsing and action server functionality. The changes address missing module imports and improve code clarity with better numeric formatting.

  • Adds missing parser module import in the ROSIDL parse action example
  • Updates timer interval from BigInt constructor to BigInt literal notation with explanatory comment

Fix: #1207

@minggangw minggangw requested a review from Copilot July 23, 2025 06:44
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 fixes errors in two example files related to ROSIDL parsing and action server functionality. The changes address missing module imports and improve code clarity with better numeric formatting.

  • Adds missing parser module import in the ROSIDL parse action example
  • Updates timer interval from BigInt constructor to BigInt literal notation with explanatory comment

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
example/rosidl/rosidl-parse-action-example.js Adds missing import for the rosidl_parser module
example/actions/action_server/action-server-defer-example.js Updates BigInt syntax and adds clarifying comment for timer interval

this._node.getLogger().info('Deferring execution...');
this._goalHandle = goalHandle;
this._timer = this._node.createTimer(BigInt(3000000), () =>
// Set timeout period to 3s.
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

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

The comment states '3s' but the BigInt value 3000000000n represents 3 billion nanoseconds (3 seconds). Consider making this relationship clearer in the comment, e.g., '// Set timeout period to 3s (3 billion nanoseconds).'

Suggested change
// Set timeout period to 3s.
// Set timeout period to 3s (3 billion nanoseconds).

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

coveralls commented Jul 23, 2025

Coverage Status

coverage: 84.526%. remained the same
when pulling 7a563f9 on minggangw:fix-1207
into e087722 on RobotWebTools:develop.

@minggangw minggangw merged commit 605eb84 into RobotWebTools:develop Jul 23, 2025
35 of 37 checks passed
minggangw added a commit that referenced this pull request Jul 25, 2025
This PR fixes errors in two example files related to ROSIDL parsing and action server functionality. The changes address missing module imports and improve code clarity with better numeric formatting.

- Adds missing parser module import in the ROSIDL parse action example
- Updates timer interval from BigInt constructor to BigInt literal notation with explanatory comment

Fix: #1207
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.

missing require statement in example/.../rosidl-parse-action-example.js

2 participants