Robotics StackExchange | Archived questions

deserialize uint8* to ros message

I want to deserialize received message to ros message ,here is my code ``` int main() { stdmsgs::String msg; namespace ser = ros::serialization; uint8t bufferptr[] = "asdf"; ser::IStream stream(bufferptr, 4);

ser::deserialize(stream, msg);
return 0;

} And I got the error :

terminate called after throwing an instance of 'ros::serialization::StreamOverrunException' what(): Buffer Overrun ```

Asked by CarryOwen on 2023-02-03 05:53:31 UTC

Comments

Answers