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

Added plugin mechanism to send any data to the server #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexanderHefner
Copy link

With this change it's possible to write viewer which will send data into the ros system. E.g. the #100 joystick controller pull request could be rewritten to use this instead of adding a special WebSocket message type.

I've already created a plugin with a special viewer and it's working like a charm. Already creating more of them.

Btw. Everyone loves rosboard at first glance 😄

@NINGCONG2021
Copy link

Hey, bro, I want to implement something similar to the functionality in RViz for publishing navigation points. How should I do that

@AlexanderHefner
Copy link
Author

Hey, bro, I want to implement something similar to the functionality in RViz for publishing navigation points. How should I do that

Hey,
just use the builtin functions of Rviz:

  • 2D Pose Estimate
  • 2D Goal Pose
  • Publish Point

The information on this is published on specific topics. Just google for.

Bets regards,
Alex

@jimrong79
Copy link

Hi Alex, love this work. Is it possible to share your example with a plugin?

Also I have to update the handlers.py #12 to the following to get it run. otherwise getting a ModuleNotFoundError
from rosboard.plugins import get_plugin_js_files, received_plugin_message

Thanks

@AlexanderHefner
Copy link
Author

Hi Alex, love this work. Is it possible to share your example with a plugin?

Also I have to update the handlers.py #12 to the following to get it run. otherwise getting a ModuleNotFoundError from rosboard.plugins import get_plugin_js_files, received_plugin_message

Thanks

Hi,
I'm happy to hear that you like my idea! 😄
Unfortunately I cannot share a real world example, but I added an example in plugin.md. Also you could rewrite the nipple.js commit #100 to use the plugin mechanism.

Fell free to ask if you need help writing your plugin I can support if needed.

@dheera
Copy link
Owner

dheera commented Jun 20, 2024

Thank you for this! I'm trying to catch up to things after months of dealing with other personal issues.

I wanted to implement a publisher and service call alongside the subscribe mechanism. I'm trying to figure out whether this plugin mechanism is generalizable enough to be useful outside of that. Do you have any examples of plugins you wrote?

@AlexanderHefner
Copy link
Author

Thank you for this! I'm trying to catch up to things after months of dealing with other personal issues.

I wanted to implement a publisher and service call alongside the subscribe mechanism. I'm trying to figure out whether this plugin mechanism is generalizable enough to be useful outside of that. Do you have any examples of plugins you wrote?

Happy to hear from you. No pressure regarding this, my personal life is quite busy as well 😅

Unfortunately I'm not allowed to share a working plugin, but I used it like this:

  1. Write a custom viewer for a topic
  2. The viewer has a button to send something into the ros system
  3. This button sends a signal to the python plugin
  4. In the python plugin the data is taken and published

What I wanted to add, but never had time for, was the way back. But this can be done with subscribing a topic in rosboard and writing a custom viewer for it.

Hope this helps :)

@carmelodfr
Copy link

Hi @AlexanderHefner ! I really would love to try your plugin mechanism. However I'm missing the steps to create a plugin.
From your files I see that we need a dummy.js file to be inside rosboard/html/js/plugins . But I don't understand where the .py should go. Can you provide just a dummy button example for us ? I'm not asking you to share your working plugin, but to only some dummy example. I'm missing the file structure for new plugins (py and .js, for example) and a few other things.

Thank you very much in advance

Carmelo

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

Successfully merging this pull request may close these issues.

5 participants