-
Notifications
You must be signed in to change notification settings - Fork 2
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
Speak the Ignition discovery protocol #5
Comments
Great work on One thought is that we could either expose a C API for doing a CPython-style wrapper. Alternatively, ROS2 has been moving forward with using Adding a python api natively to transport could help reduce some wheel reinvention. |
Thanks! Glad to hear you like it 😄
I agree that it would be very nice to not have to reinvent the wheel unnecessarily. What I am less clear about is how to accomplish that. I seem to just see obstacles everywhere. Here are some thoughts:
On the topic of generated bindings (
Another option is to write a python wrapper by hand with meaningful signatures and docstrings, which then calls the C++ API under the hood. Many big python libraries do this (pytorch/torch, tensorflow, pyzmq, numpy, scipy) and this effectively deals with the two drawbacks of an automatically wrapped library. In general, this is a very nice approach and if Ignition goes down that road I'll probably end up helping out in some form. For ign-transport specifically, I think it may be easier to speak just speak the same protocol on the wire and use I/O as the natural boundary between languages. It just seems like less work given that we have |
Ignition uses
ign-transport
to communicate between different parts of the library, and we can introspect this communication usingropy.Subscriber
.Under the hood, this uses a mix of zmq and the ignition CLI (via
subprocess
) to make itself known to ignition and to start receiving messages. The main reason why this isn't implemented cleaner is that I didn't find documentation on how topic discovery works in ignition. However, there appears to be some documentation (living here) that describes how ignition passes messages around to discover topics.A great addition would be to implement this discovery protocol here, so that we can cleanly interface with Ignition.
Possible related issue: gazebosim/gz-transport#225
The text was updated successfully, but these errors were encountered: