« first day (617 days earlier)      last day (2739 days later) » 

7:58 AM
import time, threading, serial
#from robot import Robot

range_data = 10

class Serial():
def __init__(self):
#self.port=serial.Serial(port='/dev/ttyAMA0',baudrate =115200,parity=serial.PARITY_NONE,bytesize=serial.EIGHTBITS,timeout = 1)
self.Lock = threading.Lock()
self.update = 10
def Read_serial(self):
global range_data
self.Lock.acquire()
try:
global range_data
# print 'Read Lock acquire.'
# range_data = 19
#self.update+=1
range_data += 1
# if self.port.inWaiting()>0:
# range_data=self.port.readline()
from math import *
from pose import *
from models.serial import *

class ProximitySensor:
    def __init__(self, robot, placement_pose):
        self.serial = Serial()
        print "ProximitySensor"
        # bind the robot
        self.robot = robot

        # pose attributes
        self.placement_pose = placement_pose  # pose of this sensor relative to the robot
        self.pose = Pose(0.0, 0.0, 0.0)  # global pose of this sensor

        # set initial position
        self.update_position()
from math import *
from pose import *
from models.serial import *

class ProximitySensor:
    def __init__(self, robot, placement_pose):
        self.serial = Serial()
        print "ProximitySensor"
        # bind the robot
        self.robot = robot

        # pose attributes
        self.placement_pose = placement_pose  # pose of this sensor relative to the robot
        self.pose = Pose(0.0, 0.0, 0.0)  # global pose of this sensor

        # set initial position
        self.update_position()
 
8:20 AM
2 messages moved from Python
1 message moved from Python
 

« first day (617 days earlier)      last day (2739 days later) »