1from typing
import NoReturn
2from numpy
import ndarray
3from .iCub_Interface
import ANNiCub_wrapper
9 def __init__(cls, *args, **kwargs) -> None: ...
11 def close(self, iCub: ANNiCub_wrapper) -> NoReturn:
12 """Close joint reader with cleanup
16 iCub : ANNiCub_wrapper
17 main interface wrapper
26 """Return the number of controlled joints
34 int: return number of joints, being controlled by the reader
39 """Return the resolution in degree of the populations encoding the joint angles
47 NDarray (vector[double]): return vector, containing the resolution for every joints population coding in degree
52 """Return the size of the populations encoding the joint angles
60 NDarray (vector[int]): return vector, containing the population size for every joint
64 def init(self, iCub: ANNiCub_wrapper, name: str, part: str, sigma: float,
65 n_pop: int, degr_per_neuron: float = ..., ini_path: str = ...) -> bool:
66 """Initialize the joint reader with given parameters.
70 iCub : ANNiCub_wrapper
71 main interface wrapper
73 name for the joint reader module
75 string representing the robot part, has to match iCub part naming {left_(arm/leg), right_(arm/leg), head, torso}
77 sigma for the joints angles populations coding
79 number of neurons per population, encoding each one joint angle only works if parameter "deg_per_neuron" is not set
80 degr_per_neuron : double
81 degree per neuron in the populations, encoding the joints angles
82 if set: population size depends on joint working range. (Default value = 0.0)
84 Path to the "interface_param.ini"-file. (Default value = "../data/")
89 return True, if successful
94 def init_grpc(self, iCub: ANNiCub_wrapper, name: str, part: str, sigma: float, n_pop: int,
95 degr_per_neuron: float = ..., ini_path: str = ..., ip_address: str = ..., port: int = ...) -> bool:
96 """Initialize the joint reader with given parameters, including the gRPC based connection.
100 iCub : ANNiCub_wrapper
101 main interface wrapper
103 name for the joint reader module
105 string representing the robot part, has to match iCub part naming {left_(arm/leg), right_(arm/leg), head, torso}
107 sigma for the joints angles populations coding
109 number of neurons per population, encoding each one joint angle only works if parameter "deg_per_neuron" is not set
110 degr_per_neuron : double
111 degree per neuron in the populations, encoding the joints angles
112 if set: population size depends on joint working range. (Default value = 0.0)
114 Path to the "interface_param.ini"-file. (Default value = "../data/")
116 gRPC server ip address. (Default value = "0.0.0.0")
118 gRPC server port. (Default value = 50005)
123 return True, if successful
129 """Read all joints and return joint angles directly as double values
136 NDarray : vector[double]
137 joint angles read from the robot; empty vector at error
142 """Read multiple joints and return joint angles directly as double value.
146 joints : list (vector[int]
147 joint numbers of the robot part
151 NDarray : vector[double]
152 joint angle read from the robot; empty vector at error
157 """Read one joint and return joint angle directly as double value.
162 joint number of the robot part
167 joint angle read from the robot; NAN at error
172 """Read all joints and return the joint angles encoded in vectors (population coding)
179 NDarray : vector[vector[double]]
180 population vectors encoding every joint angle from associated robot part
185 """Read multiple joints and return the joint angles encoded in vectors (population coding).
189 joints : list (vector[int]
190 joint numbers of the robot part
194 NDarray : vector[vector[double]]
195 population vectors encoding selected joint angles from associated robot part
200 """Read one joint and return the joint angle encoded in a vector (population coding).
205 joint number of the robot part
209 NDarray : vector[double]
210 population vector encoding the joint angle
ndarray read_double_one(self, int joint)
ndarray read_pop_multiple(self, joints)
ndarray read_double_multiple(self, joints)
bool init_grpc(self, ANNiCub_wrapper iCub, str name, str part, float sigma, int n_pop, float degr_per_neuron=..., str ini_path=..., str ip_address=..., int port=...)
bool init(self, ANNiCub_wrapper iCub, str name, str part, float sigma, int n_pop, float degr_per_neuron=..., str ini_path=...)
ndarray read_pop_one(self, int joint)
ndarray get_neurons_per_joint(self)
NoReturn close(self, ANNiCub_wrapper iCub)
int get_joint_count(self)
ndarray read_pop_all(self)
ndarray read_double_all(self)
None __init__(cls, *args, **kwargs)
ndarray get_joints_deg_res(self)