![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
Window class supporting application. More...
Public Member Functions | |
def | __init__ (self, master=None, cnf={}, kw) |
Constructor. More... | |
def | perfStart (self) |
def | perfMark (self, msg) |
def | initData (self, kw) |
Initialize class state data. More... | |
def | dbgSeedFields (self) |
def | createWidgets (self) |
Create gui widgets with supporting data and show. | |
def | createMenu (self) |
Create menu. | |
def | createHeading (self) |
Create top gui heading. | |
def | createLeftButtons (self) |
Create gui left hand side buttons. | |
def | createCenterPanel (self) |
Create robot status and joint state center panel. | |
def | createStatusPanel (self, parent, row, col) |
Create motor status panel. More... | |
def | createMotorCtlrPanel (self, parent, row, col, ctlrpos) |
Create motor controller panel. More... | |
def | createAlarmsPanel (self, parent, row, col, ctlrkey) |
Create motor controller alarm panel. More... | |
def | createAlarmWidget (self, parent, row, col, ctlrkey, text, key) |
Create alarm widgets and initalize alarm db. More... | |
def | createMotorPanel (self, parent, row, col, ctlrkey, motorpos) |
Create motor controller motor panel. More... | |
def | createVelTuningPanel (self, parent, row, col) |
Create velocity tuning panel. More... | |
def | createMotorsTuningPanel (self, parent, row, col, ctlrpos) |
Create motor controller motors tuning panel. More... | |
def | createPidParamsPanel (self, parent, row, col, ctlrkey) |
Create motor controller motors PID parameters panel. More... | |
def | createSetpointsPanel (self, parent, row, col, ctlrkey) |
Create motor controller motor velocity setpoints panel. More... | |
def | createPlotPanel (self, parent, row, col, width) |
Create real-time plot panel. More... | |
def | createPlotControls (self, parent, row, col) |
Create real-time plot controls. More... | |
def | createPlotCanvas (self, parent, row, col, width) |
Create real-time plot canvas. More... | |
def | makeWidgets (self, parent, wdescTbl) |
Make widgets from widget description table. More... | |
def | makeWidget (self, parent, widget, wcfg, gcfg) |
Make widget. More... | |
def | createStatusBar (self) |
Create gui status bar at bottom of gui window. | |
def | updateButtonState (self, keys, state) |
Update button activation states. | |
def | createButton (self, parent, text, imagefile, command, fg='black') |
Create button. More... | |
def | destroy (self) |
Destroy window callback. | |
def | notimpl (self) |
Not implemented callback. | |
def | apply (self) |
Apply tuning tweaks to controllers callback. | |
def | save (self) |
Save tuning to tuning file and controller EEPROM callback. | |
def | stop (self) |
Stop Laelaps. | |
def | about (self) |
Show about dialog callback. | |
def | cbLinkAllPids (self) |
def | cbLinkCtlrPids (self, ck) |
def | cbLinkAllSetpoints (self) |
def | cbLinkCtlrSetpoints (self, ck) |
def | cbVelSetpoint (self, ck, mk, fk, v) |
Setpoint changed callback. More... | |
def | cbEnDisVelPlot (self, ck, mk, fk) |
Enable/disable velocity plot. More... | |
def | setPidParams (self, ck, mk, Kp, Ki, Kd, maxQpps, maxAccel) |
def | getProductInfo (self) |
Get product information. More... | |
def | getLaelapsName (self) |
Get Laelaps name. More... | |
def | updateStatus (self) |
Update motor status. | |
def | showInfo (self, msg) |
Show information message on status bar. More... | |
def | showError (self, msg) |
Show error message on status bar. More... | |
def | showEntry (self, w, var, val, fg='black') |
Show text on read-only entry. More... | |
def | alignToJustify (self, align) |
Map alignment value to justify equivalent. More... | |
def | finalInits (self) |
Final window initializations. More... | |
Window class supporting application.
Definition at line 134 of file laelaps_tune_motors.py.
def laelaps_tune_motors.window.__init__ | ( | self, | |
master = None , |
|||
cnf = {} , |
|||
kw | |||
) |
Constructor.
master | Window parent master widget. |
cnf | Configuration dictionary. |
kw | Keyword options. |
Definition at line 143 of file laelaps_tune_motors.py.
References laelaps_init.window.createWidgets(), laelaps_tune_motors.window.createWidgets(), laelaps_tune_motors.window.dbgSeedFields(), laelaps_init.window.initData(), laelaps_tune_motors.window.initData(), laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_init.window.m_imageLoader, laelaps_tune_motors.window.m_imageLoader, laelaps_tune_motors.window.m_wMaster, laelaps_tune_motors.window.perfStart(), and laelaps_tune_motors.window.t0.
def laelaps_tune_motors.window.alignToJustify | ( | self, | |
align | |||
) |
Map alignment value to justify equivalent.
align | Alignment. |
Definition at line 1606 of file laelaps_tune_motors.py.
def laelaps_tune_motors.window.cbEnDisVelPlot | ( | self, | |
ck, | |||
mk, | |||
fk | |||
) |
Enable/disable velocity plot.
ck | Controller key. |
mk | Motor key. |
fk | Field key. |
Definition at line 1486 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.m_plotVel, laelaps::LaeDbKin.m_powertrain, laelaps_tune_motors.window.m_powertrain, and laelaps_tune_motors.window.m_var.
Referenced by laelaps_tune_motors.window.createPlotControls().
def laelaps_tune_motors.window.cbVelSetpoint | ( | self, | |
ck, | |||
mk, | |||
fk, | |||
v | |||
) |
Setpoint changed callback.
ck | Controller key. |
mk | Motor key. |
fk | Field key. |
v | Value (ignored). |
Definition at line 1471 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.m_plotVel, laelaps::LaeDbKin.m_powertrain, laelaps_tune_motors.window.m_powertrain, and laelaps_tune_motors.window.m_var.
Referenced by laelaps_tune_motors.window.createSetpointsPanel().
def laelaps_tune_motors.window.createAlarmsPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrkey | |||
) |
Create motor controller alarm panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrkey | Motor controller db key. |
Definition at line 640 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createAlarmWidget(), and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createMotorCtlrPanel().
def laelaps_tune_motors.window.createAlarmWidget | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrkey, | |||
text, | |||
key | |||
) |
Create alarm widgets and initalize alarm db.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrkey | Motor controller db key. |
text | Alarm label text. |
key | Alarm db key. |
Definition at line 713 of file laelaps_tune_motors.py.
References laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createAlarmsPanel().
def laelaps_tune_motors.window.createButton | ( | self, | |
parent, | |||
text, | |||
imagefile, | |||
command, | |||
fg = 'black' |
|||
) |
Create button.
parent | Parent widget. |
text | Button text. |
imagefile | Image file name. None for no image. |
command | Callback for button push. |
fg | Foreground text color. |
Definition at line 1378 of file laelaps_tune_motors.py.
References laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_init.window.m_wBttn, and laelaps_tune_motors.window.m_wBttn.
Referenced by laelaps_tune_motors.window.createLeftButtons().
def laelaps_tune_motors.window.createMotorCtlrPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrpos | |||
) |
Create motor controller panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrpos | Motor controller position string. |
Definition at line 453 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createAlarmsPanel(), laelaps_tune_motors.window.createMotorPanel(), laelaps_tune_motors.window.m_motorCtlrAddr, laelaps_tune_motors.window.m_motorPos, laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createStatusPanel().
def laelaps_tune_motors.window.createMotorPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrkey, | |||
motorpos | |||
) |
Create motor controller motor panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrkey | Motor controller db key. |
motorpos | Motor position string. |
Definition at line 742 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createMotorCtlrPanel().
def laelaps_tune_motors.window.createMotorsTuningPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrpos | |||
) |
Create motor controller motors tuning panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrpos | Motor controller position name. |
Definition at line 843 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createPidParamsPanel(), and laelaps_tune_motors.window.createSetpointsPanel().
Referenced by laelaps_tune_motors.window.createVelTuningPanel().
def laelaps_tune_motors.window.createPidParamsPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrkey | |||
) |
Create motor controller motors PID parameters panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrkey | Motor controller db key. |
Definition at line 879 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.cbLinkCtlrPids(), laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_tune_motors.window.m_motorPos, laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createMotorsTuningPanel().
def laelaps_tune_motors.window.createPlotCanvas | ( | self, | |
parent, | |||
row, | |||
col, | |||
width | |||
) |
Create real-time plot canvas.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
width | Total available width of canvas in pixels. |
Definition at line 1290 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.m_plotVel.
Referenced by laelaps_tune_motors.window.createPlotPanel().
def laelaps_tune_motors.window.createPlotControls | ( | self, | |
parent, | |||
row, | |||
col | |||
) |
Create real-time plot controls.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
Definition at line 1186 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.cbEnDisVelPlot(), laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createPlotPanel().
def laelaps_tune_motors.window.createPlotPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
width | |||
) |
Create real-time plot panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
width | Total available width of plot panel in pixels. |
Definition at line 1162 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createPlotCanvas(), laelaps_tune_motors.window.createPlotControls(), and laelaps_tune_motors.window.perfMark().
Referenced by laelaps_tune_motors.window.createCenterPanel().
def laelaps_tune_motors.window.createSetpointsPanel | ( | self, | |
parent, | |||
row, | |||
col, | |||
ctlrkey | |||
) |
Create motor controller motor velocity setpoints panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
ctlrkey | Motor controller db key. |
Definition at line 1048 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.cbLinkCtlrSetpoints(), laelaps_tune_motors.window.cbVelSetpoint(), laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_tune_motors.window.m_motorPos, laelaps_tune_motors.window.m_var, and laelaps_tune_motors.window.makeWidget().
Referenced by laelaps_tune_motors.window.createMotorsTuningPanel().
def laelaps_tune_motors.window.createStatusPanel | ( | self, | |
parent, | |||
row, | |||
col | |||
) |
Create motor status panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
Definition at line 433 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createMotorCtlrPanel(), and laelaps_tune_motors.window.m_motorCtlrPos.
Referenced by laelaps_tune_motors.window.createCenterPanel().
def laelaps_tune_motors.window.createVelTuningPanel | ( | self, | |
parent, | |||
row, | |||
col | |||
) |
Create velocity tuning panel.
parent | Parent widget. |
row | Row in parent widget. |
col | Column in parent widget. |
Definition at line 823 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.createMotorsTuningPanel(), and laelaps_tune_motors.window.m_motorCtlrPos.
Referenced by laelaps_tune_motors.window.createCenterPanel().
def laelaps_tune_motors.window.finalInits | ( | self | ) |
Final window initializations.
Both the window data and widgets, along with ROS node application, have been fully initialized.
Definition at line 1620 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.getLaelapsName(), laelaps_tune_motors.window.m_botName, and laelaps_tune_motors.window.m_wTopHeading.
def laelaps_tune_motors.window.getLaelapsName | ( | self | ) |
Get Laelaps name.
Definition at line 1539 of file laelaps_tune_motors.py.
Referenced by laelaps_tune_motors.window.finalInits().
def laelaps_tune_motors.window.getProductInfo | ( | self | ) |
Get product information.
Definition at line 1517 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.showError().
Referenced by laelaps_tune_motors.window.about().
def laelaps_tune_motors.window.initData | ( | self, | |
kw | |||
) |
Initialize class state data.
Any keywords for this application specific window that are not supported by the Frame Tkinter class must be removed.
kw | Keyword options. |
Definition at line 195 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.m_botName, laelaps_init.window.m_icons, laelaps_tune_motors.window.m_icons, laelaps_tune_motors.window.m_motorCtlrAddr, laelaps_tune_motors.window.m_motorCtlrPos, laelaps_tune_motors.window.m_motorPos, laelaps_tune_motors.window.m_plotVel, laelaps::LaeDbKin.m_powertrain, laelaps_tune_motors.window.m_powertrain, laelaps_tune_motors.window.m_var, laelaps_init.window.m_wBttn, laelaps_tune_motors.window.m_wBttn, and laelaps_tune_motors.window.setPidParams().
Referenced by laelaps_tune_motors.window.__init__().
def laelaps_tune_motors.window.makeWidget | ( | self, | |
parent, | |||
widget, | |||
wcfg, | |||
gcfg | |||
) |
Make widget.
parent | Parent widget. |
widget | Tkinter widget class. |
wcfg | Dictionary of widget-specific configuration options. |
gcfg | Dictionary of grid options. |
Definition at line 1336 of file laelaps_tune_motors.py.
Referenced by laelaps_tune_motors.window.createAlarmsPanel(), laelaps_tune_motors.window.createAlarmWidget(), laelaps_tune_motors.window.createMotorCtlrPanel(), laelaps_tune_motors.window.createMotorPanel(), laelaps_tune_motors.window.createPidParamsPanel(), laelaps_tune_motors.window.createPlotControls(), laelaps_tune_motors.window.createSetpointsPanel(), and laelaps_tune_motors.window.makeWidgets().
def laelaps_tune_motors.window.makeWidgets | ( | self, | |
parent, | |||
wdescTbl | |||
) |
Make widgets from widget description table.
The description table is a list of wdesc widget description dictionaries. Each wdesc dictionary must have the following keys and values: 'widget': W - W is a Tkinter widget class (e.g. Label, button, listbox, etc). 'wcfg': D - D is a dictionary of widget-specific configuration options. 'gcfg': D - D is a dictionary of grid options.
parent | Parent widget. |
wdescTbl | List of [wdesc, wdesc,...]. |
Definition at line 1322 of file laelaps_tune_motors.py.
References laelaps_tune_motors.window.makeWidget().
def laelaps_tune_motors.window.showEntry | ( | self, | |
w, | |||
var, | |||
val, | |||
fg = 'black' |
|||
) |
Show text on read-only entry.
w | Entry widget. |
var | Bound entry variable. |
val | Variable value. |
fg | Text foreground color. |
Definition at line 1593 of file laelaps_tune_motors.py.
def laelaps_tune_motors.window.showError | ( | self, | |
msg | |||
) |
Show error message on status bar.
msg | Error message string. |
Definition at line 1579 of file laelaps_tune_motors.py.
References laelaps_init.window.m_wStatusBar, and laelaps_tune_motors.window.m_wStatusBar.
Referenced by laelaps_tune_motors.window.getProductInfo(), and laelaps_tune_motors.window.notimpl().
def laelaps_tune_motors.window.showInfo | ( | self, | |
msg | |||
) |
Show information message on status bar.
msg | Info message string. |
Definition at line 1568 of file laelaps_tune_motors.py.
References laelaps_init.window.m_wStatusBar, and laelaps_tune_motors.window.m_wStatusBar.