ctu_bosch_sr450 =============== .. py:module:: ctu_bosch_sr450 Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ctu_bosch_sr450/basler_camera/index /autoapi/ctu_bosch_sr450/circle_circle_intersection/index /autoapi/ctu_bosch_sr450/robot_bosch/index Classes ------- .. autoapisummary:: ctu_bosch_sr450.RobotBosch Package Contents ---------------- .. py:class:: RobotBosch(tty_dev = '/dev/mars', baudrate = 19200) RobotBosch is a class representing the Bosch SR450 robot. It has access to the robot's control unit and basic kinematics functions. .. py:attribute:: _mars .. py:attribute:: link_lengths .. py:attribute:: _z_offset :value: 0.5 .. py:attribute:: _motors_ids :value: 'ABCD' .. py:attribute:: _REGPWRON :value: 1 .. py:attribute:: _REGPWRFLG :value: 5 .. py:attribute:: _REGCFG :value: [1498, 1498, 1370, 1498] .. py:attribute:: _REGME :value: [30000, 16000, 16000, 16000] .. py:attribute:: _REGP :value: [50, 50, 50, 50] .. py:attribute:: _REGI :value: [5, 5, 5, 5] .. py:attribute:: _REGD :value: [50, 50, 50, 50] .. py:attribute:: _IDLEREL :value: 0 .. py:attribute:: _q_to_q_irc .. py:attribute:: q_min .. py:attribute:: q_max .. py:attribute:: q_home .. py:attribute:: _min_speed_irc256_per_ms .. py:attribute:: _max_speed_irc256_per_ms .. py:attribute:: _default_speed_irc256_per_ms .. py:attribute:: _min_acceleration_irc_per_ms .. py:attribute:: _max_acceleration_irc_per_ms .. py:attribute:: _default_acceleration_irc_per_ms .. py:attribute:: _initialized :value: False .. py:attribute:: _camera :type: ctu_bosch_sr450.basler_camera.BaslerCamera | None :value: None .. py:method:: grab_image(timeout=10000) .. py:method:: release() Release errors and reset control unit. .. py:method:: reset_motors() Reset motors of robot. .. py:method:: close() Close connection to the robot. .. py:method:: initialize(home = True) Initialize communication with robot and set all necessary parameters. This command will perform following settings: - synchronize communication with mars control unit - send command to power motors, wait for user to power them - reset motors and wait for them to be ready - set PID control parameters, maximum speed and acceleration - set value for IDLE release - perform hard home and soft home, if @param home is True .. py:method:: _joint_values_to_irc(joint_values) Convert joint values [rad,m] to IRC. .. py:method:: _irc_to_joint_values(irc) Convert IRC to joint values [rad,m]. .. py:method:: set_speed(speed_irc256_ms) Set speed for each motor in IRC*256/msec. .. py:method:: set_speed_relative(fraction) Set speed for each motor in fraction (0-1) of maximum speed. .. py:method:: set_acceleration(acceleration_irc_ms) Set acceleration for each motor in IRC/msec. .. py:method:: set_acceleration_relative(fraction) Set acceleration for each motor in fraction (0-1) of maximum acceleration. .. py:method:: hard_home() Perform hard home of the robot s.t. prismatic joint is homed first followed by joint A, B, and D. The speed is reset to default value before homing. .. py:method:: soft_home() Move robot to the home position using coordinated movement. .. py:method:: move_to_q(q) Move robot to the given joint configuration using coordinated movement. The soft_home needs to be called before to set up coordinate movements. .. py:method:: get_q() Get current joint configuration. .. py:method:: in_motion() Return whether the robot is in motion. .. py:method:: wait_for_motion_stop() Wait until the robot stops moving. .. py:method:: in_limits(q) Return whether the given joint configuration is in joint limits. .. py:method:: fk(q) Compute forward kinematics for the given joint configuration @param q. The output is (x,y,z,phi) where x,y,z are position of the end-effector w.r.t. the base frame and phi is the orientation around z-axis of the end-effector w.r.t. the base. .. py:method:: ik_xyz(x, y, z = 0, q3 = 0) Compute IK s.t. the end-effector is at the given position w.r.t. the reference frame. The last joint value is set to the given fixed value. It does not influence solution of IK, it is just passed to the output. Internally, :param x and :param y are used to compute first and second (revolute) joint values. The :param z is used to compute third (prismatic) joint value. Return all solutions that are in joint limits. .. py:method:: ik(x, y, z = 0.0, phi = 0) Compute IK s.t. the end-effector is at the given position w.r.t. the reference frame. Internally xyz is computed by ik_xyz function for all possible tool orientation (phi). Return all solutions that are in joint limits. If no solution exists, return empty list.