-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
publish message one time only #6
Comments
Unfortunately there's no library way of publishing once. var config = RosConfig(
'ros_nodes_example_node',
'http://127.0.0.1:11311/',
'127.0.0.1',
24125,
);
var client = RosClient(config);
var topic = RosTopic('chatter', StdMsgsString());
var publisher = await client.register(topic);
publisher.stopPublishing();
await publisher.publishData();
await client.unregister(topic); Or if you pull new change var config = RosConfig(
'ros_nodes_example_node',
'http://127.0.0.1:11311/',
'127.0.0.1',
24125,
);
var client = RosClient(config);
var topic = RosTopic('chatter', StdMsgsString());
var publisher = await client.register(topic, startPublishing: false);
await publisher.publishData();
await client.unregister(topic); The end effect would be publishing topic once and then stopping ;D Also if you look for a ros library that's more similar to c++/nodejs version, checkout https://github.com/TimWhiting/dartros |
Thank you so much. |
Firstly, thank you for this awesome project.
And I have one question, can I publish ros message one time only?
The text was updated successfully, but these errors were encountered: