Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Make drive loop easier to innovate by changing vehicle model. #6

Closed
wroscoe opened this issue Dec 26, 2016 · 0 comments
Closed

Comments

@wroscoe
Copy link
Collaborator

wroscoe commented Dec 26, 2016

"""
Proposed Refactor: 
The current platform design does not leave room to change/innovate
the drive loop. This an alternative way to define the drive loop
using modular components and shared variables. It borrows from
the design of Keras and ROS.

"""



#Local Car

    V = Vehicle()

    V.data = ['img',  		#image from camera
    			'c_angle',		#control angle (from user)
    			'c_throttle',
    			'c_drive_mode',
    			'p_angle', 
    			'p_throttle',
    			'a_angle',
    			'a_throttle',

    V.add(WebMonitor(), 
    		output='c_angle', 'c_throttle', 'c_drive_mode')
    
    V.add(PiCamera(), 
    		output='img')

    V.add(CNN(), 
    		input=['img', 'a_angle', 'a_throttle'],
    		output=['p_angle', 'p_throttle'])
    

    V.add(DriveLogic(), 
    		input=['c_angle', 'c_throttle', 'c_drive_mode', 
    			   'p_angle', 'p_throttle'],
    		output=['a_angle', 'a_throttle'])

    V.add(SteeringActuator(), 
    		input='a_angle')
    
    V.add(ThrottleActuator(), 
    		input='a_throttle')

    V.add(Recorder(), input='*')





#Remote Car

    V = Vehicle()

    V.data = ['img',  		#image from camera
    			'c_angle',		#control angle (from user)
    			'c_throttle',
    			'c_drive_mode',
    			'p_angle', 
    			'p_throttle',
    			'a_angle',
    			'a_throttle',

    V.add(RemoteMonitor(), 
    		output='c_angle', 'c_throttle', 'c_drive_mode')
    
    V.add(PiCamera(), 
    		output='img')


    V.add(RemoteLogic(), 
    		input=['img',
    			   'c_angle', 'c_throttle', 'c_drive_mode', 
    			   'a_angle', 'a_throttle'],
    		output=['a_angle', 'a_throttle'])

    V.add(SteeringActuator(), 
    		input='a_angle')
    
    V.add(ThrottleActuator(), 
    		input='a_throttle')

@wroscoe wroscoe closed this as completed Feb 9, 2017
tawnkramer added a commit that referenced this issue Jun 11, 2019
Region of interest cropping exposed in config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant