Task to call the encoder driver for current angles and velocities. More...
Public Member Functions | |
def | __init__ (self, debugFlag=True) |
Create an encoder task to find position and speeds. More... | |
def | encTaskFcn (self) |
Main run function of encoder task. More... | |
def | transitionTo (self, state, newState) |
Method for transitioning states. More... | |
Public Attributes | |
debugFlag | |
Debugging flag for detailed analysis while running. | |
Task to call the encoder driver for current angles and velocities.
This task will be called from the priority scheduler to get the current angles and angular speeds of both encoders. This will be shared to the shares.py file for the controller task to read.
def encoderTask.encoderTask.__init__ | ( | self, | |
debugFlag = True |
|||
) |
Create an encoder task to find position and speeds.
This task will be called from the priority scheduler to get the current angles and angular speeds of both encoders. This will be shared to the shares.py file for the controller task to read.
debugFlag | Enables or prevents certain print statements from appearing. |
def encoderTask.encoderTask.encTaskFcn | ( | self | ) |
Main run function of encoder task.
This function serves as a generator to run the finite state machine of the encoder task. It has three states, and uses an alpha-beta filter to determine position and velocity of the platform.
def encoderTask.encoderTask.transitionTo | ( | self, | |
state, | |||
newState | |||
) |
Method for transitioning states.
The method will reassign the state
variable when directed to transition.
state | The current state of the system. |
newState | The new desired state for the system. |