Client

For clients to the mission service.

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

Bases: bosdyn.client.exceptions.ResponseError

General class of errors for mission service.

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

Bases: bosdyn.mission.client.MissionResponseError

The indicated question is unknown.

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

Bases: bosdyn.mission.client.MissionResponseError

The indicated answer code is invalid for the specified question.

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

Bases: bosdyn.mission.client.MissionResponseError

The indicated question was already answered.

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

Bases: bosdyn.mission.client.MissionResponseError

Mission could not be compiled.

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

Bases: bosdyn.mission.client.MissionResponseError

Mission could not be validated.

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

Bases: bosdyn.mission.client.MissionResponseError

There is no mission to be played/restarted.

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

Bases: bosdyn.mission.client.MissionResponseError

There is no mission to be paused.

class bosdyn.mission.client.MissionClient[source]

Bases: bosdyn.client.common.BaseClient

Client for the RobotState 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, **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

Raises
answer_question_async(question_id, code, **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

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().

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().