Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Generic publisher sample #6

Open
rlamarche opened this issue Sep 9, 2020 · 4 comments
Open

Generic publisher sample #6

rlamarche opened this issue Sep 9, 2020 · 4 comments

Comments

@rlamarche
Copy link

Hi,

Would it be possible to have a sample of a generic publisher ?
For example instantiate a message from json and publish it in a specific topic.
I've seen that the ShapeShifter class allows to create generic publisher so I think this would be possible ?

Thank you.

@facontidavide
Copy link
Owner

JSON to ROS is quite straightforward, whilst ROS to JSON is possible but requires definitively more work.

So the answer is yes, but I don't have time to work on this right now.

@rlamarche
Copy link
Author

Thanks for the answer and the amazing work. I will try to do something and if I come to a solution I will publish the sample here.
Regards,

@reinzor
Copy link

reinzor commented May 3, 2021

@rlamarche , did you have a chance to work on this?

@facontidavide , I think you meant ROS to JSON is straight forward since you already implemented this ;)

@rlamarche
Copy link
Author

Hi @reinzor , I'm finally not using json to transport my messages, I use directly the binary format.

My client, which is in javascript, uses rosbagjs to parse the message definitions (.msg files), then generate a binary message from a js object, and send it through a websocket or webrtc using the binary format.

Then, with shapeshifter in c++, I can reinject it in a ROS Publisher.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants