This is starting to get more-and-more off-topic, but:
Afaik there is no documented best practice for this.
Users have always been encouraged to not use
std_msgs/String, but to create semantically meaningful messages. A topic carrying a
String doesn’t tell you anything about what its intended use is, nor how the message should be interpreted (other than as a plain
String of course).
So usage of
std_msgs is discouraged as there are probably better message types you can use, and you also don’t need to use it, as fields in other messages (including your own) should just use the primitive types (ie:
uint8, etc) instead of their wrapped versions from
As to some context (almost in some sort-of chronological order):
You should be able to find other related PRs and issues by following the links in the ones I link to here.
The summary of this is the notice in the release notes of Foxy. Additionally, the messages have deprecation notices added.
But if @33thou’s response is any indication, there aren’t that many people aware of this.