Conversation
Signed-off-by: Paul Gesel <paul.gesel@picknik.ai>
Signed-off-by: Paul Gesel <paul.gesel@picknik.ai>
EzraBrooks
left a comment
There was a problem hiding this comment.
Thanks for working on this! Can you explain the API difference between your ROS 2 version of tf2_web_republisher and the ROS 1 version? If we can figure out a way to unify them (instead of renaming this ROS2TFClient or similar) that would be ideal!
src/tf/TF2Client.js
Outdated
| /** | ||
| * A TF Client that listens to TFs from tf2_web_republisher. | ||
| */ | ||
| export default class TF2Client extends EventEmitter { |
There was a problem hiding this comment.
I think this needs to be called something like ROS2TFClient, since "TF2" works on both ROS1 and ROS2.
src/tf/TF2Client.js
Outdated
| } | ||
| this.currentGoal = goalMessage; | ||
|
|
||
| // this.currentGoal.on('feedback', this.processTFArray.bind(this)); |
src/tf/TF2Client.js
Outdated
| // this.currentGoal.on('feedback', this.processTFArray.bind(this)); | ||
| const id = this.actionClient.sendGoal(goalMessage, | ||
| (result) => { | ||
| console.log('Result for action goal on :'); |
There was a problem hiding this comment.
let's not pollute the logs with debug info
src/tf/TF2Client.js
Outdated
| this.updateDelay = options.updateDelay || 50; | ||
| var seconds = options.topicTimeout || 2.0; | ||
| var secs = Math.floor(seconds); | ||
| var nsecs = Math.floor((seconds - secs) * 1E9); |
There was a problem hiding this comment.
nitpicky but change these var to const
Co-authored-by: Ezra Brooks <ezra@brooks.cx>
EzraBrooks
left a comment
There was a problem hiding this comment.
LGTM as a first cut. Naming it ROS2TFClient makes extra certain that we won't accidentally step on ROS 1 users' toes. Later on it may make sense to combine the two classes and use a flag, or something like that.
|
For posterity, the "ROS 2 version of tf2_web_republisher" we are currently working against is @pac48's fork of it at https://github.com/pac48/tf2_web_republisher. We're still deciding where this implementation should live long-term; it may become a ros2 branch of the RobotWebTools project that is largely currently defunct. |
|
Thanks for your work on this TF2 client for ROS2! I'm trying to make this approach work on a react application, but I'm struggling. I stumbled upon this thread and this one, changed the Roslibjs version on package.json to I can't unsubscribe or dispose the ROS2TFClient when the parent React component unmounts (or in any moment whatsoever). Worst, the moment I subscribe to a new frame using the client, I can no longer unsubscribe from any topic (even in normal subscribers) and eventually |
|
Hi, that's interesting - I'm not experiencing the same symptom. Could you start a Discussion on this topic? I can provide some insight there as to integrating this with React (as my team is also using it with React), but would rather have that conversation in a Discussion than a PR thread so we can "mark as answer" when we find the solution :) |
|
I just realized Discussions weren't enabled here - I've enabled them! |
|
Thanks! Are you talking about discourse.ros.org? When I try to create a Discussion it redirects there. Edit: nevermind, thay have appeared now! |
|
I've created the Discussion topic on #742 |
This PR adds a
ROS2TFClientclass to interact with the ROS 2 tf2_web_republisher.