Beispiel #1
0
    def get_mass(self) -> float:
        """Gets the mass of the shape.

        :return: A float representing the mass.
        """
        return vrep.simGetObjectFloatParameter(self._handle,
                                               vrep.sim_shapefloatparam_mass)
Beispiel #2
0
    def get_far_clipping_plane(self) -> float:
        """ Get the Sensor's far clipping plane.

        :return: Near clipping plane (metres)
        """
        return vrep.simGetObjectFloatParameter(
            self._handle, vrep.sim_visionfloatparam_far_clipping)
Beispiel #3
0
    def get_joint_upper_velocity_limit(self) -> float:
        """Gets the joints upper velocity limit.

        :return: The upper velocity limit.
        """
        return vrep.simGetObjectFloatParameter(
            self._handle, vrep.sim_jointfloatparam_upper_limit)
Beispiel #4
0
    def get_orthographic_size(self) -> float:
        """ Get the Sensor's orthographic size.

        :return: The sensor's orthographic size (in metres).
        """
        return vrep.simGetObjectFloatParameter(
            self._handle, vrep.sim_visionfloatparam_ortho_size)
Beispiel #5
0
    def get_joint_velocity(self) -> float:
        """Get the current joint velocity.

        :return: Velocity of the joint (linear or angular velocity depending
            on the joint-type).
        """
        return vrep.simGetObjectFloatParameter(
            self._handle, vrep.sim_jointfloatparam_velocity)
Beispiel #6
0
    def get_perspective_angle(self) -> float:
        """ Get the Sensor's perspective angle.

        :return: The sensor's perspective angle (in degrees).
        """
        return math.degrees(
            vrep.simGetObjectFloatParameter(
                self._handle, vrep.sim_visionfloatparam_perspective_angle))
Beispiel #7
0
    def get_bounding_box(self) -> List[float]:
        """Gets the bounding box (relative to the object reference frame).

        :return: A list containing the min x, max x, min y, max y, min z, max z
            positions.
        """
        params = [vrep.sim_objfloatparam_objbbox_min_x,
                  vrep.sim_objfloatparam_objbbox_max_x,
                  vrep.sim_objfloatparam_objbbox_min_y,
                  vrep.sim_objfloatparam_objbbox_max_y,
                  vrep.sim_objfloatparam_objbbox_min_z,
                  vrep.sim_objfloatparam_objbbox_max_z]
        return [vrep.simGetObjectFloatParameter(
            self._handle, p) for p in params]
Beispiel #8
0
    def get_model_bounding_box(self) -> List[float]:
        """Gets the models bounding box (relative to models reference frame).

        :raises: ObjectIsNotModel if the object is not a model.
        :return: A list containing the min x, max x, min y, max y, min z, max z
            positions.
        """
        self._check_model()
        params = [vrep.sim_objfloatparam_modelbbox_min_x,
                  vrep.sim_objfloatparam_modelbbox_max_x,
                  vrep.sim_objfloatparam_modelbbox_min_y,
                  vrep.sim_objfloatparam_modelbbox_max_y,
                  vrep.sim_objfloatparam_modelbbox_min_z,
                  vrep.sim_objfloatparam_modelbbox_max_z]
        return [vrep.simGetObjectFloatParameter(
            self._handle, p) for p in params]