Native Network module

rapyuta.io provides a way to establish robot to robot communication without using brokered solution in a local network. The main purpose of native network is to give the same communication mechanism as present in a single shared ROS master.

Client Module

class Client(auth_token, project=None)

Client class provides access to device, package, volume and deployment classes.

__init__(auth_token, project=None)

Get new client object

Parameters
  • auth_token (string) – Authentication token

  • project (string) – project_guid of the user

create_native_network(native_network)

Creates a new native network

Parameters

native_network (NativeNetwork) – Native Network object

Return type

NativeNetwork

Following example demonstrates how to create a native network under a project
>>> from rapyuta_io import Client
>>> from rapyuta_io.clients.native_network import NativeNetwork,Parameters,NativeNetworkLimits
>>> from rapyuta_io.clients.package import Runtime, ROSDistro
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> parameters = Parameters(NativeNetworkLimits.SMALL)
>>> native_network = NativeNetwork('native_network_name', Runtime.CLOUD, ROSDistro.KINETIC,
...                                  parameters=parameters)
>>> native_network = client.create_native_network(native_network)
delete_native_network(network_guid)

Delete a native network using its network_guid

Parameters

network_guid (str) – Native Network GUID

Following example demonstrates how to delete a native network under a project
>>> from rapyuta_io import Client
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.delete_native_network('network_guid')
get_native_network(network_guid)

Get a native network using its network_guid

Parameters

network_guid (str) – native network GUID

Return type

NativeNetwork

Following example demonstrates how a native network can be fetched using this method

>>> from rapyuta_io import Client
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.get_native_network('network_guid')
list_native_networks()

Lists all the native networks under a project

Returns

A list of all available native networks under the Project.

Return type

List(NativeNetwork)

Following example demonstartes how to list all the native networks under a project

>>> from rapyuta_io import Client
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.list_native_networks()

Native Network Module

class NativeNetwork(name, runtime, ros_distro, parameters=None)

NativeNetwork represents native network

Variables
  • name (str) – name of the native network

  • runtime (Runtime) – runtime of the native network

  • ros_distro (ROSDistro) – ROS distribution

  • parameters (Parameters) – parameters of the native network

  • created_at (str) – creation time of the native network

  • updated_at (str) – updating time of the native network

  • guid (str) – native network guid

  • owner_project (str) – project id

  • creator (str) – user id

  • internal_deployment_guid (str) – guid of the internal deployment

  • internal_deployment_status (InternalDeploymentStatus) – internal deployment status of the native network

Parameters
  • name (str) – name of the native network

  • runtime (Runtime) – runtime of the native network

  • ros_distro (ROSDistro) – ROS distribution

  • parameters (Parameters) – parameters of the native network

class NativeNetworkLimits

NativeNetworkLimits may be one of:

NativeNetworkLimits.X_SMALL (cpu: 0.1core, memory: 1GB)

NativeNetworkLimits.SMALL (cpu: 1core, memory: 4GB)

NativeNetworkLimits.MEDIUM (cpu: 2cores, memory: 8GB)

NativeNetworkLimits.LARGE (cpu: 4cores, memory: 16GB)

class Parameters(limits)

Parameters represents Native Network Parameters

Variables

limits (NativeNetworkLimits) – Values corresponding to limits of the parameters

Parameters

limits (NativeNetworkLimits) – Values corresponding to limits of the parameters