Repository navigation
Convert take API to pybind11 - #721
Merged
Merged
Conversation
sloretz
approved these changes
Mar 18, 2021
sloretz
left a comment
Contributor
There was a problem hiding this comment.
A couple nitpicks I wouldn't block on.
| } else { | ||
| auto taken_msg = create_from_py(pymsg_type); | ||
|
|
||
| if (!taken_msg) { |
Contributor
There was a problem hiding this comment.
It looks like the pybind11-ified create_from_py would throw if taken_msg holds a nullptr, so no need to check it here.
| { | ||
| typedef void * create_ros_message_signature (void); | ||
|
|
||
| py::object pymetaclass = py::getattr(pymessage, "__class__"); |
Contributor
There was a problem hiding this comment.
pymessage.attr("__class__") works too, but the free function style is fine if you like it.
gbalke
approved these changes
Mar 19, 2021
gbalke
left a comment
Contributor
There was a problem hiding this comment.
Looks great! Can't find anything to prod at haha.
Contributor
Author
sloretz
approved these changes
Mar 22, 2021
sloretz
left a comment
Contributor
There was a problem hiding this comment.
LGTM with a rebase to fix merge conflicts
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
hidmic
force-pushed
the
hidmic/pybind-take
branch
from
March 22, 2021 17:49
bc2a249 to
53ffcd5
Compare
Contributor
Author
sloretz
approved these changes
Mar 22, 2021
Contributor
Author
32 of 34 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Precisely what the title says. Part of #665. This patch also exposes
SerializedMessagefor reuse and migrates some C helper functions to C++ (hopefully helping readability).CI up to
rclpy: