Exemple #1
0
    def set_dynamic(self, value: bool) -> None:
        """Set whether the shape is dynamic or not.

        :param value: The new value of the dynamic state of the shape.
        """
        vrep.simSetObjectInt32Parameter(
            self._handle, vrep.sim_shapeintparam_static, not value)
        self.reset_dynamic_object()
Exemple #2
0
    def set_motor_enabled(self, value: bool) -> None:
        """Sets whether the motor is enable.

        :param value: The new value for the motor state.
        """
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_jointintparam_motor_enabled,
                                        value)
Exemple #3
0
    def set_respondable(self, value: bool) -> None:
        """Set whether the shape is respondable or not.

        :param value: The new value of the respondable state of the shape.
        """
        vrep.simSetObjectInt32Parameter(
            self._handle, vrep.sim_shapeintparam_respondable, value)
        self.reset_dynamic_object()
Exemple #4
0
    def set_control_loop_enabled(self, value: bool) -> None:
        """Sets whether the control loop is enable.

        :param value: The new value for the control loop state.
        """
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_jointintparam_ctrl_enabled,
                                        value)
Exemple #5
0
    def set_perspective_mode(self, perspective_mode: PerspectiveMode) -> None:
        """ Set the Sensor's perspective mode.

        :param perspective_mode: The new perspective mode, one of:
            PerspectiveMode.ORTHOGRAPHIC
            PerspectiveMode.PERSPECTIVE
        """
        vrep.simSetObjectInt32Parameter(
            self._handle, vrep.sim_visionintparam_perspective_mode,
            perspective_mode.value)
Exemple #6
0
    def set_motor_locked_at_zero_velocity(self, value: bool) -> None:
        """Set if the motor is locked when target velocity is zero.

        When enabled in velocity mode and its target velocity is zero, then the
        joint is locked in place.

        :param value: If the motor should be locked at zero velocity.
        """
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_jointintparam_velocity_lock,
                                        value)
Exemple #7
0
    def set_resolution(self, resolution: List[int]) -> None:
        """ Set the Sensor's resolution.

        :param resolution: New resolution [x, y]
        """
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_visionintparam_resolution_x,
                                        resolution[0])
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_visionintparam_resolution_y,
                                        resolution[1])
        self.resolution = resolution
Exemple #8
0
    def set_render_mode(self, render_mode: RenderMode) -> None:
        """ Set the Sensor's rendering mode

        :param render_mode: The new sensor rendering mode, one of:
            RenderMode.OPENGL
            RenderMode.OPENGL_AUXILIARY
            RenderMode.OPENGL_COLOR_CODED
            RenderMode.POV_RAY
            RenderMode.EXTERNAL
            RenderMode.EXTERNAL_WINDOWED
            RenderMode.OPENGL3
            RenderMode.OPENGL3_WINDOWED
        """
        vrep.simSetObjectInt32Parameter(self._handle,
                                        vrep.sim_visionintparam_render_mode,
                                        render_mode.value)