C++
Bow Client

Summary

MembersDescriptions
namespace bow_sdk

namespace bow_sdk

Summary

MembersDescriptions
class bow_sdk::bow_robotThe Robot class.
class bow_sdk::client_sdk

class bow_sdk::bow_robot

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

MembersDescriptions
public char * robot_id
public bow::robot::Robot * robot_details
public inline bow_robot(bow::robot::Robot * chosen_robot)The Robot class initialiser.
public inline bow_robot()
public bow::common::Error * Connect()Starts a connection with the robot.
public bow::common::Error * OpenModality(std::string modality_name)Opens a channel for the given modality.
public bow::common::Error * SetModality(std::string modality_name,int dtype,google::protobuf::Message * sample)Sends data on an open modality channel.
public bow::sdk::GetModalityProto * GetModality(std::string modality_name,bool blocking)Reads data from an open modality channel.
public bow::common::Error * CloseModality(std::string modality_name)Closes an open modality channel.
public bow::common::Error * Disconnect()Close the connection to the robot.

Members

public char * robot_id

public bow::robot::Robot * robot_details

public inline bow_robot(bow::robot::Robot * chosen_robot)

The Robot class initialiser.

The constructor accepts the robot details obtained from get_robots()

Parameters

  • robot_details bow_utils.GetRobotsProtoReply.robots[]: Obtained from get_robots().

public inline bow_robot()

public bow::common::Error * Connect()

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

*animus::common::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::common::Error * OpenModality(std::string 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

*animus::common::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::common::Error * SetModality(std::string modality_name,int dtype,google::protobuf::Message * 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 bow::sdk::GetModalityProto * GetModality(std::string modality_name,bool 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, List[bow_utils.AudioSample], List[bow_utils.ImageSampleHelper], List[utils.TactileSample]: type depends on the chosen modality.

public bow::common::Error * CloseModality(std::string 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::common::Error * Disconnect()

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.

class bow_sdk::client_sdk

Summary

MembersDescriptions

Members

Generated by Moxygen (opens in a new tab)