Client

For clients to the mission service.

exception bosdyn.mission.client.MissionResponseError(response, error_message=None)[source]

Bases: ResponseError

General class of errors for mission service.

exception bosdyn.mission.client.InvalidQuestionId(response, error_message=None)[source]

Bases: MissionResponseError

The indicated question is unknown.

exception bosdyn.mission.client.InvalidAnswerCode(response, error_message=None)[source]

Bases: MissionResponseError

The indicated answer code is invalid for the specified question.

exception bosdyn.mission.client.QuestionAlreadyAnswered(response, error_message=None)[source]

Bases: MissionResponseError

The indicated question was already answered.

exception bosdyn.mission.client.CustomParamsError(response, error_message=None)[source]

Bases: MissionResponseError

The indicated answer does not match the spec for the indicated answer

exception bosdyn.mission.client.IncompatibleAnswer(response, error_message=None)[source]

Bases: MissionResponseError

The indicated answer is not in a format expected by the indicated question.

exception bosdyn.mission.client.CompilationError(response, error_message=None)[source]

Bases: MissionResponseError

Mission could not be compiled.

exception bosdyn.mission.client.ValidationError(response, error_message=None)[source]

Bases: MissionResponseError

Mission could not be validated.

exception bosdyn.mission.client.NoMissionError(response, error_message=None)[source]

Bases: MissionResponseError

There is no mission to be played/restarted.

exception bosdyn.mission.client.NoMissionPlayingError(response, error_message=None)[source]

Bases: MissionResponseError

There is no mission to be paused.

class bosdyn.mission.client.MissionClient[source]

Bases: BaseClient

Client for the Mission service.

default_service_name = 'robot-mission'
service_type = 'bosdyn.api.mission.MissionService'
update_from(other)[source]

Adopt key objects like processors, logger, and wallet from other.

property timesync_endpoint

Accessor for timesync endpoint that was grabbed via ‘update_from()’.

get_state(upper_tick_bound=None, lower_tick_bound=None, past_ticks=None, **kwargs)[source]

Obtain current mission state.

Raises:

RpcError – Problem communicating with the robot.

get_state_async(upper_tick_bound=None, lower_tick_bound=None, past_ticks=None, **kwargs)[source]

Async version of get_state()

answer_question(question_id, code=None, custom_params=None, **kwargs)[source]

Specify an answer to the question asked by the mission. :param question_id: ID of the question to answer. :type question_id: int :param code: Answer code. :type code: int :param custom_params: Answer to a custom params prompt. :type custom_params: DictParam

Raises:
answer_question_async(question_id, code=None, custom_params=None, **kwargs)[source]

Async version of answer_question()

load_mission(root, leases=[], **kwargs)[source]

Load a mission onto the robot. :param root: Root node in a mission. :param leases: All leases necessary to initialize a mission.

Raises:
load_mission_async(root, leases=[], **kwargs)[source]

Async version of load_mission

load_mission_as_chunks(root, leases=[], data_chunk_byte_size=1000000, **kwargs)[source]

Load a mission onto the robot. :param root: Root node in a mission. :param leases: All leases necessary to initialize a mission. :param data_chunk_byte_size: max size of each streamed message

Raises:
load_mission_as_chunks2(root, leases=[], data_chunk_byte_size=1000000, **kwargs)[source]

Load a mission onto the robot. :param root: Root node in a mission. :param leases: All leases necessary to initialize a mission. :param data_chunk_byte_size: max size of each streamed message

Raises:
play_mission(pause_time_secs, leases=[], settings=None, **kwargs)[source]

Play the loaded mission.

Parameters:
  • pause_time_secs – Absolute time when the mission should pause execution. Subsequent RPCs will override this value, so you can use this to say “if you don’t hear from me again, stop running the mission at this time.”

  • leases – Leases the mission service will need to use. Unlike other clients, these MUST be specified.

Raises:
play_mission_async(pause_time_secs, leases=[], settings=None, **kwargs)[source]

Async version of play_mission.

restart_mission(pause_time_secs, leases=[], settings=None, **kwargs)[source]

Restart the loaded mission.

Parameters:
  • pause_time_secs – Absolute time when the mission should pause execution. Subsequent RPCs to RestartMission will override this value, so you can use this to say “if you don’t hear from me again, stop running the mission at this time.”

  • leases – Leases the mission service will need to use. Unlike other clients, these MUST be specified.

Raises:
restart_mission_async(pause_time_secs, leases=[], settings=None, **kwargs)[source]

Async version of restart_mission.

pause_mission(**kwargs)[source]

Pause the running mission.

Raises:
pause_mission_async(**kwargs)[source]

Async version of pause_mission().

stop_mission(**kwargs)[source]

Stop the running mission.

Raises:
stop_mission_async(**kwargs)[source]

Async version of stop_mission().

get_info(**kwargs)[source]

Get static information about the loaded mission.

Raises:

RpcError – Problem communicating with the robot.

get_info_async(**kwargs)[source]

Async version of get_info.

get_mission(**kwargs)[source]

Get the loaded mission.

Raises:

RpcError – Problem communicating with the robot.

get_mission_async(**kwargs)[source]

Async version of get_mission().