SMORES Robot Platform Simulation
Modlab at Penn, ASL at Cornell
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
GaitRecorder.GaitRecorder Class Reference

This is the class of gait recorder python gui application. More...

Inheritance diagram for GaitRecorder.GaitRecorder:

Public Member Functions

def __init__
 Constructor. More...
 
def initUI
 Initializes the UI of the current python app. More...
 
def CloseWindow
 Callback for close button. More...
 
def InitialFrame
 Initializaed the section, don't be fooled by the name. More...
 
def AskOpenFile
 Callback of Open Configuration button. More...
 
def ReadInConfiguration
 Parse the configuration file and build the configuration tree. More...
 
def SendLoadConfigurationMessage
 Creates a open configuration request and publish to worldplugin. More...
 
def UpdateJoint
 Callback of Select Model Combobox. More...
 
def GetModuleByName
 Get module object by specifying the name. More...
 
def RefreshDependencyList
 Refresh the dependency list. More...
 
def StringToTuple
 Convert a string that has multiple values to tuple. More...
 
def StringToList
 Convert a string that has multiple values to list. More...
 
def AddGaitEntry
 Callback for Add Command Button. More...
 
def AddGaitToCurrentFrame
 Add gait to current section and display them in the Manage Gait Table tag. More...
 
def DisconnectSend
 Send disconnect message to worldplugin. More...
 
def ConnectSend
 Send connect message to worldplugin. More...
 
def DeleteAllWidgetsOnHisWindow
 Delets all the widgets on the second tag page. More...
 
def ResizePanelSize
 Click the button on the top to resize the panel size It doesn't work. More...
 
def GaitObjToStr
 Converts gait object to string. More...
 
def SaveFrame
 Saves current section, save section button callback. More...
 
def UpdateFrameBox
 Updates the section selction ComboBox. More...
 
def Reset
 Resets the current simulation world to the begin of the section. More...
 
def PlayFrame
 Plays the current section. More...
 
def SaveCurrentPose
 Generates and publish save current section command to worldplugin. More...
 
def UpdateFrameWindows
 Updates the panel window after selecting a section. More...
 
def ModifyHistory
 Callback when you click a gait entry in the third tag ("Gait Records") More...
 
def UpdateSingleGaitEntry
 Update a GaitEntry object when you finish editing Callback of the Update button in the third tag ("Gait Records") More...
 
def DeleteSingleGait
 Delete a GaitEntry object after you hit the delete button Callback of the Delete button in the third tag ("Gait Records") More...
 
def FindGaitEntryBasedOnIdx
 Finds the GaitEntry object by index for update and delete gait in the Gait Records window. More...
 
def PublishMessage
 Publish common command message Control joint position, speed or torque. More...
 
def PublishMessageSpecial
 Publish special command messgae Send connection and disconnection message. More...
 
def SaveGaitTable
 Write recorded gait table to file. More...
 
def OpenGaitFile
 Open and read in a gait file. More...
 
def InterpretGaitString
 Convert a gait string to a GaitEntry object. More...
 
def DynamicUpdate
 Callback function of the scale bar moving event Update the joint angle in simulator when slide the scale bar. More...
 
def UpdateFromValueBox
 Callback function binded to the entry box next to scale with enter key. More...
 
def CheckTheExistingCommand
 Check whether there is a command of the same model in a command list. More...
 
def InterpretCorrelation
 Convert a correlation boolean value to number that can be used in calculation. More...
 
def ResetAssociateWindow
 Clear the association window. More...
 
def RefreshAssociates
 Refresh association window. More...
 
def DeleteAnAssociate
 Delete an association. More...
 
def SelectSavePath
 Select gaitfile save path. More...
 
def AddAssociates
 Open an add association window. More...
 
def UpdateJointValue
 Update joint value on the scale bar and entry next to it. More...
 
def SelectCommonCommand
 Callback of common command select radiobutton. More...
 
def DisableCommonCommand
 Disable common command. More...
 
def EnableCommonCommand
 Enable common command. More...
 
def SelectConnection
 Callback of select connection radiobutton. More...
 
def SelectSecondModule
 Select the second module which the current module connect to or disconnect to. More...
 
def SelectNode1
 Select the node of the first module. More...
 
def UpdateConnectableNodes
 Update the available nodes of the other module the current module connect to. More...
 
def ResetSpecialComand
 Reset the module and nodes selection in the special command section. More...
 
def SelectDisconnection
 Callback of select disconnection radiobutton. More...
 
def DisableSpecialCommand
 Disable special command section. More...
 
def EnableSpecialCommand
 Enable special command section. More...
 

Public Attributes

 parent
 Parent of the App class, which is a tk root.
 
 modelname
 Variable stores name string in the wedget.
 
 jointSelection
 
 commandType
 
 typeSelection
 
 associatedJointsList
 
 nodeSelect1
 
 nodeSelect2
 
 module2Select
 
 jointAngleDifferenceTracking
 
 valueInBox
 Variable records the entered value right next to scroll bar.
 
 condition
 
 dependency
 
 elapstime
 
 elapsedTimeType
 
 savepath
 
 selectedcommand
 
 selectedkeyFrame
 
 savePath
 
 frontWheelAssociates
 
 lftWheelAssociates
 
 rgtWheelAssociates
 
 centralBendAssociates
 
 currentAssociates
 
 commandhis
 
 frameListForGaitRecord
 
 frameButtonList
 
 frameListList
 
 keyFrames
 
 keyFrameList
 
 modulenames
 
 CurrentFrameRec
 
 CurrentFrameHis
 
 DependencyList
 
 ModuleList
 
 ConnectionList
 
 ConnectableModules
 
 DisconnectableModules
 
 initflag
 
 file_opt
 
 rungzserver
 
 communicator
 
 name
 
 selectCommonCommand
 
 bend_joint
 
 left_joint
 
 right_joint
 
 front_joint
 
 modeAngle
 
 modeSpeed
 
 modeTorque
 
 valueSetting
 
 valueSettingBox
 
 associatedJoints
 
 ascModify
 
 ascDelete
 
 connectionCommand
 
 disconnectionCommand
 
 node1Selection
 
 module2Selection
 
 node2Selection
 
 Dependency
 
 keyFrame
 
 panedWindow
 
 scollForCommands
 
 CommandHis
 
 CommandUpdateBtn
 
 CommandDeleteBtn
 
 FrameDelete
 
 OpenGait
 
 saveButton
 
 saveButton2
 
 Playframe
 
 Resetframe
 
 Addframe
 
 Addcommand
 
 currentFrame
 
 allCommands
 
 tree
 
 rungzclient
 
 frameListVars
 
 historyidx
 
 associateIdx
 
 DisconnectableNodes
 

Detailed Description

This is the class of gait recorder python gui application.

Constructor & Destructor Documentation

def GaitRecorder.GaitRecorder.__init__ (   self,
  parent,
  flag 
)

Constructor.

Parameters
selfObject pointer
parentParent of this app, which is tk root
flagSpecifies the state of the this python program, 0 for normal mode, 1 for gui debug mode, 2 for python only mode

Member Function Documentation

def GaitRecorder.GaitRecorder.AddAssociates (   self)

Open an add association window.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.AddGaitEntry (   self)

Callback for Add Command Button.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.AddGaitToCurrentFrame (   self,
  gait_obj 
)

Add gait to current section and display them in the Manage Gait Table tag.

Parameters
selfObject pointer
gait_objA gait object
def GaitRecorder.GaitRecorder.AskOpenFile (   self)

Callback of Open Configuration button.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.CheckTheExistingCommand (   self,
  model_name,
  command_queue 
)

Check whether there is a command of the same model in a command list.

Parameters
selfObject pointer
model_nameName string of the model
command_queueA command list
Returns
If found a command, then return the messga object; otherwise return False
def GaitRecorder.GaitRecorder.CloseWindow (   self)

Callback for close button.

Parameters
selfobject pointer
def GaitRecorder.GaitRecorder.ConnectSend (   self,
  time_interval 
)

Send connect message to worldplugin.

Parameters
selfObject pointer
time_intervalHow long this command will be executed
def GaitRecorder.GaitRecorder.DeleteAllWidgetsOnHisWindow (   self)

Delets all the widgets on the second tag page.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.DeleteAnAssociate (   self)

Delete an association.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.DeleteSingleGait (   self)

Delete a GaitEntry object after you hit the delete button Callback of the Delete button in the third tag ("Gait Records")

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.DisableCommonCommand (   self)

Disable common command.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.DisableSpecialCommand (   self)

Disable special command section.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.DisconnectSend (   self,
  time_interval 
)

Send disconnect message to worldplugin.

Parameters
selfObject pointer
time_intervalHow long this command will be executed
def GaitRecorder.GaitRecorder.DynamicUpdate (   self,
  args 
)

Callback function of the scale bar moving event Update the joint angle in simulator when slide the scale bar.

Parameters
selfObject pointer Other arguements
def GaitRecorder.GaitRecorder.EnableCommonCommand (   self)

Enable common command.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.EnableSpecialCommand (   self)

Enable special command section.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.FindGaitEntryBasedOnIdx (   self,
  gait_idx 
)

Finds the GaitEntry object by index for update and delete gait in the Gait Records window.

Parameters
selfObject pointer
gait_idxInteger, the index number of the gait
Returns
(the GaitEntry object, Section GaitEntry List, And Section GaitEntry index)
def GaitRecorder.GaitRecorder.GaitObjToStr (   self,
  gaittableobj 
)

Converts gait object to string.

Parameters
selfObject pointer
gaittableobjA GaitEntry object
Returns
Gait string
def GaitRecorder.GaitRecorder.GetModuleByName (   self,
  modelname 
)

Get module object by specifying the name.

Parameters
selfObject pointer
modelnameString: Name of the model
Returns
if there is a model return the model object, otherwise return False
def GaitRecorder.GaitRecorder.InitialFrame (   self)

Initializaed the section, don't be fooled by the name.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.initUI (   self)

Initializes the UI of the current python app.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.InterpretCorrelation (   self,
  corr 
)

Convert a correlation boolean value to number that can be used in calculation.

Parameters
selfObject pointer
corrBool value stored in AssociateJ?oint object
Returns
Position correlation: 1.0 ; negtive correlation: -1.0
def GaitRecorder.GaitRecorder.InterpretGaitString (   self,
  gaitstring 
)

Convert a gait string to a GaitEntry object.

Parameters
selfObject Pointer
gaitstringA gait command string
Returns
A GaitEntry object
def GaitRecorder.GaitRecorder.ModifyHistory (   self,
  args 
)

Callback when you click a gait entry in the third tag ("Gait Records")

Parameters
selfObject pointer
argsOther variables
def GaitRecorder.GaitRecorder.OpenGaitFile (   self)

Open and read in a gait file.

Parameters
selfObject Pointer
def GaitRecorder.GaitRecorder.PlayFrame (   self)

Plays the current section.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.PublishMessage (   self,
  eachgaittable,
  playstate 
)

Publish common command message Control joint position, speed or torque.

Parameters
selfObject Pointer
eachgaittableA GaitEntry object
playstateBool, True: for playmode, update model state using gait string; False: update model state immediately
def GaitRecorder.GaitRecorder.PublishMessageSpecial (   self,
  eachgaittable,
  playstate 
)

Publish special command messgae Send connection and disconnection message.

Parameters
selfObject Pointer
eachgaittableA GaitEntry object
playstateBool, True: for playmode, update model state using gait string; False: update model state immediately
def GaitRecorder.GaitRecorder.ReadInConfiguration (   self,
  filename 
)

Parse the configuration file and build the configuration tree.

Parameters
selfObjetc pointer
filenameName of the configuration file
def GaitRecorder.GaitRecorder.RefreshAssociates (   self)

Refresh association window.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.RefreshDependencyList (   self)

Refresh the dependency list.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.Reset (   self)

Resets the current simulation world to the begin of the section.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.ResetAssociateWindow (   self)

Clear the association window.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.ResetSpecialComand (   self)

Reset the module and nodes selection in the special command section.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.ResizePanelSize (   self,
  button_idx 
)

Click the button on the top to resize the panel size It doesn't work.

Parameters
selfObject pointer
button_idxInteger: index of the panel
def GaitRecorder.GaitRecorder.SaveCurrentPose (   self)

Generates and publish save current section command to worldplugin.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SaveFrame (   self)

Saves current section, save section button callback.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SaveGaitTable (   self)

Write recorded gait table to file.

Parameters
selfObject Pointer
def GaitRecorder.GaitRecorder.SelectCommonCommand (   self)

Callback of common command select radiobutton.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SelectConnection (   self)

Callback of select connection radiobutton.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SelectDisconnection (   self)

Callback of select disconnection radiobutton.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SelectNode1 (   self,
  args 
)

Select the node of the first module.

Parameters
selfObject pointer
argsOther arguments
def GaitRecorder.GaitRecorder.SelectSavePath (   self)

Select gaitfile save path.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.SelectSecondModule (   self,
  args 
)

Select the second module which the current module connect to or disconnect to.

Parameters
selfObject pointer
argsOther arguments
def GaitRecorder.GaitRecorder.SendLoadConfigurationMessage (   self,
  configure_path 
)

Creates a open configuration request and publish to worldplugin.

Parameters
selfObject pointer
configure_pathPath of the configuration file
def GaitRecorder.GaitRecorder.StringToList (   self,
  anglestring 
)

Convert a string that has multiple values to list.

Parameters
selfObject pointer
anglestringA string that has values separated by spaces
Returns
List of those values
def GaitRecorder.GaitRecorder.StringToTuple (   self,
  anglestring 
)

Convert a string that has multiple values to tuple.

Parameters
selfObject pointer
anglestringA string that has values separated by spaces
Returns
Tuple of those values
def GaitRecorder.GaitRecorder.UpdateConnectableNodes (   self,
  module_name 
)

Update the available nodes of the other module the current module connect to.

Parameters
selfObject pointer
module_nameName string of the other module
Returns
A list of interger, which are the id of the available nodes
def GaitRecorder.GaitRecorder.UpdateFrameBox (   self)

Updates the section selction ComboBox.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.UpdateFrameWindows (   self,
  args 
)

Updates the panel window after selecting a section.

Parameters
selfObject pointer
argsOther variables
def GaitRecorder.GaitRecorder.UpdateFromValueBox (   self,
  args 
)

Callback function binded to the entry box next to scale with enter key.

Parameters
selfObject pointer
argsOther arguements
def GaitRecorder.GaitRecorder.UpdateJoint (   self,
  args 
)

Callback of Select Model Combobox.

Parameters
selfObject pointer
argsOther arguments
def GaitRecorder.GaitRecorder.UpdateJointValue (   self)

Update joint value on the scale bar and entry next to it.

Parameters
selfObject pointer
def GaitRecorder.GaitRecorder.UpdateSingleGaitEntry (   self)

Update a GaitEntry object when you finish editing Callback of the Update button in the third tag ("Gait Records")

Parameters
selfObject pointer

The documentation for this class was generated from the following file: