publish method
Publish a message
to the topic.
Implementation
Future<void> publish(dynamic message) async {
// Advertise the topic and then send the publish request.
await advertise();
publishId = ros.requestPublisher(name);
await safeSend(Request(
op: 'publish',
topic: name,
id: publishId,
msg: message,
latch: latch,
));
}