Ejemplo n.º 1
0
    def from_urdf_file(cls, file):
        """Construct a robot model from a URDF file model description.

        Args:
            file: file name or file object.

        Returns:
            A robot model instance.
        """
        urdf = URDF.from_file(file)
        return urdf.robot
Ejemplo n.º 2
0
    def from_urdf_file(cls, file):
        """Construct a robot model from a URDF file model description.

        Parameters
        ----------
        file:
            file name or file object.

        Returns
        -------
        A robot model instance.

        Examples
        --------
        >>> model = RobotModel.from_urdf_file(ur5_urdf_file)
        >>> print(model)
        Robot name=ur5, Links=11, Joints=10 (6 configurable)
        """
        urdf = URDF.from_file(file)
        return urdf.robot
Ejemplo n.º 3
0
    def from_urdf_file(cls, file):
        """Construct a robot model from a URDF file model description.

        Parameters
        ----------
        file : str | file
            File path or file-like object.

        Returns
        -------
        :class:`compas.robots.RobotModel`
            A robot model instance.

        Examples
        --------
        >>> robot = RobotModel.ur5()
        >>> print(robot)
        Robot name=ur5, Links=11, Joints=10 (6 configurable)

        """
        urdf = URDF.from_file(file)
        return urdf.robot