BaseConfiguration¶
-
class
compas_fab.fab.robots.
BaseConfiguration
[source]¶ Bases:
object
Represents the configuration of a robot based on its joint angle values and external axes values (if any).
Examples
>>> from compas_fab.fab.robots import BaseConfiguration >>> config = BaseConfiguration.from_data({'joint_values': [90., 0., 0.]}) >>> config.joint_values [90.0, 0.0, 0.0]
>>> from compas_fab.fab.robots import BaseConfiguration >>> config = BaseConfiguration.from_data({'joint_values': [90., 0., 0., 0., 180., 45.], 'external_axes': [8312.0]}) >>> str(config) 'joints: [90.0, 0.0, 0.0, 0.0, 180.0, 45.0], external_axes: [8312.0]'
-
data
¶ dict
– The data representing the configuration.By assigning a data dict to this property, the current data of the configuration will be replaced by the data in the dict. The data getter and setter should always be used in combination with each other.
-
classmethod
from_data
(data)[source]¶ Construct a configuration from its data representation.
Parameters: data (dict) – The data dictionary. Returns: Configuration – A Configuration
instance.
-
classmethod
from_joints
(joint_values)[source]¶ Construct a configuration from joint values.
Parameters: joint_values ( list
offloat
) – Joint values expressed in degrees.Returns: Configuration – A Configuration
instance.
-
classmethod
from_joints_and_external_axes
(joint_values, external_axes=None)[source]¶ Construct a configuration from joint values and external axes values.
Parameters: Returns: Configuration – A
Configuration
instance.
-