Public Member Functions | Public Attributes | List of all members
controller.CascadedPController Class Reference
Inheritance diagram for controller.CascadedPController:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self)
 
def computeCorrectiveAcceleration (self, odom, correctiveVelocity)
 
def computeCorrectiveVelocity (self, odom)
 
def disable (self, msg=None)
 
def setTargetPosition (self, targetPosition)
 
def setTargetVelocity (self, targetVelocity)
 
def update (self, odom)
 

Public Attributes

 maxAccel
 
 maxVelocity
 
 positionP
 
 steady
 
 steadyAccelThresh
 
 steadyVelThresh
 
 targetAcceleration
 
 targetPosition
 
 targetVelocity
 
 velocityP
 

Detailed Description

Definition at line 86 of file controller.py.

Constructor & Destructor Documentation

◆ __init__()

def controller.CascadedPController.__init__ (   self)

Member Function Documentation

◆ computeCorrectiveAcceleration()

def controller.CascadedPController.computeCorrectiveAcceleration (   self,
  odom,
  correctiveVelocity 
)
Computes a corrective acceleration.
    
If self.targetVelocity is not None, will return a corrective body-frame acceleration that transitions the robot twoards the desired self.targetVelocity. Otherwise returns 0 vector.
    
Parameters:
correctiveVelocity (np.array): Body-frame velocity vector that adds on to the self.targetVelocity. Is used in position correction.
odom (Odometry): The latest odometry message

Returns: 
np.array: 3 dimensional vector representing corrective body-frame acceleration.


Reimplemented in controller.AngularCascadedPController, and controller.LinearCascadedPController.

Definition at line 117 of file controller.py.

◆ computeCorrectiveVelocity()

def controller.CascadedPController.computeCorrectiveVelocity (   self,
  odom 
)
Computes a corrective velocity.
    
If self.targetPosition is not None, will return a corrective body-frame velocity that moves the robot in the direction of self.targetPosiiton. Otherwise returns 0 vector.
    
Parameters:
odom (Odometry): The latest odometry message

Returns: 
np.array: 3 dimensional vector representing corrective body-frame velocity.


Reimplemented in controller.AngularCascadedPController, and controller.LinearCascadedPController.

Definition at line 101 of file controller.py.

◆ disable()

def controller.CascadedPController.disable (   self,
  msg = None 
)
Disables the controller
    
Puts the controller in the Disabled state


Definition at line 165 of file controller.py.

◆ setTargetPosition()

def controller.CascadedPController.setTargetPosition (   self,
  targetPosition 
)
Sets target position
    
Puts the controller in the Position state and sets self.targetPosition to targetPosition
    
Parameters:
targetPosition (np.array or Vector3): World-frame vector or quaternion to be achieved by the controller


Definition at line 133 of file controller.py.

◆ setTargetVelocity()

def controller.CascadedPController.setTargetVelocity (   self,
  targetVelocity 
)
Sets target velocity
    
Puts the controller in the Velocity state and sets self.targetVelocity to targetVelocity
    
Parameters:
targetVelocity (np.array): Body-frame vector to be achieved by the controller


Definition at line 150 of file controller.py.

◆ update()

def controller.CascadedPController.update (   self,
  odom 
)
Updates the controller
    
Will compute an output acceleration to achieve the desired state
    
Parameters:
odom (Odometry): The latest odometry message

Returns: 
np.array: 3 dimensional vector representing net body-frame acceleration.


Definition at line 177 of file controller.py.

Member Data Documentation

◆ maxAccel

controller.CascadedPController.maxAccel

Definition at line 95 of file controller.py.

◆ maxVelocity

controller.CascadedPController.maxVelocity

Definition at line 94 of file controller.py.

◆ positionP

controller.CascadedPController.positionP

Definition at line 92 of file controller.py.

◆ steady

controller.CascadedPController.steady

Definition at line 98 of file controller.py.

◆ steadyAccelThresh

controller.CascadedPController.steadyAccelThresh

Definition at line 97 of file controller.py.

◆ steadyVelThresh

controller.CascadedPController.steadyVelThresh

Definition at line 96 of file controller.py.

◆ targetAcceleration

controller.CascadedPController.targetAcceleration

Definition at line 91 of file controller.py.

◆ targetPosition

controller.CascadedPController.targetPosition

Definition at line 89 of file controller.py.

◆ targetVelocity

controller.CascadedPController.targetVelocity

Definition at line 90 of file controller.py.

◆ velocityP

controller.CascadedPController.velocityP

Definition at line 93 of file controller.py.


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


riptide_controllers
Author(s): Blaine Miller, Mitchell Sayre
autogenerated on Wed Mar 2 2022 00:50:23