ros::desrialize messages
Hello. I'm building a system based on ros messages (not using ros message transferring system, only its messages). I'm using python zmq system to send ros messages, and cpp zmq to receive it. On the sending side I'm using this code to serialize the msg:
s1 = StringIO()
s.serialize(s1)
socket.send_multipart(s1.buflist)
which s is of type ros message type.
On the receiving side i'm using :
ros::serialization::IStream s(m.message_start, m.num_bytes - (m.message_start - m.buf.get()));
deserialize(s, message);
which message is ros message type and m is of type ros::SerializedMessage, and deserialize is ros's deserialize function
I manage to deserialize alot of ros's messages(std msgs and my own created messages) but some I cannot deserialize and get the following error:
terminate called after throwing an instance of 'ros::serialization::StreamOverrunException' what(): Buffer Overrun
How come I can deserialize some of them and some not, considering all of them are ros like messages?