コード例 #1
0
ファイル: estop.py プロジェクト: yan99uic/spot-sdk
 def set_config_async(self, config, target_config_id, **kwargs):
     """Async version of set_config()"""
     req = estop_pb2.SetEstopConfigRequest(
         config=config, target_config_id=target_config_id)
     return self.call_async(self._stub.SetEstopConfig, req,
                            _active_config_from_config_response,
                            _set_config_error_from_response, **kwargs)
コード例 #2
0
    def set_config(self, config, target_config_id, **kwargs):
        """Change the estop configuration of the robot.

        Args:
            config: New configuration to set.
            target_config_id: The identification of the current configuration on the robot.
            kwargs: Passed to underlying RPC. Example: timeout=5 to cancel the RPC after 5 seconds.
        Returns:
            estop_pb2.EstopConfig the robot is currently using.
        """
        req = estop_pb2.SetEstopConfigRequest(config=config, target_config_id=target_config_id)
        return self.call(self._stub.SetEstopConfig, req, _active_config_from_config_response,
                         _set_config_error_from_response, **kwargs)