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

Using rosbridge protocol to publish ROS topics #48

Open
tckarenchiang opened this issue Sep 27, 2021 · 5 comments
Open

Using rosbridge protocol to publish ROS topics #48

tckarenchiang opened this issue Sep 27, 2021 · 5 comments

Comments

@tckarenchiang
Copy link
Contributor

Instead of using convert_json_to_ros_message to convert JSON to ROS messages in our custom python script, we could use rosbridge protocol to write rosbridge JSON packets to the pipe in Lua side and create a Python script that reads bytes from the pipe and write to the TCP socket (connected to a rosbridge) without interpreting them at all.

@tckarenchiang
Copy link
Contributor Author

rosbridge v2.0 Protocol Specification:
https://github.com/RobotWebTools/rosbridge_suite/blob/ros2/ROSBRIDGE_PROTOCOL.md

@tckarenchiang
Copy link
Contributor Author

I tried using a low-level internet networking interface: socket and a higher-level library: Twisted to connect to a rosbridge server. However, I can't handle sending data efficiently when the data size is large using either library. The higher-volume the data is coming from FS, the larger the lag is in receiving messages from ROS side. I'm not sure how to solve this issue so I'll for now put this issue on the back burner.

@gavanderhoorn
Copy link
Member

Current state of this work: rosbridge_protocol_client.

@Timple
Copy link

Timple commented Dec 20, 2021

If everything is communicated using rosbridge, is #14 automatically tackled? As there is already rosbridge2.

@gavanderhoorn
Copy link
Member

Yes, correct.

However given the state of the rosbridge implementation I don't believe we'll be able to switch to it. There are too many problems with performance. It's likely/possible that's our fault (as we tried some naive ways to connect everything together), but as-is, the custom 'bridge' outperforms rosbridge by (at least) an order of magnitude, especially when it comes to larger messages (such as LaserScan).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants