Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Dec 1, 2025

This PR adds support for liveliness assertions in publishers by introducing the assertLiveliness() method and extending the QoS configuration with liveliness policy options.

  • Adds LivelinessPolicy enum with five policy options (SYSTEM_DEFAULT, AUTOMATIC, MANUAL_BY_TOPIC, UNKNOWN, BEST_AVAILABLE)
  • Adds assertLiveliness() method to Publisher class for manual liveliness assertions
  • Extends QoS class to support liveliness configuration as a constructor parameter and property

Fix: #1330

Copilot AI review requested due to automatic review settings December 1, 2025 05:25
Copilot finished reviewing on behalf of minggangw December 1, 2025 05:27
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 adds support for liveliness assertions in publishers by introducing the assertLiveliness() method and extending the QoS configuration with liveliness policy options.

  • Adds LivelinessPolicy enum with five policy options (SYSTEM_DEFAULT, AUTOMATIC, MANUAL_BY_TOPIC, UNKNOWN, BEST_AVAILABLE)
  • Adds assertLiveliness() method to Publisher class for manual liveliness assertions
  • Extends QoS class to support liveliness configuration as a constructor parameter and property

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
types/qos.d.ts Adds TypeScript definitions for LivelinessPolicy enum and liveliness parameter in QoS constructor
types/publisher.d.ts Adds TypeScript declaration for assertLiveliness() method
test/types/index.test-d.ts Adds type test to verify assertLiveliness() returns void
lib/qos.js Implements LivelinessPolicy enum, adds liveliness parameter to QoS constructor, and adds getter/setter for liveliness property
lib/publisher.js Implements assertLiveliness() method that calls native binding
src/rcl_utilities.cpp Extracts liveliness value from QoS object and casts to rmw_qos_liveliness_policy_t
src/rcl_publisher_bindings.cpp Implements native AssertLiveliness binding that calls rcl_publisher_assert_liveliness
test/test-publisher.js Adds test case for assertLiveliness() with MANUAL_BY_TOPIC liveliness policy
Comments suppressed due to low confidence (1)

lib/qos.js:88

  • The constructor documentation is missing the @param entry for the newly added liveliness parameter. It should be added between the durability and avoidRosNameSpaceConventions parameters to match the parameter order in the constructor signature.
  /**
   * Create a QoS.
   * @param {HistoryPolicy} [history=RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT] - The history value.
   * @param {number} [depth=0] - The depth value.
   * @param {ReliabilityPolicy} [reliability=RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT] - The reliability value.
   * @param {DurabilityPolicy} [durability=RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT] - The durability value.
   * @param {boolean} [avoidRosNameSpaceConventions=false] - The avoidRosNameSpaceConventions value.
   */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link

Coverage Status

coverage: 82.793% (-0.05%) from 82.843%
when pulling ef7cfeb on minggangw:fix-1330
into cd267c5 on RobotWebTools:develop.

@minggangw minggangw merged commit 5e43c92 into RobotWebTools:develop Dec 1, 2025
32 of 33 checks passed
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 rcl functions in rclnodejs

2 participants