Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFClient unified goal_id #560

Open
ufrhaidar opened this issue Aug 22, 2022 · 6 comments
Open

TFClient unified goal_id #560

ufrhaidar opened this issue Aug 22, 2022 · 6 comments

Comments

@ufrhaidar
Copy link

if i was to use ros3djs to visualize a URDF or a 2d map, the TFClient sends a goal to the tf2_web_republisher with a goal_id.

I would like to open the same visualization on multiple tabs or devices, and I don't want the tf2_web_republisher to send the same transforms multiple times only because the goal_id is different. Would it be possible to choose a constant goal_id to reduce the bandwidth of data being published by the tf2_web_republisher.

To get an idea of how bad the bandwidth gets, try the following visualize a URDF tutorial. Monitor the bandwidth on the feedback topic rostopic bw tf2_web_republisher/feedback while refreshing the URDF visualizer tab.

Also, could you update the documentation of the TFClient to show how to cancel a specific goal? I've been using this.TfClient.currentGoal.cancel(); to cancel a specific goal or this.TfClient.actionClient.cancel(); to cancel all goals.

@MatthijsBurgh
Copy link
Contributor

Also, could you update the documentation of the TFClient to show how to cancel a specific goal? I've been using this.TfClient.currentGoal.cancel(); to cancel a specific goal or this.TfClient.actionClient.cancel(); to cancel all goals.

Could you create a separate issue for this?

@MatthijsBurgh
Copy link
Contributor

I don't think this is possible. This would require a major refactor of the code. I don't have the resources to do that. So you would need to develop it mostly yourself. But when working correctly and not breaking current behaviour. I am happy to integrate it.

@ufrhaidar
Copy link
Author

ufrhaidar commented Aug 22, 2022

I'm still new to javascript. Have tried to change the goal_id in roslibjs/src/actionlib/Goal.js and making it static then following the build instruction. That didn't work as I might be somehow importing the wrong module. Any advise or comments are appreciated. If I get this simple change to work, I can get the TFClient to have an option of using a static goal_id.

@MatthijsBurgh
Copy link
Contributor

By changing the goal_id to be static. The actionlib becomes useless for normal action interfaces. So that is the difficulty of this. Which is why a major refactor would be required.
Also only one client should own a goal_id. So by using a static one. The whole canceling become very complex.

@ufrhaidar
Copy link
Author

ufrhaidar commented Aug 23, 2022

yes I understand that. Making it static would only be a first step for me to test that the concept works. Later a different goal object can be created and used only with TFClient or StaticTFClient.

The solution would also require a custom or modified tf2_web_republisher. I already have the republisher made, and I'll keep working on the static goal_id when I have time. I'm just having trouble importing the newly built roslibjs.

Once I get both sides (tf2_web_republisher and TFClient) to communicate, I can clean the code and make it robust.

@MatthijsBurgh
Copy link
Contributor

As long as you only changed code inside the functions, you should still be able to compile the library. Once you start adding classes. I think these should be in their own file. (Not 100% sure). And don't forget to extend the index files in that case.

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

No branches or pull requests

2 participants