ANNarchy iCub Interface 1.1.1
Loading...
Searching...
No Matches
Joint_Reader.pyi
1from typing import NoReturn
2from numpy import ndarray
3from .iCub_Interface import ANNiCub_wrapper
4
5
7 """ """
8 @classmethod
9 def __init__(cls, *args, **kwargs) -> None: ...
10
11 def close(self, iCub: ANNiCub_wrapper) -> NoReturn:
12 """Close joint reader with cleanup
13
14 Parameters
15 ----------
16 iCub : ANNiCub_wrapper
17 main interface wrapper
18
19 Returns
20 -------
21
22 """
23 ...
24
25 def get_joint_count(self) -> int:
26 """Return the number of controlled joints
27
28 Parameters
29 ----------
30
31 Returns
32 -------
33 type
34 int: return number of joints, being controlled by the reader
35 """
36 ...
37
38 def get_joints_deg_res(self) -> ndarray:
39 """Return the resolution in degree of the populations encoding the joint angles
40
41 Parameters
42 ----------
43
44 Returns
45 -------
46 type
47 NDarray (vector[double]): return vector, containing the resolution for every joints population coding in degree
48 """
49 ...
50
51 def get_neurons_per_joint(self) -> ndarray:
52 """Return the size of the populations encoding the joint angles
53
54 Parameters
55 ----------
56
57 Returns
58 -------
59 type
60 NDarray (vector[int]): return vector, containing the population size for every joint
61 """
62 ...
63
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.
67
68 Parameters
69 ----------
70 iCub : ANNiCub_wrapper
71 main interface wrapper
72 name : str
73 name for the joint reader module
74 part : str
75 string representing the robot part, has to match iCub part naming {left_(arm/leg), right_(arm/leg), head, torso}
76 sigma : double
77 sigma for the joints angles populations coding
78 n_pop : unsigned int
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)
83 ini_path : str
84 Path to the "interface_param.ini"-file. (Default value = "../data/")
85
86 Returns
87 -------
88 bool
89 return True, if successful
90
91 """
92 ...
93
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.
97
98 Parameters
99 ----------
100 iCub : ANNiCub_wrapper
101 main interface wrapper
102 name : str
103 name for the joint reader module
104 part : str
105 string representing the robot part, has to match iCub part naming {left_(arm/leg), right_(arm/leg), head, torso}
106 sigma : double
107 sigma for the joints angles populations coding
108 n_pop : unsigned int
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)
113 ini_path : str
114 Path to the "interface_param.ini"-file. (Default value = "../data/")
115 ip_address : str
116 gRPC server ip address. (Default value = "0.0.0.0")
117 port : unsigned int
118 gRPC server port. (Default value = 50005)
119
120 Returns
121 -------
122 bool
123 return True, if successful
124
125 """
126 ...
127
128 def read_double_all(self) -> ndarray:
129 """Read all joints and return joint angles directly as double values
130
131 Parameters
132 ----------
133
134 Returns
135 -------
136 NDarray : vector[double]
137 joint angles read from the robot; empty vector at error
138 """
139 ...
140
141 def read_double_multiple(self, joints) -> ndarray:
142 """Read multiple joints and return joint angles directly as double value.
143
144 Parameters
145 ----------
146 joints : list (vector[int]
147 joint numbers of the robot part
148
149 Returns
150 -------
151 NDarray : vector[double]
152 joint angle read from the robot; empty vector at error
153 """
154 ...
155
156 def read_double_one(self, joint: int) -> ndarray:
157 """Read one joint and return joint angle directly as double value.
158
159 Parameters
160 ----------
161 joint : int
162 joint number of the robot part
163
164 Returns
165 -------
166 double
167 joint angle read from the robot; NAN at error
168 """
169 ...
170
171 def read_pop_all(self) -> ndarray:
172 """Read all joints and return the joint angles encoded in vectors (population coding)
173
174 Parameters
175 ----------
176
177 Returns
178 -------
179 NDarray : vector[vector[double]]
180 population vectors encoding every joint angle from associated robot part
181 """
182 ...
183
184 def read_pop_multiple(self, joints) -> ndarray:
185 """Read multiple joints and return the joint angles encoded in vectors (population coding).
186
187 Parameters
188 ----------
189 joints : list (vector[int]
190 joint numbers of the robot part
191
192 Returns
193 -------
194 NDarray : vector[vector[double]]
195 population vectors encoding selected joint angles from associated robot part
196 """
197 ...
198
199 def read_pop_one(self, joint: int) -> ndarray:
200 """Read one joint and return the joint angle encoded in a vector (population coding).
201
202 Parameters
203 ----------
204 joint : int
205 joint number of the robot part
206
207 Returns
208 -------
209 NDarray : vector[double]
210 population vector encoding the joint angle
211 """
212 ...
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=...)
NoReturn close(self, ANNiCub_wrapper iCub)