Closed k-okada closed 2 years ago
A few questions:
persistent
to true here and to nil in the standard service call?Any insights on why we are defaulting persistent to true here and to nil in the standard service call?
if you call service call multiple times with high rate, we need to set persistent t
. See test code https://gist.github.com/k-okada/d930a741d1f0eb0fddb4e0c615c24b44.
In robotics application, most of code runs in 10-500 Hz, and they use service call within the loop (ex. https://github.com/jsk-ros-pkg/jsk_tendon_robot/issues/979 ), Although I basically in favor of using topic for this purpose, I thought setting persistent t will be useful.
But if I read http://wiki.ros.org/roscpp/Overview/Services#Persistent_Connections carefully, they said we need to add reconnect logic. So maybe we'll run into trouble in ether way. Now, I think persistent nil
might be ok.
Why we have ros-debug on call-trigger and ros-info on call-set-bool?
fixed
There is no way to differentiate a call failure (service not found) from a failed call (service responds with :success nil) in call-trigger and call-set-bool. Maybe returning the whole return object could be more useful?
OK, fixed to return whole objects, if it is ok, please fix you code > @sktometometo https://github.com/jsk-ros-pkg/jsk_robot/blob/9282d6b2903223d3880507be34aa646e1e048506/jsk_spot_robot/spoteus/spot-interface.l
But if I read http://wiki.ros.org/roscpp/Overview/Services#Persistent_Connections carefully, they said we need to add reconnect logic. So maybe we'll run into trouble in ether way. Now, I think persistent nil might be ok.
I also think that defaulting the persistent flag to false is ok. Persistent clients are useful, but should be handled more carefully, so I think that they are more suited as a more advanced alternative option.
copied from https://github.com/jsk-ros-pkg/jsk_robot/pull/1376/files#diff-c70afdbf438eacc1424a31e609ab4e3d94460ba0d89d03df4004fef168731d56
add timeout key
use persist mode for call-*-service, see https://github.com/jsk-ros-pkg/jsk_roseus/pull/593