BOW Client | Python
bow_client::bow_client namespace
Summary
Members | Descriptions |
---|---|
public str version () | Gets the SDK version information. |
public Tuple Union[[Robot , None], bow_utils.Error] quick_connect (logging.Logger pylog,List modalities,bool verbose,bow_utils.AudioParams audio_params) | Quick connect function to simplify process of connecting to a robot and opening modalities. |
public bow_utils.Error setup (bow_utils.AudioParams audio_params,str logdir,bool loglatency) | Configures variables required for a BOW client. |
public bow_utils.Error login_user (str username,str password,bool system_login) | Login to your BOW account. |
public bow_utils.GetRobotsProtoReply get_robots (bool get_local,bool get_remote,bool get_system) | Get list of available robots. |
public None close_client_interface () | Closes your BOW client. |
class bow_client::bow_client::Robot | The Robot class. |
Members
public str
version
()
Gets the SDK version information.
Gets the version of the bow client and animus core libraries.
Returns
str: A version string in the form:
public Tuple
Union[[Robot
, None], bow_utils.Error]
quick_connect
(logging.Logger pylog,List modalities,bool verbose,bow_utils.AudioParams audio_params)
Quick connect function to simplify process of connecting to a robot and opening modalities.
Quick connect talks to the system tray application to login, get a list of robots, connect to the robot chosen via the system tray and open the requested channels.
Parameters
-
pylog
logging.Logger: Can be created with bow_util.create_logger(). A logging object which enables the SDK to output useful information about your robot and robot connection to the terminal. -
modalities
List[str]: A list of the modalities you wish to open on the robot. Modalities are specific to the robot but can be vision, audition, proprioception, motor, voice, speech and tactile. -
verbose
bool: Determines whether latency information is printed out. The latency information includes the measured round trip latency between the sdk and the robot as well as framerate and latency information for all modalities separately. -
audio_params
bow_utils.AudioParams: Configures the settings for the audio streams. Use None for default settings.
Returns
Robot: Returns an instance of the Robot class, which represents the connected robot. Returns None if no connection made.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful connection. If error.Success is False you can inspect error.Description for more information.
public bow_utils.Error
setup
(bow_utils.AudioParams audio_params,str logdir,bool loglatency)
Configures variables required for a BOW client.
This function sets up the audio sampling and playback settings, sets the folder name for the log files and otherwise initialises all the variables required for a BOW client.
Parameters
-
audio_params
bow_utils.AudioParams: Configures the settings for the audio streams. Use None for default settings. -
logdir
str: Name of the desired directory for logs. Should take logging.Logger.name. -
loglatency
bool: Determines whether the latency of messages are reported in the log.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful setup. If error.Success is False you can inspect error.Description for more information.
public bow_utils.Error
login_user
(str username,str password,bool system_login)
Login to your BOW account.
Login with your BOW username and password to initialise communication session and therefore communicate with robots associated with your account. If you have the System Tray application installed, then you can bypass entering your username and password by setting system_login to True which will login using the credentials used for the Systray application.
Parameters
-
username
str: Your BOW username. -
password
str: Your BOW password. -
system_login
bool: True logs in using System Tray Application credentials, False uses provided credentials.
public bow_utils.GetRobotsProtoReply
get_robots
(bool get_local,bool get_remote,bool get_system)
Get list of available robots.
Returns the list of robots associated with your BOW account that are available on the local network or remotely.
Parameters
-
get_local
bool: True to include robots on local network in search. -
get_remote
bool: True to include robots available remotely in search. -
get_system
bool: True returns the robot currently selected in the Systray.
Returns
bow_util.GetRobotsProtoReply: This object consists of: remoteSearchError of type bow_utils.Error, localSearchError of type bow_utils.Error and robots an iterable containing the robot details for each robot detected. Each element can be passed to the Robot class constructor.
Example
public None
close_client_interface
()
Closes your BOW client.
This closes the BOW client, to restart a BOW client after closing, the setup function would need to be called again.
bow_client::bow_client::Robot class
The Robot class.
Each instance represents a robot connection. You can have multiple robots connected, each with their own class to allow for multiple synchronised robot control.
Summary
Members | Descriptions |
---|---|
public robot_details | |
public robot_id | |
public def __init__ (self,robot_details) | The Robot class initialiser. |
public bow_utils.Error connect (self) | Starts a connection with the robot. |
public bow_utils.Error open_modality (self,str modality_name) | Opens a channel for the given modality. |
public bow_utils.Error set_modality (self,str modality_name,Union,bow_utils. AudioSample,bow_utils. AudioSamples,List,bow_utils. TactileSamples,bow_utils. TactileSample,List,bow_utils. ProprioceptionSample,bow_utils. MotorSample,bow_utils. StringSample,bow_utils. BlobSample,bow_utils. Int64Array,bow_utils. Float32Array,bow_utils. Command,str,List,List] sample) | Sends data on an open modality channel. |
public Tuple[Union[List[ImageSampleHelper], List[bow_utils.AudioSample], List[bow_utils.TactileSample], bow_utils.MotorSample, bow_utils.ProprioceptionSample, bow_utils.ExteroceptionSample, bow_utils.InteroceptionSample, bow_utils.StringSample, bow_utils.BlobSample, bow_utils.Float32Array, bow_utils.Int64Array, None], bow_utils.Error] get_modality (self,str modality_name,Optional blocking) | Reads data from an open modality channel. |
public bow_utils.Error close_modality (self,str modality_name) | Closes an open modality channel. |
public bow_utils.Error disconnect (self) | Close the connection to the robot. |
Members
public
robot_details
public
robot_id
public def
__init__
(self,robot_details)
The Robot class initialiser.
The constructor accepts the robot details obtained from bow_client.get_robots()
Parameters
robot_details
bow_utils.Robot: The chosen robot selected from the array of robots returned when running bow_client.get_robots().
public bow_utils.Error
connect
(self)
Starts a connection with the robot.
This method starts a peer to peer connection with the robot using the robot details previously passed in to the constructor.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful connection. If error.Success is False you can inspect error.Description for more information.
public bow_utils.Error
open_modality
(self,str modality_name)
Opens a channel for the given modality.
Opens a channel between the robot and client, over which data for the chosen modality is transmitted.
Parameters
modality_name
str: The name of the modality channel you wish to open. Available options are specific to the robot but can be vision, audition, proprioception, motor, voice, speech or tactile.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful open. If error.Success is False you can inspect error.Description for more information.
public bow_utils.Error
set_modality
(self,str modality_name,Union,bow_utils. AudioSample,bow_utils. AudioSamples,List,bow_utils. TactileSamples,bow_utils. TactileSample,List,bow_utils. ProprioceptionSample,bow_utils. MotorSample,bow_utils. StringSample,bow_utils. BlobSample,bow_utils. Int64Array,bow_utils. Float32Array,bow_utils. Command,str,List,List] sample)
Sends data on an open modality channel.
This sends a sample of data of the correct type over the open modality channel to the robot.
Parameters
-
modality_name
str: The name of the modality channel you wish to send data on. -
sample
bow_utils.MotorSample, bow_utils.AudioSamples, bow_utils.StringSample:
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful send. If error.Success is False you can inspect error.Description for more information.
public Tuple[Union[List[ImageSampleHelper], List[bow_utils.AudioSample], List[bow_utils.TactileSample], bow_utils.MotorSample, bow_utils.ProprioceptionSample, bow_utils.ExteroceptionSample, bow_utils.InteroceptionSample, bow_utils.StringSample, bow_utils.BlobSample, bow_utils.Float32Array, bow_utils.Int64Array, None], bow_utils.Error]
get_modality
(self,str modality_name,Optional blocking)
Reads data from an open modality channel.
This reads a data sample from the robot on the named open modality channel.
Parameters
-
modality_name
str: The name of the modality channel you wish to receive data on. -
blocking
bool: Optional parameter, if True, function will block until data is received from the robot.
Returns
bow_utils.ProprioceptionSample, bow_utils.ExteroceptionSample, bow_utils.InteroceptionSample, List[bow_utils.AudioSample], List[bow_utils.ImageSampleHelper], List[utils.TactileSample]: type depends on the chosen modality.
public bow_utils.Error
close_modality
(self,str modality_name)
Closes an open modality channel.
This closes the named open modality channel.
Parameters
modality_name
str: The name of the modality channel you wish to close.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful closure. If error.Success is False you can inspect error.Description for more information.
public bow_utils.Error
disconnect
(self)
Close the connection to the robot.
This closes the peer to peer connection between client and robot.
Returns
bow_utils.Error: Where error.Success is a boolean, True indicates a successful disconnection. If error.Success is False you can inspect error.Description for more information.
Generated by Moxygen