ctu_mitsubishi.rv6s =================== .. py:module:: ctu_mitsubishi.rv6s Classes ------- .. autoapisummary:: ctu_mitsubishi.rv6s.Rv6s Module Contents --------------- .. py:class:: Rv6s(port='/dev/ttyUSB_Robot', baudrate=38400, debug=False) .. py:attribute:: _debug :value: False .. py:attribute:: _connection .. py:attribute:: _initialized :value: False .. py:attribute:: q_home .. py:attribute:: q_min .. py:attribute:: q_max .. py:attribute:: dh_theta_off .. py:attribute:: dh_a .. py:attribute:: dh_d .. py:attribute:: dh_alpha .. py:attribute:: _last_q :value: None .. py:attribute:: _camera :type: ctu_mitsubishi.basler_camera.BaslerCamera | None :value: None .. py:method:: __del__() Stop robot and close the connection to the robot's control unit. .. py:method:: grab_image(timeout=10000) .. py:method:: close_connection() Close the connection to the robot's control unit. .. py:method:: stop_robot() Stop the robot and perform a safe shutdown. .. py:method:: _send_and_receive(msg) Send a message to the robot and return the response. .. py:method:: initialize() Performs robot initialization. .. py:method:: get_q() Get current joint configuration [rad]. .. py:method:: move_to_q(q) Move robot to the given joint configuration [rad] using coordinated movement. Initialization has be called before to set up the robot. .. py:method:: soft_home() Move robot to the home position using move to q function. .. py:method:: in_limits(q) Return whether the given joint configuration is in joint limits. .. py:method:: _rx(angle) :staticmethod: Return SE3 transformation that rotates around x-axis. .. py:method:: _ry(angle) :staticmethod: Return SE3 transformation that rotates around x-axis. .. py:method:: _rz(angle) :staticmethod: Return SE3 transformation that rotates around z-axis. .. py:method:: _t(tx = 0.0, ty = 0.0, tz = 0.0) :staticmethod: Return SE3 transformation that translates along x-axis. .. py:method:: dh_to_se3(d, theta, a, alpha) :staticmethod: Compute SE3 matrix from DH parameters. .. py:method:: fk(q) Compute forward kinematics for the given joint configuration [rad]. Return pose of the end-effector in the base frame. Homogeneous transformation matrix (4x4) is returned. The pose represents the flange pose w.r.t. base of the robot. .. py:method:: _ik_5th_joint_pos(position) Compute inverse kinematics for the given position of the 5th joint (flange w.r.t. base) in the base frame. Return list of joint configurations [rad] for the first three joints. .. py:method:: ik(pose) Compute inverse kinematics for the given pose of the end-effector (flange w.r.t. base) in the base frame. Homogeneous transformation matrix (4x4) is expected. Only in limits solutions are returned. Return list of joint configurations [rad]. .. py:method:: rotation_matrix_to_euler_zyz(R) :staticmethod: Extract Euler angles (ZYZ convention) from a rotation matrix. :param R: 3x3 rotation matrix. :type R: ndarray :returns: Euler angles (alpha, beta, gamma) in radians. :rtype: two solutions, 2 tuples .. py:method:: wait_for_motion_stop(timeout = 10, poll_interval = 0.1, tol = 0.0087) Wait for the robot to stop moving. :param timeout: Maximum time to wait for the robot to stop moving. :param poll_interval: Time between checking the robot's state. :param tol: Tolerance for the robot's joint positions to be considered stopped [rad]. :returns: True if the robot has stopped moving in a given time, False otherwise.