Closed smits closed 7 years ago
Based on http://wiki.ros.org/roscpp/Overview/Services#Class_Methods we should always return true IMHO.
If it always guarantees to succeed yes. In a ros service you can return false if the result could not be computed for some reason. In the call of GetMapNameFromUuid you may fail to get the string.
Actually according to TangoAreaDescriptionMetadata_get the value of the char* can be NULL if the key is not found or not set. I don't think you are allowed to create a string instance with a NULL value.
A better signature could be bool GetMapNameFromUuid(const std::string& map_uuid, std::string &map_name) and return false on any of the errors.
Sorry for the hijack :D
@lounick Thanks for the Hijack, I realised the same in the meantime and implemented a refactor accordingly. PTAL @lounick and @mcopejans
@smits LGTM
Small fix, we should return something, I'm not entirely sure whether we should do this is just return true always.