-
Notifications
You must be signed in to change notification settings - Fork 43
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
Python Bindings for Publisher, Subscriber and Service Request features. #411
Conversation
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #411 +/- ##
==========================================
- Coverage 87.43% 87.11% -0.33%
==========================================
Files 60 61 +1
Lines 5291 5462 +171
==========================================
+ Hits 4626 4758 +132
- Misses 665 704 +39
|
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
Signed-off-by: Voldivh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall. Most of the comments should be easy to address. Some
comments might be addressed in a follow-up PR.
Signed-off-by: Voldivh <[email protected]>
…nsport into voldivh/pybind11_bindings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one test failure. Not sure if it's failing for you. Also, I know I asked
you to rebase this to work with new message generation framework in gz-msgs
.
But since that's been reverted, could you also revert the change here? I plan
to open a gz-msgs PR that uses the old message generation framework and adds
python bindings.
No problem, just one question then, should I change this PR to target the |
Yes, target the |
b49093c
to
99531f2
Compare
Signed-off-by: Voldivh <[email protected]>
@osrf-jenkins run tests please |
Needs gazebo-release/gz-msgs10-release#6 for CI. |
Signed-off-by: Addisu Z. Taddese <[email protected]>
e890c71
to
e1bca5e
Compare
I've built gz-msgs10 debians just for Jammy for testing and added a new dependency in e1bca5e. It looks like tests are passing on Jenkins 🎉 |
Signed-off-by: Voldivh <[email protected]>
gazebo-release/gz-msgs10-release#6 is merged and I've built the debs for Focal and Jammy, so I'll run tests again. @osrf-jenkins run tests please |
@osrf-jenkins run tests please |
Signed-off-by: Addisu Z. Taddese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahcorde All your feedback has been resolved. Do you want to take another look?
🎉 New feature
Closes #387
Summary
This PR creates the python bindings for the publisher, subscriber and request features from the repository. In order to avoid creating a new dependency to be able to create python bindings from protobuf messages, it was decided to use the methods that publishes, subscribes and make services request with serialized messages, i.e, use the methods
PublishRaw
,SubscribeRaw
andRequestRaw
. The bindings for these methods are wrapped by python methods in order to give the user an API similar to the one we have in C++.We would like to acknowledge and give credit to @srmainwaring for his code which served as a reference and inspiration for this implementation. The main difference with this implementation is that we are using the methods that uses serialized messages instead of creating bindings with the
pybind11_protobuf
library to the non-serialized methods.Test it
There are some examples that were created as smoke test in order to test out the functionality. In order to use them you would have to:
PYTHONPATH
variable:Note: The service requester example will only work if there is a server running that listens to
/echo
topic and expects agz.messages.StringMsg
as the request. One way to do so is to follow the instructions on the examples folder and run theresponser
executable.