Skip to content

Commit 084bd4f

Browse files
committed
Address comments
1 parent 863461c commit 084bd4f

2 files changed

Lines changed: 2 additions & 47 deletions

File tree

lib/action/client.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,6 @@ class ActionClient extends Entity {
118118
this.qos.statusSubQosProfile
119119
);
120120

121-
// Probe that the RMW actually supports content filtering before enabling
122-
// the optimization. Content filter support is an RMW-level capability,
123-
// so testing any subscription is sufficient. If unsupported, silently
124-
// disable the optimization to avoid a fatal crash in the DDS layer.
125-
if (this._enableFeedbackMsgOptimization) {
126-
try {
127-
const probeSub = node.createSubscription(
128-
this._typeClass.impl.FeedbackMessage,
129-
actionName + '/_action/feedback',
130-
() => {}
131-
);
132-
const supported =
133-
typeof probeSub.isContentFilterSupported === 'function' &&
134-
probeSub.isContentFilterSupported();
135-
probeSub.destroy();
136-
if (!supported) {
137-
this._enableFeedbackMsgOptimization = false;
138-
}
139-
} catch {
140-
this._enableFeedbackMsgOptimization = false;
141-
}
142-
}
143-
144121
node._addActionClient(this);
145122
}
146123

test/test-action-client.js

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -317,28 +317,6 @@ describe('rclnodejs action client', function () {
317317
typeof nativeLoader.actionConfigureFeedbackSubFilterAddGoalId ===
318318
'function';
319319

320-
// Probe whether the RMW actually supports content filtering, matching
321-
// the same check the ActionClient constructor performs.
322-
let isContentFilterSupported = false;
323-
before(function () {
324-
if (isFeedbackFilterSupported()) {
325-
try {
326-
const Fibonacci_ = rclnodejs.require(fibonacci);
327-
const probeSub = node.createSubscription(
328-
Fibonacci_.FeedbackMessage,
329-
'fibonacci/_action/feedback',
330-
() => {}
331-
);
332-
isContentFilterSupported =
333-
typeof probeSub.isContentFilterSupported === 'function' &&
334-
probeSub.isContentFilterSupported();
335-
probeSub.destroy();
336-
} catch {
337-
isContentFilterSupported = false;
338-
}
339-
}
340-
});
341-
342320
it('Test option defaults to false', function () {
343321
let client = new rclnodejs.ActionClient(node, fibonacci, 'fibonacci');
344322
assert.strictEqual(client._enableFeedbackMsgOptimization, false);
@@ -349,8 +327,8 @@ describe('rclnodejs action client', function () {
349327
let client = new rclnodejs.ActionClient(node, fibonacci, 'fibonacci', {
350328
enableFeedbackMsgOptimization: true,
351329
});
352-
// Only enabled when native API exists AND the RMW supports content filtering
353-
if (isFeedbackFilterSupported() && isContentFilterSupported) {
330+
// Only enabled when native API exists
331+
if (isFeedbackFilterSupported()) {
354332
assert.strictEqual(client._enableFeedbackMsgOptimization, true);
355333
} else {
356334
assert.strictEqual(client._enableFeedbackMsgOptimization, false);

0 commit comments

Comments
 (0)