-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hi, after using the library for a while, it works pretty fine.
However, there is a minor problem with initNode.
Sometimes, exception will raise when there is failure in connection which is normal.
(For example, connection refused, no route found, which caused by Linux or Router Routing Table respectively)
However, the issue is that with re-establishing the connection (Or re running initNode), the failure will not be raised. Everythings is going to be looking good, but of course, the connection between a flutter app using the library and the computer running ROS melodic is still not success.
To rebuild the issue, the sample code of a button click to establish connection between ROS will be like
void connectToROS(BuildContext context) async {
try
{
node = await initNode('App', [], rosMasterUri: 'http://192.168.1.5/').timeout(Duration(seconds: 10));
/*
And here will be some topic subscription and service advertisement
*/
} catch (e) {
print(e.toString());
}
}
To be simple, error will only be raised for the first time, not for the trial later.
I guess if there is any missing in the catch statement, or it is a bug for initNode. I appreciate if any helps can be provided here.