fix(python): avoid removal of null characters in bindings #66
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.
Description
The
receive_bytes
in python is indeed causing some troubles. The removal of the null characters at the end of the received buffer is not a good idea, because this will "destroy" clproto messages that have zeros (for example a zero joint state). Returning the buffer just like that is also not a good idea, because then clproto messages would be decoded, which will throw exceptions.Unfortunately, I don't see a better way of handling this right now. I don't think we can make a general assumption about the messages that we receive, so its ultimately the users responsibility to correctly decode and
rstrip
the received message.Review guidelines
Estimated Time of Review: 5 minutes
Checklist before merging: