Trees | Indices | Help |
---|
|
GaitCyclePlan-s combine the benefits of a SheetPlan with those of a CyclePlan. They represent "cyclical spreadsheets" consisting of settings that should be applied via the Plan bindings at various phases in the cycle.
GaitCyclePlan usage example: >>> gcp = GaitCyclePlan( app, ... sheet = [['t','x'],[0,1],[0.25,0],[0.5,-1],[0.75,0]], ... x = '>pos' ) >>> gcp.start()
would make a 4-step triangle wave be emitted to Scratch variable 'pos'
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
|
|||
Inherited from |
|
Initialize a GaitCyclePlan instance INPUTS: app -- JoyApp -- application containing this Plan sheet -- list of lists -- gait table (see SheetPlan for details) maxFreq -- float -- maximal gait frequency; default is 10 Hz Additional keyword arguments provide output bindings for the gait table columns. sheet[0] is a list of column headings, with sheet[0][0]=='t' the time (phase). Unlike other SheetPlans, the time column in a GaitCyclePlan MUST range 0.0 to 1.0 If no column bindings are provided, column headings are assumed to be module names of servo modules and each of these is bound to <<module>>/@set_pos of the corresponding module. For example, the sheet: >>> sheet = [ ... ["t", "Nx15"], ... [0, 1000], ... [0.5, -1000] ] will generate a +/- 10 degree square wave into the position of node 0x15
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jan 4 16:46:17 2018 | http://epydoc.sourceforge.net |