When a connected board is reset, the rosserial connection re-inits itself, and publishers and subscribers work, but not services.
When the connection is re initiated a service already registered error comes up.
Namely Code from rospy/service.py is triggered,
def register(self, resolved_service_name, service): err = None with self.lock: if resolved_service_name in self.map: err = "service [%s] already registered"%resolved_service_name else: self.map[resolved_service_name] = service self.registration_listeners.notify_added(resolved_service_name, service.uri, Registration.SRV) if err: raise ServiceException(err)
The if clause checks service_name in a map, and if found, it will print an error. I removed the if statement and only used self.map[resolved_service_name] = service , and it seems to work for me.
But I wonder what else am I breaking?
Any ideas / discussion on this greatly appreciated. I could produce error logs / console output and such.
Hello,
When a connected board is reset, the rosserial connection re-inits itself, and publishers and subscribers work, but not services.
When the connection is re initiated a service already registered error comes up.
Namely Code from rospy/service.py is triggered,
def register(self, resolved_service_name, service): err = None with self.lock: if resolved_service_name in self.map: err = "service [%s] already registered"%resolved_service_name else: self.map[resolved_service_name] = service self.registration_listeners.notify_added(resolved_service_name, service.uri, Registration.SRV) if err: raise ServiceException(err)
The if clause checks service_name in a map, and if found, it will print an error. I removed the if statement and only used
self.map[resolved_service_name] = service
, and it seems to work for me.But I wonder what else am I breaking?
Any ideas / discussion on this greatly appreciated. I could produce error logs / console output and such.
Best Regards, Can