Skip to content
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

struct.error: argument for 's' must be a bytes object #53

Open
shuzhangshu opened this issue Oct 17, 2022 · 0 comments
Open

struct.error: argument for 's' must be a bytes object #53

shuzhangshu opened this issue Oct 17, 2022 · 0 comments

Comments

@shuzhangshu
Copy link

Screenshot from 2022-10-17 14-59-32
hi,This picture is the content of my error report. As a result, I can never generate a visual map in Rviz. Could you please help me? Thank you very much.Just in case, I will copy the contents of the error.
[ERROR] [1665989388.280450]: bad callback: <bound method Subscriber.callback of <message_filters.Subscriber object at 0x7faf280d5ac0>>
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/sensor_msgs/msg/_PointCloud2.py", line 169, in serialize
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
struct.error: argument for 's' must be a bytes object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 882, in publish
self.impl.publish(data)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 1066, in publish
serialize_message(b, self.seq, message)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msg.py", line 152, in serialize_message
msg.serialize(b)
File "/opt/ros/noetic/lib/python3/dist-packages/sensor_msgs/msg/_PointCloud2.py", line 172, in serialize
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 393, in _check_types
check_type(n, t, getattr(self, n))
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 312, in check_type
raise SerializationError('field %s must be a list or tuple type' % field_name)
genpy.message.SerializationError: field data must be a list or tuple type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 76, in callback
self.signalMessage(msg)
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 58, in signalMessage
cb(*(msg + args))
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 330, in add
self.signalMessage(msgs)
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/init.py", line 58, in signalMessage
cb(
(msg + args))
File "/home/shu/catkin_ws/src/semantic_slam-master/semantic_cloud/src/semantic_cloud.py", line 221, in color_depth_callback
self.pcl_pub.publish(cloud_ros)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 886, in publish
raise ROSSerializationException(str(e))
rospy.exceptions.ROSSerializationException: field data must be a list or tuple type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant