How to use the mavsdk.generated.offboard.OffboardResult.Result function in mavsdk

To help you get started, we’ve selected a few mavsdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpcOffboardResult):
        """ Translates a gRPC struct to the SDK equivalent """
        return OffboardResult(
                
                OffboardResult.Result.translate_from_rpc(rpcOffboardResult.result),
                
                
                rpcOffboardResult.result_str
                )
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
"""
         Start offboard control.

         Raises
         ------
         OffboardError
             If the request fails. The error contains the reason for the failure.
        """

        request = offboard_pb2.StartRequest()
        response = await self._stub.Start(request)

        
        result = self._extract_result(response)

        if result.result is not OffboardResult.Result.SUCCESS:
            raise OffboardError(result, "start()")
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / offboard.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: OffboardResult.Result.UNKNOWN,
                    1: OffboardResult.Result.SUCCESS,
                    2: OffboardResult.Result.NO_SYSTEM,
                    3: OffboardResult.Result.CONNECTION_ERROR,
                    4: OffboardResult.Result.BUSY,
                    5: OffboardResult.Result.COMMAND_DENIED,
                    6: OffboardResult.Result.TIMEOUT,
                    7: OffboardResult.Result.NO_SETPOINT_SET,
                }.get(rpc_enum_value, None)