File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,27 @@ import BaseTFClient from "./BaseTFClient.ts";
1414
1515/**
1616 * A TF Client that listens to TFs from tf2_web_republisher.
17+ *
18+ * @example Canceling Goals
19+ * ```javascript
20+ * const tfClient = new TFClient({
21+ * ros: ros,
22+ * fixedFrame: 'world'
23+ * });
24+ *
25+ * // Subscribe to a frame
26+ * tfClient.subscribe('turtle1', function(tf) {
27+ * console.log('Transform received:', tf);
28+ * });
29+ *
30+ * // Cancel the current goal only
31+ * if (tfClient.currentGoal) {
32+ * tfClient.currentGoal.cancel();
33+ * }
34+ *
35+ * // Cancel all goals associated with this TF client
36+ * tfClient.actionClient.cancel();
37+ * ```
1738 */
1839export default class TFClient extends BaseTFClient {
1940 currentGoal :
You can’t perform that action at this time.
0 commit comments