Audio Visual
- exception bosdyn.client.audio_visual.AudioVisualResponseError(response, error_message=None)[source]
Bases:
ResponseError
General class of errors for AudioVisual service.
- exception bosdyn.client.audio_visual.Error[source]
Bases:
Error
Base class for non-response errors in this module.
- exception bosdyn.client.audio_visual.NoTimeSyncError[source]
Bases:
Error
Client has not done timesync with robot.
- exception bosdyn.client.audio_visual.DoesNotExistError(response, error_message=None)[source]
Bases:
AudioVisualResponseError
The specified behavior does not exist.
- exception bosdyn.client.audio_visual.PermanentBehaviorError(response, error_message=None)[source]
Bases:
AudioVisualResponseError
Permanent behaviors cannot be modified or deleted.
- exception bosdyn.client.audio_visual.BehaviorExpiredError(response, error_message=None)[source]
Bases:
AudioVisualResponseError
The specified end_time has already expired.
- exception bosdyn.client.audio_visual.InvalidBehaviorError(response, error_message=None)[source]
Bases:
AudioVisualResponseError
The request contained a behavior with invalid fields.
- exception bosdyn.client.audio_visual.InvalidClientError(response, error_message=None)[source]
Bases:
AudioVisualResponseError
The behavior cannot be stopped because a different client is running it.
- class bosdyn.client.audio_visual.AudioVisualClient[source]
Bases:
BaseClient
Client for calling the Audio Visual Service.
- default_service_name = 'audio-visual'
- service_type = 'bosdyn.api.AudioVisualService'
- update_from(other)[source]
Update instance from another object.
- Parameters:
other – The object where to copy from.
- run_behavior(name, end_time_secs, restart=False, timesync_endpoint=None, **kwargs)[source]
Run a behavior on the robot.
- Parameters:
name – The name of the behavior to run.
end_time_secs – The time that this behavior should stop.
restart – If this behavior is already running, should we restart it from the beginning.
timesync_endpoint – Timesync endpoint.
- Raises:
RpcError – Problem communicating with the robot.
DoesNotExistError – The behavior name specified has not been added to the system.
BehaviorExpiredError – The specified end_time has already expired.
NoTimeSyncError – Time sync has not been established with the robot yet.
- run_behavior_async(name, end_time_secs, restart=False, timesync_endpoint=None, **kwargs)[source]
Async version of run_behavior().
- Parameters:
name – The name of the behavior to run.
end_time_secs – The time that this behavior should stop.
restart – If this behavior is already running, should we restart it from the beginning.
timesync_endpoint – Timesync endpoint.
- Raises:
RpcError – Problem communicating with the robot.
DoesNotExistError – The behavior name specified has not been added to the system.
BehaviorExpiredError – The specified end_time has already expired.
NoTimeSyncError – Time sync has not been established with the robot yet.
- stop_behavior(name, **kwargs)[source]
Stop a behavior that is currently running.
- Parameters:
name – The name of the behavior to stop.
- Raises:
RpcError – Problem communicating with the robot.
InvalidClientError – A different client is running this behavior.
- stop_behavior_async(name, **kwargs)[source]
Async version of stop_behavior().
- Parameters:
name – The name of the behavior to stop.
- Raises:
RpcError – Problem communicating with the robot.
InvalidClientError – A different client is running this behavior.
- list_behaviors(**kwargs)[source]
List all currently added AudioVisualBehaviors.
- Returns:
A list of all LiveAudioVisualBehavior protos.
- Raises:
RpcError – Problem communicating with the robot.
- list_behaviors_async(**kwargs)[source]
Async version of list_behaviors().
- Returns:
A list of all LiveAudioVisualBehavior protos.
- Raises:
RpcError – Problem communicating with the robot.
- get_system_params(**kwargs)[source]
Get the current system params.
- Returns:
An AudioVisualSystemParams proto containing the current system param values.
- Raises:
RpcError – Problem communicating with the robot.
- get_system_params_async(**kwargs)[source]
Async version of get_system_params().
- Returns:
An AudioVisualSystemParams proto containing the current system param values.
- Raises:
RpcError – Problem communicating with the robot.
- set_system_params(enabled=None, max_brightness=None, buzzer_max_volume=None, speaker_max_volume=None, normal_color_association=None, warning_color_association=None, danger_color_association=None, **kwargs)[source]
Set the system params.
- Parameters:
enabled – [optional] System is enabled or disabled (boolean).
max_brightness – [optional] New max_brightness value [0, 1].
buzzer_max_volume – [optional] New buzzer_max_volume value [0, 1].
speaker_max_volume – [optional] New speaker_max_volume value [0, 1].
normal_color_association – [optional] The color to associate with the normal color preset.
warning_color_association – [optional] The color to associate with the warning color preset.
danger_color_association – [optional] The color to associate with the danger color preset.
- Raises:
RpcError – Problem communicating with the robot.
- set_system_params_async(enabled=None, max_brightness=None, buzzer_max_volume=None, speaker_max_volume=None, normal_color_association=None, warning_color_association=None, danger_color_association=None, **kwargs)[source]
Async version of set_system_params().
- Parameters:
enabled – [optional] System is enabled or disabled (boolean).
max_brightness – [optional] New max_brightness value [0, 1].
buzzer_max_volume – [optional] New buzzer_max_volume value [0, 1].
speaker_max_volume – [optional] New speaker_max_volume value [0, 1].
normal_color_association – [optional] The color to associate with the normal color preset.
warning_color_association – [optional] The color to associate with the warning color preset.
danger_color_association – [optional] The color to associate with the danger color preset.
- Raises:
RpcError – Problem communicating with the robot.