-
Notifications
You must be signed in to change notification settings - Fork 100
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
String conversion to bytes breaks python3 std_msgs/String implementation #33
Comments
nyxaria
pushed a commit
to nyxaria/rospy_message_converter
that referenced
this issue
Apr 1, 2020
BTW, you seem to have copied one line from if python3 or type(_x) == unicode: |
You are right, I was messing around with the source code. In python3 |
nyxaria
pushed a commit
to nyxaria/rospy_message_converter
that referenced
this issue
Apr 2, 2020
Co-Authored-By: Martin Günther <martin.guenther@dfki.de>
mintar
added a commit
that referenced
this issue
Apr 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running this package in python 3, the conversion of a string fails because of the ros implementation of
std_msgs/msg/_String.py
. They callencode()
on thedata
field of a string object due topython3
being alwaysTrue
:However, the rospy_message_converter already does this when it converts a string python object to a ros_primitive in
rospy_message_converter/src/rospy_message_converter/message_converter.py:149
:The fix is to add a check that we are not in python3 before doing the conversion.
This works for std_msgs/String and sensor_msgs/JointState but I am not sure if this breaks anything else as I don't have the infrastructure in place to test this.
I will create a PR shortly.
The text was updated successfully, but these errors were encountered: