class adam_sim.entities.configuration.Configuration(q1: float, q2: float, q3: float, q4: float, q5: float, q6: float)

the Configuration class is a NamedTuple that contains the values of the joint angles. Unit: rad

Notes

the Configuration class supports addition, subtraction, division and multiplication

Attributes:
q1float

the value of the first joint

q2float

the value of the second joint

q3float

the value of the third joint

q4float

the value of the fourth joint

q5float

the value of the fifth joint

q6float

the value of the sixth joint

Methods

to_degrees(self) -> ~.entities.Configuration

converts a configuration instance from radians to degrees

to_radians(self) -> ~.entities.Configuration

converts a configuration instance from degrees to radians

round(self, ndigits: int) -> ~.entities.Configuration

rounds a configuration instance to a given number of digits

to_numpy(self) -> np.ndarray

converts a configuration instance to a numpy array

to_list(self) -> list[float]

converts a configuration instance to a list

to_yaml(self) -> str

converts a configuration instance to a yaml string

from_yaml(self, yaml_string: str) -> ~.entities.Configuration

converts a yaml string to a configuration instance

from_numpy(self, array: np.ndarray) -> ~.entities.Configuration

converts a numpy array to a configuration instance

from_list(self, list: list[float]) -> ~.entities.Configuration

converts a list to a configuration instance

classmethod from_list(list: list) Configuration

converts a list to a Configuration instance

Parameters:
listlist

the list to convert

Returns:
~.entities.Configuration

the Configuration instance

classmethod from_numpy(array: ndarray) Configuration

converts a numpy array to a Configuration instance

Parameters:
arraynp.ndarray

the numpy array to convert

Returns:
~.entities.Configuration

the Configuration instance

classmethod from_yaml(yaml_string: str) Configuration

converts a yaml string to a Configuration instance

Parameters:
yaml_stringstr

the yaml string to convert

Returns:
~.entities.Configuration

the Configuration instance

q1: float

Alias for field number 0

q2: float

Alias for field number 1

q3: float

Alias for field number 2

q4: float

Alias for field number 3

q5: float

Alias for field number 4

q6: float

Alias for field number 5

round(n: int = 4) Configuration

rounds the instance to n decimal places

Parameters:
nint, optional

the number of decimal places to round to. Default: 4

Returns:
~.entities.Configuration

the rounded instance

to_degrees() Configuration

converts the instance from radians to degrees

Returns:
~.entities.Configuration

the instance in degrees

to_list() list

converts the instance to a list

Returns:
list

the list representation of the instance

to_numpy() ndarray

converts the instance to a numpy array

Returns:
np.ndarray

the numpy array representation of the instance

to_radians() Configuration

converts the instance from degrees to radians

Returns:
~.entities.Configuration

the instance in radians

to_yaml() str

converts the instance to a yaml string

Returns:
str

the yaml string representation of the instance