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
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