How to convert the dynamic data generated by json_deserialize into the dynamic data created by DynamicPubSubType::create_data()? #5982
-
I have a requirement: receive a JSON string and convert it into data to be published, similar to rostopic pub.
Second, serialize the dynamic data.
Finally, convert it into static data and send it out.
But when I execute the second step dyn_pub_sub_type_->calculate_serialized_size(), a core dump occurs. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Additionally, the version is Fast DDS 3.3.0. |
Beta Was this translation helpful? Give feedback.
-
Who can help me? I would be deeply grateful. |
Beta Was this translation helpful? Give feedback.
-
It seems that the dynamic data converted by json_deserialize() cannot be sent. |
Beta Was this translation helpful? Give feedback.
-
The issue has been resolved. It was caused by my misuse of DynamicData::_ref_type in DynamicPubSubType::serialize().
|
Beta Was this translation helpful? Give feedback.
The issue has been resolved. It was caused by my misuse of DynamicData::_ref_type in DynamicPubSubType::serialize().
the right way is :