From a5180dcf7821feeb5f66a7481380aee8aa394dd3 Mon Sep 17 00:00:00 2001 From: TobinHall <45376386+TobinHall@users.noreply.github.com> Date: Wed, 16 Jun 2021 03:44:53 +1200 Subject: [PATCH] Fixing message size issue. (#516) --- rosserial_server/include/rosserial_server/session.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rosserial_server/include/rosserial_server/session.h b/rosserial_server/include/rosserial_server/session.h index c03377347..36925a8fb 100644 --- a/rosserial_server/include/rosserial_server/session.h +++ b/rosserial_server/include/rosserial_server/session.h @@ -243,7 +243,9 @@ class Session : boost::noncopyable } else { if (callbacks_.count(topic_id) == 1) { try { - callbacks_[topic_id](stream); + // stream includes the check sum byte. + ros::serialization::IStream msg_stream(stream.getData(), stream.getLength()-1); + callbacks_[topic_id](msg_stream); } catch(ros::serialization::StreamOverrunException e) { if (topic_id < 100) { ROS_ERROR("Buffer overrun when attempting to parse setup message.");