RobotSemantics
- class compas_fab.robots.RobotSemantics[source]
Bases:
Data
Represents semantic information of a robot.
The semantic model is based on the Semantic Robot Description Format (SRDF). Typically, the RobotSemantics objects are created from an SRDF file (using
from_srdf_file()
) or loaded by the backend client (usingcompas_fab.backends.PyBulletClient.load_semantics()
orcompas_fab.backends.RosClient.load_robot()
).- Parameters:
- robot_model
RobotModel
The robot model.
- groups
dict
of (str
,dict
of (links
list
ofstr
,joints
list
ofstr
)), optional A nested dictionary defining planning groups. The dictionary structure is as follows:
Level 1 keys are planning group names :
str
.Level 2 contains only two keys:
- main_group_name
str
, optional The name of the main group.
- passive_joints
list
ofstr
, optional A list of passive joint names.
- end_effectors
list
ofstr
, optional A list of end effector link names.
- disabled_collisions
tuple
of (str
,str
), optional A set of disabled collision pairs. The order is not important, i.e. the pair (‘link1’, ‘link2’) is the same as (‘link2’, ‘link1’). Only one pair is needed.
- group_statesdict, optional
A nested dictionary defining named states for a particular group, in terms of joint values. This is useful to define states such as “home” or “folded arms” for the robot. The dictionary structure is as follows:
- robot_model
- Attributes:
Methods
Create an instance of semantics based on an SRDF file path or file-like object.
Create an instance of semantics based on an SRDF string.
Create an instance of semantics based on an XML object.
Get all configurable
compas_robots.model.Joint
of the robot.Get the name of the first link (base link) in a planning group.
Get all the names of configurable joints of a planning group.
Get all configurable
compas_robots.model.Joint
of a planning group.Get the name of the last link (end effector link) in a planning group.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Validate the data against the object's data schema.