Skip to content

Commit 10b2a8e

Browse files
committed
Merge pull request RobotWebTools#197 from BennyRe/develop
Added serverName option to TFClient
2 parents 1ca42c2 + b3ea206 commit 10b2a8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tf/TFClient.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var Transform = require('../math/Transform');
2424
* * updateDelay - the time (in ms) to wait after a new subscription
2525
* to update the TF republisher's list of TFs
2626
* * topicTimeout - the timeout parameter for the TF republisher
27+
* * serverName (optional) - the name of the tf2_web_republisher server
2728
*/
2829
function TFClient(options) {
2930
options = options || {};
@@ -40,6 +41,7 @@ function TFClient(options) {
4041
secs: secs,
4142
nsecs: nsecs
4243
};
44+
this.serverName = options.serverName || '/tf2_web_republisher';
4345

4446
this.currentGoal = false;
4547
this.currentTopic = false;
@@ -48,7 +50,7 @@ function TFClient(options) {
4850

4951
// Create an Action client
5052
this.actionClient = this.ros.ActionClient({
51-
serverName : '/tf2_web_republisher',
53+
serverName : this.serverName,
5254
actionName : 'tf2_web_republisher/TFSubscriptionAction'
5355
});
5456

0 commit comments

Comments
 (0)