Help with exception in subscriber
I have a rospy implementation of an object tracker in which I m trying to publish the objects tracked. The message in addition to other attributes has two arrays predictions and observation history. This message is filled from a class which maintains the tracks. The tracker node is designed as follows.
- A callback which gets called by detector and does the tracking
- A publish loop that keeps publishing the tracked objects from the common class object. This runs at a fixed rate (say 20 Hz)
Now when I run simulation from a rosbag everything works fine upto some time instant (which is not deterministic and keeps changing) after which I no longer receive the messages published by the publisher. Later when I checked the logs I found that the subscriber is getting an exception. The publisher node seems to be working fine without any error. I understood this might be due to race conditions of the common resource and also implemented locking mechanisms. But no luck. Can someone help me understand what the exception is trying to convey?
[rospy.msg][ERROR] 2019-05-28 21:57:34,225: cannot deserialize message: EXCEPTION Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/msg.py", line 223, in deserialize_messages
msg_queue.append(data.deserialize(q))
File "/home/v6balasu/catkin_ws/devel/lib/python2.7/dist-packages/anm_msgs/msg/_TrackedObjectList.py", line 378, in deserialize
raise genpy.DeserializationError(e) #most likely buffer underfill
DeserializationError: unpack requires a string argument of length 24
[rospy.internal][ERROR] 2019-05-28 21:57:34,274: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 727, in receive_once
p.read_messages(b, msg_queue, sock)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 394, in read_messages
deserialize_messages(b, msg_queue, self.recv_data_class, queue_size=self.queue_size)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/msg.py", line 245, in deserialize_messages
raise genpy.DeserializationError("cannot deserialize: %s"%str(e))
DeserializationError: cannot deserialize: unpack requires a string argument of length 24
A few lines later I get this TCP header error which also seems to give some clue
[rospy.internal][WARNING] 2019-05-28 21:57:34,280: Unknown error initiating TCP/IP socket to (REDACTED) (http://(REDACTED)/): Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 557, in connect
self.read_header()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 650, in read_header
self._validate_header(read_ros_handshake_header(sock, self.read_buff, self.protocol.buff_size))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/network.py", line 383, in read_ros_handshake_header
return decode_ros_handshake_header(bval)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/network.py", line 344, in decode_ros_handshake_header
raise ROSHandshakeException("Invalid line in handshake header: [%s]"%line)
ROSHandshakeException: Invalid line in handshake header: [��Z��
the junk characters goes on for few lines. In between the junk I saw the word 'odom' which gave me the doubt as the frame id in the message was odom.
Asked by venktech on 2019-05-28 21:20:37 UTC
Comments