Client
For clients to the mission service.
- exception bosdyn.mission.client.MissionResponseError(response, error_message=None)[source]
Bases:
ResponseErrorGeneral class of errors for mission service.
- exception bosdyn.mission.client.InvalidQuestionId(response, error_message=None)[source]
Bases:
MissionResponseErrorThe indicated question is unknown.
- exception bosdyn.mission.client.InvalidAnswerCode(response, error_message=None)[source]
Bases:
MissionResponseErrorThe indicated answer code is invalid for the specified question.
- exception bosdyn.mission.client.QuestionAlreadyAnswered(response, error_message=None)[source]
Bases:
MissionResponseErrorThe indicated question was already answered.
- exception bosdyn.mission.client.CustomParamsError(response, error_message=None)[source]
Bases:
MissionResponseErrorThe indicated answer does not match the spec for the indicated answer
- exception bosdyn.mission.client.IncompatibleAnswer(response, error_message=None)[source]
Bases:
MissionResponseErrorThe indicated answer is not in a format expected by the indicated question.
- exception bosdyn.mission.client.CompilationError(response, error_message=None)[source]
Bases:
MissionResponseErrorMission could not be compiled.
- exception bosdyn.mission.client.ValidationError(response, error_message=None)[source]
Bases:
MissionResponseErrorMission could not be validated.
- exception bosdyn.mission.client.NoMissionError(response, error_message=None)[source]
Bases:
MissionResponseErrorThere is no mission to be played/restarted.
- exception bosdyn.mission.client.NoMissionPlayingError(response, error_message=None)[source]
Bases:
MissionResponseErrorThere is no mission to be paused.
- class bosdyn.mission.client.MissionClient[source]
Bases:
BaseClientClient for the Mission service.
- default_service_name = 'robot-mission'
- service_type = 'bosdyn.api.mission.MissionService'
- 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:
RpcError – Problem communicating with the robot.
InvalidQuestionId – question_id was not a valid id.
InvalidAnswerCode – code was not valid for the question.
QuestionAlreadyAnswered – The question for question_id was already answered.
CustomParamsError – The answer did not match the spec for the question.
IncompatibleAnswer – The answer did not match a type expected for the question.
- 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:
RpcError – Problem communicating with the robot.
bosdyn.mission.client.CompilationError – The mission failed to compile.
bosdyn.mission.client.ValidationError – The mission failed to validate.
- 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:
RpcError – Problem communicating with the robot.
bosdyn.mission.client.CompilationError – The mission failed to compile.
bosdyn.mission.client.ValidationError – The mission failed to validate.
- 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:
RpcError – Problem communicating with the robot.
bosdyn.mission.client.CompilationError – The mission failed to compile.
bosdyn.mission.client.ValidationError – The mission failed to validate.
- 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:
RpcError – Problem communicating with the robot.
NoMissionError – No mission Loaded.
- 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:
RpcError – Problem communicating with the robot.
NoMissionError – No Mission Loaded.
bosdyn.mission.client.ValidationError – The mission failed to validate.
- 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:
RpcError – Problem communicating with the robot.
NoMissionPlayingError – No mission playing.
- stop_mission(**kwargs)[source]
Stop the running mission.
- Raises:
RpcError – Problem communicating with the robot.
NoMissionPlayingError – No mission playing.
- get_info(**kwargs)[source]
Get static information about the loaded mission.
- Raises:
RpcError – Problem communicating with the robot.