publish method

Future<void> publish(
  1. dynamic message
)

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,
  ));
}