I am trying to do a subscriber for the /diagnostic topic.
The message is diagnostic_msgs::DiagnosticArray and inside has a diagnostic_msgs::DiagnosticStatus array named status.
I like access to the members inside of this array: name, message… in the callback.
I am using a pointer to the diagnostic_msgs::DiagnosticArray:
message_string=pointer->status->message;
the type of message is string.
What is wrong? Many thanks.