def __init__(self, options):
        Sensor.__init__(self)

        self.add_reader(options.clock, 'clock')
        self.add_reader(options.vcs, 'vcs_s')
        self.add_reader(options.compass, 'compass_s')
        self.add_reader(options.gps, 'gps_s')

        self.add_reader(options.command, 'driver_c')
        self.add_writer(options.status, 'driver_s', create=True)
        self.add_writer(options.jdriver, 'jdriver_s', create=True)

        self.write_once(options.command, self.driver_c, create=True)
        self.write_once(options.command + '_d', self.driver_c_doc,
                        create=True, write_always=True)
        self.write_once(options.status + '_d', self.driver_s_doc,
                        create=True, write_always=True)
Пример #2
0
    def __init__(self, options):
        Sensor.__init__(self)

        self.add_reader(options.clock, 'clock')
        self.add_reader(options.vcs, 'vcs_s')
        self.add_reader(options.compass, 'compass_s')
        self.add_reader(options.gps, 'gps_s')

        self.add_reader(options.command, 'driver_c')
        self.add_writer(options.status, 'driver_s', create=True)
        self.add_writer(options.jdriver, 'jdriver_s', create=True)
        self.add_reader(options.synlaser, 'synlaser_s')

        self.write_once(options.command, self.driver_c, create=True)
        self.write_once(options.command + '_d', self.driver_c_doc,
                        create=True, write_always=True)
        self.write_once(options.status + '_d', self.driver_s_doc,
                        create=True, write_always=True)
	self.waypoint = 0
	self.syntpointnum = 0
	self.syntpointdone='F'
	self.obs_found = 'F'
        self.obs_count = 0 
	self.manual_obs_count = 0
	self.counter ='turn_m'
	self.rounds=0
#GPS FOLLOWER
	self.course = [[1,39.181917,-86.5221208333,1.5,3.0],\
		    [2,39.1818975,-86.521724,1.5,3.0],\
                    [3,39.182143,-86.5217033333,1.5,3.0],\
                    [4,39.182199,-86.5220985,1.5,3.0],\
                    [5,39.1819156667,-86.522309,1.5,3.0],\
                    [6,39.1819645,-86.522398,1.5,3.0],\
                    [7,39.1820415,-86.5223095,1.5,3.0],\
                    [8,39.1821313333,-86.5223926667,1.5,3.0],\
                    [9,39.1822116667,-86.522302,1.5,3.0]]
	   
	self.syntpoint = []
	self.waypoint_latlon = []
	self.synt_latlon=[]