RobotSemantics.from_srdf_file

classmethod RobotSemantics.from_srdf_file(file, robot_model)[source]

Create an instance of semantics based on an SRDF file path or file-like object.

Parameters:
filestr

The path to the SRDF file.

robot_modelcompas_robots.RobotModel

The robot model is needed when loading the semantics.

Examples

>>> from compas_robots import RobotModel
>>> urdf_filename = compas_fab.get("robot_library/ur5_robot/urdf/robot_description.urdf")
>>> srdf_filename = compas_fab.get("robot_library/ur5_robot/robot_description_semantic.srdf")
>>> robot_model = RobotModel.from_urdf_file(urdf_filename)
>>> semantics = RobotSemantics.from_srdf_file(srdf_filename, robot_model)
>>> print(semantics.main_group_name)
manipulator