Example #1
0
    def __init__(self, dev_name, pan_id, tilt_id, baudrate=57600,
                 pan_speed = math.radians(180),
                 tilt_speed = math.radians(180)):
        self.pan_servo = rs.robotis_servo(dev_name,pan_id,baudrate,
                                          max_speed = pan_speed)
        self.tilt_servo = rs.robotis_servo(dev_name,tilt_id,baudrate,
                                           max_speed = tilt_speed)

        self.max_pan = self.pan_servo.max_ang
        self.min_pan = self.pan_servo.min_ang

        self.max_tilt = self.tilt_servo.max_ang
        self.min_tilt = self.tilt_servo.min_ang
Example #2
0
    def __init__(self, dev_name, servo_id, hokuyo, baudrate=57600, l1=0.,l2=0.035, camera_name=None):
        ''' dev_name - name of serial device of the servo controller (e.g. '/dev/robot/servo0')
            servo_id - 2,3,4 ... (2 to 253)
            hokuyo - Hokuyo object.
            baudrate - for the servo controller.
            camera_name - name of the 
        '''
        self.servo = rs.robotis_servo(dev_name,servo_id,baudrate)

        self.hokuyo = hokuyo
        self.l1 = l1
        self.l2 = l2